Player.js 375 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356
  1. layui.define(function (exports) {
  2. var Player = function (e) {
  3. var t = {};
  4. function n(r) {
  5. if (t[r]) return t[r].exports;
  6. var a = t[r] = {i: r, l: !1, exports: {}};
  7. return e[r].call(a.exports, a, a.exports, n), a.l = !0, a.exports
  8. }
  9. return n.m = e, n.c = t, n.d = function (e, t, r) {
  10. n.o(e, t) || Object.defineProperty(e, t, {enumerable: !0, get: r})
  11. }, n.r = function (e) {
  12. "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, {value: "Module"}), Object.defineProperty(e, "__esModule", {value: !0})
  13. }, n.t = function (e, t) {
  14. if (1 & t && (e = n(e)), 8 & t) return e;
  15. if (4 & t && "object" == typeof e && e && e.__esModule) return e;
  16. var r = Object.create(null);
  17. if (n.r(r), Object.defineProperty(r, "default", {
  18. enumerable: !0,
  19. value: e
  20. }), 2 & t && "string" != typeof e) for (var a in e) n.d(r, a, function (t) {
  21. return e[t]
  22. }.bind(null, a));
  23. return r
  24. }, n.n = function (e) {
  25. var t = e && e.__esModule ? function () {
  26. return e.default
  27. } : function () {
  28. return e
  29. };
  30. return n.d(t, "a", t), t
  31. }, n.o = function (e, t) {
  32. return Object.prototype.hasOwnProperty.call(e, t)
  33. }, n.p = "", n(n.s = 7)
  34. }([function (e, t, n) {
  35. "use strict";
  36. Object.defineProperty(t, "__esModule", {value: !0});
  37. var r = function () {
  38. function e(e, t) {
  39. for (var n = 0; n < t.length; n++) {
  40. var r = t[n];
  41. r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r)
  42. }
  43. }
  44. return function (t, n, r) {
  45. return n && e(t.prototype, n), r && e(t, r), t
  46. }
  47. }(), a = f(n(9)), i = f(n(2)), o = f(n(26)), l = f(n(5)), s = f(n(3)), u = f(n(27)), c = n(32), p = f(n(33)),
  48. d = n(4);
  49. function f(e) {
  50. return e && e.__esModule ? e : {default: e}
  51. }
  52. function g(e, t) {
  53. if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  54. return !t || "object" != typeof t && "function" != typeof t ? e : t
  55. }
  56. var h = function (e) {
  57. function t(e) {
  58. !function (e, t) {
  59. if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function")
  60. }(this, t);
  61. var n = g(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this, e));
  62. if (n.config = i.default.deepCopy({
  63. width: 600,
  64. height: 337.5,
  65. ignores: [],
  66. whitelist: [],
  67. lang: (document.documentElement.getAttribute("lang") || navigator.language || "zh-cn").toLocaleLowerCase(),
  68. inactive: 3e3,
  69. volume: .6,
  70. controls: !0,
  71. controlsList: ["nodownload"]
  72. }, e), n.version = d.version, n.userTimer = null, n.waitTimer = null, n.database = new o.default, n.history = [], n.isProgressMoving = !1, n.root = i.default.findDom(document, "#" + n.config.id), n.controls = i.default.createDom("xg-controls", "", {
  73. unselectable: "on",
  74. onselectstart: "return false"
  75. }, "xgplayer-controls"), !n.root) {
  76. var r = n.config.el;
  77. if (!r || 1 !== r.nodeType) return n.emit("error", new s.default("use", n.config.vid, {
  78. line: 32,
  79. handle: "Constructor",
  80. msg: "container id can't be empty"
  81. })), !1, g(n, !1);
  82. n.root = r
  83. }
  84. if (i.default.addClass(n.root, "xgplayer xgplayer-" + l.default.device + " xgplayer-nostart " + (n.config.controls ? "" : "no-controls")), n.root.appendChild(n.controls), n.config.fluid ? (n.root.style["max-width"] = "100%", n.root.style.width = "100%", n.root.style.height = "0", n.root.style["padding-top"] = 100 * n.config.height / n.config.width + "%", n.video.style.position = "absolute", n.video.style.top = "0", n.video.style.left = "0") : (n.config.width && ("number" != typeof n.config.width ? n.root.style.width = n.config.width : n.root.style.width = n.config.width + "px"), n.config.height && ("number" != typeof n.config.height ? n.root.style.height = n.config.height : n.root.style.height = n.config.height + "px")), n.config.execBeforePluginsCall && n.config.execBeforePluginsCall.forEach(function (e) {
  85. e.call(n, n)
  86. }), n.config.controlStyle && "String" === i.default.typeOf(n.config.controlStyle)) {
  87. var a = n;
  88. fetch(a.config.controlStyle, {
  89. method: "GET",
  90. headers: {Accept: "application/json"}
  91. }).then(function (e) {
  92. e.ok && e.json().then(function (e) {
  93. for (var t in e) e.hasOwnProperty(t) && (a.config[t] = e[t]);
  94. a.pluginsCall()
  95. })
  96. }).catch(function (e) {
  97. console.log("Fetch错误:" + e)
  98. })
  99. } else n.pluginsCall();
  100. n.ev.forEach(function (e) {
  101. var t = Object.keys(e)[0], r = n[e[t]];
  102. r && n.on(t, r)
  103. }), ["focus", "blur"].forEach(function (e) {
  104. n.on(e, n["on" + e.charAt(0).toUpperCase() + e.slice(1)])
  105. });
  106. var u = n;
  107. return n.mousemoveFunc = function () {
  108. u.emit("focus"), u.config.closeFocusVideoFocus || u.video.focus()
  109. }, n.root.addEventListener("mousemove", n.mousemoveFunc), n.playFunc = function () {
  110. u.emit("focus"), u.config.closePlayVideoFocus || u.video.focus()
  111. }, u.once("play", n.playFunc), setTimeout(function () {
  112. n.emit("ready")
  113. }, 0), n.config.keyShortcut && "on" !== n.config.keyShortcut || ["video", "controls"].forEach(function (e) {
  114. u[e].addEventListener("keydown", function (e) {
  115. u.onKeydown(e, u)
  116. })
  117. }), n.config.videoInit && i.default.hasClass(n.root, "xgplayer-nostart") && n.start(), u.config.rotate && (u.on("requestFullscreen", n.updateRotateDeg), u.on("exitFullscreen", n.updateRotateDeg)), u.once("destroy", function e() {
  118. u.root.removeEventListener("mousemove", u.mousemoveFunc), u.off("destroy", e)
  119. }), n
  120. }
  121. return function (e, t) {
  122. if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t);
  123. e.prototype = Object.create(t && t.prototype, {
  124. constructor: {
  125. value: e,
  126. enumerable: !1,
  127. writable: !0,
  128. configurable: !0
  129. }
  130. }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t)
  131. }(t, a.default), r(t, [{
  132. key: "start", value: function () {
  133. var e = this, n = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : this.config.url,
  134. r = this.root, a = this;
  135. n && "" !== n || this.emit("urlNull"), this.logParams.playSrc = n, this.canPlayFunc = function () {
  136. var e = a.video.play();
  137. void 0 !== e && e && e.then(function () {
  138. a.emit("autoplay started")
  139. }).catch(function () {
  140. a.emit("autoplay was prevented"), t.util.addClass(a.root, "xgplayer-is-autoplay")
  141. }), a.off("canplay", a.canPlayFunc)
  142. }, "String" === i.default.typeOf(n) ? this.video.src = n : n.forEach(function (t) {
  143. e.video.appendChild(i.default.createDom("source", "", {
  144. src: "" + t.src,
  145. type: "" + (t.type || "")
  146. }))
  147. }), this.logParams.pt = (new Date).getTime(), this.logParams.vt = this.logParams.pt, this.loadeddataFunc = function () {
  148. a.logParams.vt = (new Date).getTime(), a.logParams.pt > a.logParams.vt && (a.logParams.pt = a.logParams.vt), a.logParams.vd = a.video.duration
  149. }, this.once("loadeddata", this.loadeddataFunc), this.config.autoplay && this.on("canplay", this.canPlayFunc), r.insertBefore(this.video, r.firstChild), setTimeout(function () {
  150. e.emit("complete")
  151. }, 1)
  152. }
  153. }, {
  154. key: "reload", value: function () {
  155. this.video.load(), this.reloadFunc = function () {
  156. this.play()
  157. }, this.once("loadeddata", this.reloadFunc)
  158. }
  159. }, {
  160. key: "destroy", value: function () {
  161. var e = this, n = !(arguments.length > 0 && void 0 !== arguments[0]) || arguments[0], r = this;
  162. this.root.parentNode;
  163. for (var a in clearInterval(this.bulletResizeTimer), this._interval) clearInterval(this._interval[a]), this._interval[a] = null;
  164. function i() {
  165. for (var e in this.emit("destroy"), this.video.removeAttribute("src"), this.video.load(), n && (this.root.innerHTML = "", this.root.className = ""), this) delete this[e];
  166. this.off("pause", i)
  167. }
  168. this.ev.forEach(function (t) {
  169. var n = Object.keys(t)[0], r = e[t[n]];
  170. r && e.off(n, r)
  171. }), this.loadeddataFunc && this.off("loadeddata", this.loadeddataFunc), this.reloadFunc && this.off("loadeddata", this.reloadFunc), this.replayFunc && this.off("play", this.replayFunc), this.playFunc && this.off("play", this.playFunc), ["focus", "blur"].forEach(function (t) {
  172. e.off(t, e["on" + t.charAt(0).toUpperCase() + t.slice(1)])
  173. }), this.config.keyShortcut && "on" !== this.config.keyShortcut || ["video", "controls"].forEach(function (t) {
  174. e[t] && e[t].removeEventListener("keydown", function (e) {
  175. r.onKeydown(e, r)
  176. })
  177. }), this.paused ? i.call(this) : (this.pause(), this.once("pause", i)), function e(t, n, r) {
  178. null === t && (t = Function.prototype);
  179. var a = Object.getOwnPropertyDescriptor(t, n);
  180. if (void 0 === a) {
  181. var i = Object.getPrototypeOf(t);
  182. return null === i ? void 0 : e(i, n, r)
  183. }
  184. if ("value" in a) return a.value;
  185. var o = a.get;
  186. return void 0 !== o ? o.call(r) : void 0
  187. }(t.prototype.__proto__ || Object.getPrototypeOf(t.prototype), "destroy", this).call(this)
  188. }
  189. }, {
  190. key: "replay", value: function () {
  191. var e = this, t = this._replay;
  192. i.default.removeClass(this.root, "xgplayer-ended"), this.logParams = {
  193. bc: 0,
  194. bu_acu_t: 0,
  195. played: [],
  196. pt: (new Date).getTime(),
  197. vt: (new Date).getTime(),
  198. vd: 0
  199. }, this.logParams.pt = (new Date).getTime(), this.logParams.vt = this.logParams.pt, this.replayFunc = function () {
  200. e.logParams.vt = (new Date).getTime(), e.logParams.pt > e.logParams.vt && (e.logParams.pt = e.logParams.vt), e.logParams.vd = e.video.duration
  201. }, this.once("play", this.replayFunc), this.logParams.playSrc = this.video.currentSrc, t && t instanceof Function ? t() : (this.currentTime = 0, this.play())
  202. }
  203. }, {
  204. key: "getFullscreen", value: function (e) {
  205. e.requestFullscreen ? e.requestFullscreen() : e.mozRequestFullScreen ? e.mozRequestFullScreen() : e.webkitRequestFullscreen ? e.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT) : player.video.webkitSupportsFullscreen ? player.video.webkitEnterFullscreen() : e.msRequestFullscreen ? e.msRequestFullscreen() : i.default.addClass(e, "xgplayer-is-cssfullscreen")
  206. }
  207. }, {
  208. key: "exitFullscreen", value: function (e) {
  209. document.exitFullscreen ? document.exitFullscreen() : document.webkitExitFullscreen ? document.webkitExitFullscreen() : document.mozCancelFullScreen ? document.mozCancelFullScreen() : document.msExitFullscreen && document.msExitFullscreen(), i.default.removeClass(e, "xgplayer-is-cssfullscreen")
  210. }
  211. }, {
  212. key: "download", value: function () {
  213. var e = (0, c.getAbsoluteURL)(player.config.url);
  214. console.log(e), (0, p.default)(e)
  215. }
  216. }, {
  217. key: "pluginsCall", value: function () {
  218. var e = this, n = this;
  219. if (t.plugins) {
  220. var r = this.config.ignores;
  221. Object.keys(t.plugins).forEach(function (a) {
  222. var i = t.plugins[a];
  223. r.some(function (e) {
  224. return a === e || a === "s_" + e
  225. }) || (["pc", "tablet", "mobile"].some(function (e) {
  226. return e === a
  227. }) ? a === l.default.device && setTimeout(function () {
  228. i.call(n, n)
  229. }, 0) : i.call(e, e))
  230. })
  231. }
  232. }
  233. }, {
  234. key: "getPIP", value: function () {
  235. var e = i.default.createDom("xg-pip-lay", "<div></div>", {}, "xgplayer-pip-lay");
  236. this.root.appendChild(e);
  237. var t = i.default.createDom("xg-pip-drag", '<div class="drag-handle"><span>点击按住可拖动视频</span></div>', {tabindex: 9}, "xgplayer-pip-drag");
  238. this.root.appendChild(t);
  239. new u.default(".xgplayer", {handle: ".drag-handle"});
  240. i.default.addClass(this.root, "xgplayer-pip-active"), this.root.style.right = 0, this.root.style.bottom = "200px", this.root.style.top = "", this.root.style.left = "", this.root.style.width = "320px", this.root.style.height = "180px", this.config.pipConfig && (void 0 !== this.config.pipConfig.top && (this.root.style.top = this.config.pipConfig.top + "px", this.root.style.bottom = ""), void 0 !== this.config.pipConfig.bottom && (this.root.style.bottom = this.config.pipConfig.bottom + "px"), void 0 !== this.config.pipConfig.left && (this.root.style.left = this.config.pipConfig.left + "px", this.root.style.right = ""), void 0 !== this.config.pipConfig.right && (this.root.style.right = this.config.pipConfig.right + "px"), void 0 !== this.config.pipConfig.width && (this.root.style.width = this.config.pipConfig.width + "px"), void 0 !== this.config.pipConfig.height && (this.root.style.height = this.config.pipConfig.height + "px")), this.config.fluid && (this.root.style["padding-top"] = "");
  241. var n = this;
  242. ["click", "touchend"].forEach(function (t) {
  243. e.addEventListener(t, function (e) {
  244. e.preventDefault(), e.stopPropagation(), n.exitPIP()
  245. })
  246. })
  247. }
  248. }, {
  249. key: "exitPIP", value: function () {
  250. i.default.removeClass(this.root, "xgplayer-pip-active"), this.root.style.right = "", this.root.style.bottom = "", this.root.style.top = "", this.root.style.left = "", this.config.fluid ? (this.root.style.width = "100%", this.root.style.height = "0", this.root.style["padding-top"] = 100 * this.config.height / this.config.width + "%") : (this.config.width && ("number" != typeof this.config.width ? this.root.style.width = this.config.width : this.root.style.width = this.config.width + "px"), this.config.height && ("number" != typeof this.config.height ? this.root.style.height = this.config.height : this.root.style.height = this.config.height + "px"));
  251. var e = i.default.findDom(this.root, ".xgplayer-pip-lay");
  252. e && e.parentNode && e.parentNode.removeChild(e);
  253. var t = i.default.findDom(this.root, ".xgplayer-pip-drag");
  254. t && t.parentNode && t.parentNode.removeChild(t)
  255. }
  256. }, {
  257. key: "updateRotateDeg", value: function () {
  258. player.rotateDeg || (player.rotateDeg = 0);
  259. var e = player.root.offsetWidth, t = player.root.offsetHeight, n = player.video.videoWidth,
  260. r = player.video.videoHeight;
  261. player.config.rotate.innerRotate || (player.root.style.width = t + "px", player.root.style.height = e + "px");
  262. var a = void 0;
  263. if (.25 === player.rotateDeg || .75 === player.rotateDeg) {
  264. if (player.config.rotate.innerRotate) if (n / r > t / e) {
  265. a = (r / n > t / e ? t * n / r : e) > t ? t > e ? e / t : t / e : t > e ? t / e : e / t
  266. } else {
  267. a = (r / n > t / e ? t : e * r / n) > e ? t > e ? e / t : t / e : t > e ? t / e : e / t
  268. } else a = e >= t ? (e / t).toFixed(2) : (t / e).toFixed(2);
  269. a = parseFloat(a.toFixed(5))
  270. } else a = 1;
  271. player.video.style.transformOrigin = "center center", player.video.style.transform = "rotate(" + player.rotateDeg + "turn) scale(" + a + ")", player.video.style.webKitTransform = "rotate(" + player.rotateDeg + "turn) scale(" + a + ")"
  272. }
  273. }, {
  274. key: "rotate", value: function () {
  275. var e = arguments.length > 0 && void 0 !== arguments[0] && arguments[0],
  276. t = (!(arguments.length > 1 && void 0 !== arguments[1]) || arguments[1], arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 1);
  277. player.rotateDeg || (player.rotateDeg = 0);
  278. var n = e ? 1 : -1;
  279. player.rotateDeg = (player.rotateDeg + 1 + .25 * n * t) % 1, this.updateRotateDeg(), player.emit("rotate", 360 * player.rotateDeg)
  280. }
  281. }, {
  282. key: "onFocus", value: function () {
  283. var e = this;
  284. i.default.removeClass(this.root, "xgplayer-inactive"), e.userTimer && clearTimeout(e.userTimer), e.userTimer = setTimeout(function () {
  285. e.emit("blur")
  286. }, e.config.inactive)
  287. }
  288. }, {
  289. key: "onBlur", value: function () {
  290. this.paused || this.ended || i.default.addClass(this.root, "xgplayer-inactive")
  291. }
  292. }, {
  293. key: "onPlay", value: function () {
  294. i.default.addClass(this.root, "xgplayer-playing"), i.default.removeClass(this.root, "xgplayer-pause")
  295. }
  296. }, {
  297. key: "onPause", value: function () {
  298. i.default.addClass(this.root, "xgplayer-pause"), this.userTimer && clearTimeout(this.userTimer), this.emit("focus")
  299. }
  300. }, {
  301. key: "onEnded", value: function () {
  302. i.default.addClass(this.root, "xgplayer-ended"), i.default.removeClass(this.root, "xgplayer-playing")
  303. }
  304. }, {
  305. key: "onSeeking", value: function () {
  306. }
  307. }, {
  308. key: "onSeeked", value: function () {
  309. this.waitTimer && clearTimeout(this.waitTimer), i.default.removeClass(this.root, "xgplayer-isloading")
  310. }
  311. }, {
  312. key: "onWaiting", value: function () {
  313. var e = this;
  314. e.waitTimer && clearTimeout(e.waitTimer), e.waitTimer = setTimeout(function () {
  315. i.default.addClass(e.root, "xgplayer-isloading")
  316. }, 500)
  317. }
  318. }, {
  319. key: "onPlaying", value: function () {
  320. this.waitTimer && clearTimeout(this.waitTimer), i.default.removeClass(this.root, "xgplayer-isloading xgplayer-nostart xgplayer-pause xgplayer-ended xgplayer-is-error xgplayer-replay"), i.default.addClass(this.root, "xgplayer-playing")
  321. }
  322. }, {
  323. key: "onKeydown", value: function (e, t) {
  324. var n = e || window.event;
  325. if (!n || 37 !== n.keyCode && 38 !== n.keyCode && 39 !== n.keyCode && 40 !== n.keyCode && 32 !== n.keyCode || t.emit("focus"), !n || 40 !== n.keyCode && 38 !== n.keyCode) n && 39 === n.keyCode ? t.currentTime + 10 <= t.duration ? t.currentTime += 10 : t.currentTime = t.duration - 1 : n && 37 === n.keyCode ? t.currentTime - 10 >= 0 ? t.currentTime -= 10 : t.currentTime = 0 : n && 32 === n.keyCode && (t.paused ? t.play() : t.pause()); else {
  326. if (t.controls) {
  327. var r = t.controls.querySelector(".xgplayer-slider");
  328. r && (i.default.hasClass(r, "xgplayer-none") && i.default.removeClass(r, "xgplayer-none"), t.sliderTimer && clearTimeout(t.sliderTimer), t.sliderTimer = setTimeout(function () {
  329. i.default.addClass(r, "xgplayer-none")
  330. }, t.config.inactive))
  331. }
  332. n && 40 === n.keyCode ? t.volume - .1 >= 0 ? t.volume -= .1 : t.volume = 0 : n && 38 === n.keyCode && (t.volume + .1 <= 1 ? t.volume += .1 : t.volume = 1)
  333. }
  334. }
  335. }], [{
  336. key: "install", value: function (e, n) {
  337. t.plugins || (t.plugins = {}), t.plugins[e] || (t.plugins[e] = n)
  338. }
  339. }, {
  340. key: "use", value: function (e, n) {
  341. t.plugins || (t.plugins = {}), t.plugins[e] = n
  342. }
  343. }]), t
  344. }();
  345. h.util = i.default, h.sniffer = l.default, h.Errors = s.default, t.default = h, e.exports = t.default
  346. }, function (e, t, n) {
  347. "use strict";
  348. var r = n(18)();
  349. e.exports = function (e) {
  350. return e !== r && null !== e
  351. }
  352. }, function (module, exports, __webpack_require__) {
  353. "use strict";
  354. Object.defineProperty(exports, "__esModule", {value: !0});
  355. var util = {
  356. createDom: function () {
  357. var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "div",
  358. t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "",
  359. n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {},
  360. r = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : "",
  361. a = document.createElement(e);
  362. return a.className = r, a.innerHTML = t, Object.keys(n).forEach(function (t) {
  363. var r = t, i = n[t];
  364. "video" === e || "audio" === e ? i && a.setAttribute(r, i) : a.setAttribute(r, i)
  365. }), a
  366. }, hasClass: function (e, t) {
  367. return e.classList ? Array.prototype.some.call(e.classList, function (e) {
  368. return e === t
  369. }) : !!e.className.match(new RegExp("(\\s|^)" + t + "(\\s|$)"))
  370. }, addClass: function (e, t) {
  371. e.classList ? t.replace(/(^\s+|\s+$)/g, "").split(/\s+/g).forEach(function (t) {
  372. t && e.classList.add(t)
  373. }) : util.hasClass(e, t) || (e.className += " " + t)
  374. }, removeClass: function (e, t) {
  375. e.classList ? t.split(/\s+/g).forEach(function (t) {
  376. e.classList.remove(t)
  377. }) : util.hasClass(e, t) && t.split(/\s+/g).forEach(function (t) {
  378. var n = new RegExp("(\\s|^)" + t + "(\\s|$)");
  379. e.className = e.className.replace(n, " ")
  380. })
  381. }, toggleClass: function (e, t) {
  382. t.split(/\s+/g).forEach(function (t) {
  383. util.hasClass(e, t) ? util.removeClass(e, t) : util.addClass(e, t)
  384. })
  385. }, findDom: function () {
  386. var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : document, t = arguments[1],
  387. n = void 0;
  388. try {
  389. n = e.querySelector(t)
  390. } catch (r) {
  391. t.startsWith("#") && (n = e.getElementById(t.slice(1)))
  392. }
  393. return n
  394. }, padStart: function (e, t, n) {
  395. for (var r = String(n), a = t >> 0, i = Math.ceil(a / r.length), o = [], l = String(e); i--;) o.push(r);
  396. return o.join("").substring(0, a - l.length) + l
  397. }, format: function (e) {
  398. if (window.isNaN(e)) return "";
  399. var t = util.padStart(Math.floor(e / 3600), 2, 0),
  400. n = util.padStart(Math.floor((e - 3600 * t) / 60), 2, 0),
  401. r = util.padStart(Math.floor(e - 3600 * t - 60 * n), 2, 0);
  402. return ("00" === t ? [n, r] : [t, n, r]).join(":")
  403. }, event: function (e) {
  404. if (e.touches) {
  405. var t = e.touches[0] || e.changedTouches[0];
  406. e.clientX = t.clientX || 0, e.clientY = t.clientY || 0, e.offsetX = t.pageX - t.target.offsetLeft, e.offsetY = t.pageY - t.target.offsetTop
  407. }
  408. e._target = e.target || e.srcElement
  409. }, typeOf: function (e) {
  410. return Object.prototype.toString.call(e).match(/([^\s.*]+)(?=]$)/g)[0]
  411. }, deepCopy: function (e, t) {
  412. if ("Object" === util.typeOf(t) && "Object" === util.typeOf(e)) return Object.keys(t).forEach(function (n) {
  413. "Object" !== util.typeOf(t[n]) || t[n] instanceof Node ? "Array" === util.typeOf(t[n]) ? e[n] = "Array" === util.typeOf(e[n]) ? e[n].concat(t[n]) : t[n] : e[n] = t[n] : e[n] ? util.deepCopy(e[n], t[n]) : e[n] = t[n]
  414. }), e
  415. }, getBgImage: function (e) {
  416. var t = (e.currentStyle || window.getComputedStyle(e, null)).backgroundImage;
  417. if (!t || "none" === t) return "";
  418. var n = document.createElement("a");
  419. return n.href = t.replace(/url\("|"\)/g, ""), n.href
  420. }, copyDom: function (e) {
  421. if (e && 1 === e.nodeType) {
  422. var t = document.createElement(e.tagName);
  423. return Array.prototype.forEach.call(e.attributes, function (e) {
  424. t.setAttribute(e.name, e.value)
  425. }), e.innerHTML && (t.innerHTML = e.innerHTML), t
  426. }
  427. return ""
  428. }, setInterval: function (e, t, n, r) {
  429. e._interval[t] || (e._interval[t] = setInterval(n.bind(e), r))
  430. }, clearInterval: function (e, t) {
  431. clearInterval(e._interval[t]), e._interval[t] = null
  432. }, createImgBtn: function (e, t, n, r) {
  433. var a = util.createDom("xg-" + e, "", {}, "xgplayer-" + e + "-img");
  434. if (a.style.backgroundImage = 'url("' + t + '")', n && r) {
  435. var i = void 0, o = void 0, l = void 0;
  436. ["px", "rem", "em", "pt", "dp", "vw", "vh", "vm", "%"].every(function (e) {
  437. return !(n.indexOf(e) > -1 && r.indexOf(e) > -1) || (i = parseFloat(n.slice(0, n.indexOf(e)).trim()), o = parseFloat(r.slice(0, r.indexOf(e)).trim()), l = e, !1)
  438. }), a.style.width = "" + i + l, a.style.height = "" + o + l, a.style.backgroundSize = "" + i + l + " " + o + l, a.style.margin = "start" === e ? "-" + o / 2 + l + " auto auto -" + i / 2 + l : "auto 5px auto 5px"
  439. }
  440. return a
  441. }, Hex2RGBA: function (hex, alpha) {
  442. var rgb = [];
  443. if (/^\#[0-9A-F]{3}$/i.test(hex)) {
  444. var sixHex = "#";
  445. hex.replace(/[0-9A-F]/gi, function (e) {
  446. sixHex += e + e
  447. }), hex = sixHex
  448. }
  449. return /^#[0-9A-F]{6}$/i.test(hex) ? (hex.replace(/[0-9A-F]{2}/gi, function (kw) {
  450. rgb.push(eval("0x" + kw))
  451. }), "rgba(" + rgb.join(",") + ", " + alpha + ")") : "rgba(255, 255, 255, 0.1)"
  452. }
  453. };
  454. exports.default = util, module.exports = exports.default
  455. }, function (e, t, n) {
  456. "use strict";
  457. Object.defineProperty(t, "__esModule", {value: !0});
  458. var r = n(4);
  459. var a = {
  460. network: {code: 1, msg: "视频下载错误", remark: "只要视频下载错误就使用此类型,无论是video本身的超时还是xhr的分段请求超时或者资源不存在"},
  461. mse: {code: 2, msg: "流追加错误", remark: "追加流的时候如果类型不对、无法被正确解码则会触发此类错误"},
  462. parse: {code: 3, msg: "解析错误", remark: "mp4、hls、flv我们都是使用js进行格式解析,如果解析失败则会触发此类错误"},
  463. format: {code: 4, msg: "格式错误", remark: "如果浏览器不支持的格式导致播放错误"},
  464. decoder: {code: 5, msg: "解码错误", remark: "浏览器解码异常会抛出此类型错误"},
  465. runtime: {code: 6, msg: "语法错误", remark: "播放器语法错误"},
  466. timeout: {code: 7, msg: "播放超时", remark: "播放过程中无法正常请求下一个分段导致播放中断"},
  467. other: {code: 8, msg: "其他错误", remark: "不可知的错误或被忽略的错误类型"}
  468. };
  469. t.default = function e(t, n, i, o, l, s, u, c) {
  470. var p = arguments.length > 8 && void 0 !== arguments[8] ? arguments[8] : {
  471. line: "",
  472. handle: "",
  473. msg: "",
  474. version: ""
  475. };
  476. !function (e, t) {
  477. if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function")
  478. }(this, e);
  479. var d = {};
  480. return d.playerVersion = r.version, d.errorType = t, d.domain = document.domain, d.duration = i, d.currentTime = n, d.networkState = o, d.readyState = l, d.currentSrc = u, d.src = s, d.ended = c, d.errd = p, d.ex = (a[t] || {}).msg, d
  481. }, e.exports = t.default
  482. }, function (e) {
  483. e.exports = {
  484. name: "xgplayer",
  485. version: "2.1.2",
  486. description: "video player",
  487. main: "./dist/index.js",
  488. bin: {xgplayer: "bin/xgplayer.js"},
  489. scripts: {
  490. prepare: "npm run build",
  491. build: "webpack --progress --display-chunks -p",
  492. watch: "webpack --progress --display-chunks -p --watch --mode development"
  493. },
  494. keywords: ["video", "player"],
  495. babel: {presets: ["es2015"], plugins: ["add-module-exports", "babel-plugin-bulk-import"]},
  496. repository: {type: "git", url: "git+https://github.com/bytedance/xgplayer.git"},
  497. author: "yinguohui@bytedance.com",
  498. license: "MIT",
  499. dependencies: {
  500. chalk: "^2.3.2",
  501. commander: "^2.15.1",
  502. "danmu.js": "0.1.0",
  503. deepmerge: "^1.5.0",
  504. downloadjs: "1.4.7",
  505. draggabilly: "^2.2.0",
  506. "event-emitter": "^0.3.5",
  507. "fs-extra": "^5.0.0",
  508. pasition: "^1.0.1",
  509. "request-frame": "^1.5.3"
  510. },
  511. browserslist: ["> 5%", "IE 9", "iOS 7", "Firefox > 20"],
  512. devDependencies: {
  513. autoprefixer: "^9.1.5",
  514. "babel-core": "^6.26.3",
  515. "babel-loader": "^7.1.4",
  516. "babel-plugin-add-module-exports": "^0.2.1",
  517. "babel-plugin-bulk-import": "^1.0.2",
  518. "babel-plugin-transform-object-rest-spread": "^6.26.0",
  519. "babel-plugin-transform-runtime": "^6.23.0",
  520. "babel-preset-es2015": "^6.24.1",
  521. chai: "^4.1.2",
  522. "core-js": "^2.5.4",
  523. "css-loader": "^0.28.11",
  524. "json-loader": "^0.5.7",
  525. "node-sass": "^4.8.3",
  526. "postcss-cssnext": "^3.1.0",
  527. "postcss-loader": "^2.1.5",
  528. "raw-loader": "^2.0.0",
  529. "sass-loader": "^6.0.7",
  530. "style-loader": "^0.20.3",
  531. sugarss: "^1.0.1",
  532. webpack: "^4.11.0",
  533. "webpack-cli": "^3.0.2",
  534. zlib: "^1.0.5"
  535. }
  536. }
  537. }, function (e, t, n) {
  538. "use strict";
  539. Object.defineProperty(t, "__esModule", {value: !0});
  540. var r = {
  541. get device() {
  542. return r.os.isPc ? "pc" : "mobile"
  543. }, get browser() {
  544. var e = navigator.userAgent.toLowerCase(), t = {
  545. ie: /rv:([\d.]+)\) like gecko/,
  546. firfox: /firefox\/([\d.]+)/,
  547. chrome: /chrome\/([\d.]+)/,
  548. opera: /opera.([\d.]+)/,
  549. safari: /version\/([\d.]+).*safari/
  550. };
  551. return [].concat(Object.keys(t).filter(function (n) {
  552. return t[n].test(e)
  553. }))[0]
  554. }, get os() {
  555. var e = navigator.userAgent, t = /(?:Windows Phone)/.test(e), n = /(?:SymbianOS)/.test(e) || t,
  556. r = /(?:Android)/.test(e), a = /(?:Firefox)/.test(e),
  557. i = /(?:iPad|PlayBook)/.test(e) || r && !/(?:Mobile)/.test(e) || a && /(?:Tablet)/.test(e),
  558. o = /(?:iPhone)/.test(e) && !i;
  559. return {
  560. isTablet: i,
  561. isPhone: o,
  562. isAndroid: r,
  563. isPc: !(o || r || n || i),
  564. isSymbian: n,
  565. isWindowsPhone: t,
  566. isFireFox: a
  567. }
  568. }
  569. };
  570. t.default = r, e.exports = t.default
  571. }, function (e, t, n) {
  572. "use strict";
  573. Object.defineProperty(t, "__esModule", {value: !0});
  574. var r = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (e) {
  575. return typeof e
  576. } : function (e) {
  577. return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e
  578. }, a = Object.assign || function (e) {
  579. for (var t = 1; t < arguments.length; t++) {
  580. var n = arguments[t];
  581. for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r])
  582. }
  583. return e
  584. };
  585. var i = void 0, o = function e() {
  586. var t = this;
  587. !function (e, t) {
  588. if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function")
  589. }(this, e), this.set = function (e, n) {
  590. var r = e, a = n;
  591. if (null === a) return !1;
  592. var i = "";
  593. if (r.indexOf(".") > -1) {
  594. var o = r.split(".");
  595. i = o[0], r = o[1]
  596. }
  597. "os_version" === r && (a = "" + a), i ? "user" === i || "header" === i ? t.envInfo[i][r] = a : "headers" === i ? t.envInfo.header.headers[r] = a : t.envInfo.header.headers.custom[r] = a : t.envInfo.user.hasOwnProperty(r) ? ["user_type", "device_id", "ip_addr_id"].indexOf(r) > -1 ? t.envInfo.user[r] = Number(a) : ["user_id", "web_id", "user_unique_id", "ssid"].indexOf(r) > -1 ? t.envInfo.user[r] = String(a) : ["user_is_auth", "user_is_login"].indexOf(r) > -1 && (t.envInfo.user[r] = Boolean(a)) : t.envInfo.header.hasOwnProperty(r) ? t.envInfo.header[r] = a : t.envInfo.header.headers.hasOwnProperty(r) ? t.envInfo.header.headers[r] = a : t.envInfo.header.headers.custom[r] = a
  598. }, this.get = function () {
  599. var e = {user: {}, header: {headers: {custom: {}}}}, n = t.envInfo, r = n.user, o = Object.keys(r),
  600. l = Array.isArray(o), s = 0;
  601. for (o = l ? o : o[Symbol.iterator](); ;) {
  602. var u;
  603. if (l) {
  604. if (s >= o.length) break;
  605. u = o[s++]
  606. } else {
  607. if ((s = o.next()).done) break;
  608. u = s.value
  609. }
  610. var c = u;
  611. r[c] !== i && (e.user[c] = r[c])
  612. }
  613. var p = n.header, d = Object.keys(p), f = Array.isArray(d), g = 0;
  614. for (d = f ? d : d[Symbol.iterator](); ;) {
  615. var h;
  616. if (f) {
  617. if (g >= d.length) break;
  618. h = d[g++]
  619. } else {
  620. if ((g = d.next()).done) break;
  621. h = g.value
  622. }
  623. var y = h;
  624. p[y] !== i && "headers" !== y && (e.header[y] = p[y])
  625. }
  626. var x = n.header.headers, m = Object.keys(x), v = Array.isArray(m), b = 0;
  627. for (m = v ? m : m[Symbol.iterator](); ;) {
  628. var k;
  629. if (v) {
  630. if (b >= m.length) break;
  631. k = m[b++]
  632. } else {
  633. if ((b = m.next()).done) break;
  634. k = b.value
  635. }
  636. var w = k;
  637. "custom" !== w && x[w] !== i && (e.header.headers[w] = x[w])
  638. }
  639. var _ = n.header.headers.custom, E = Object.keys(_);
  640. if (E.length) {
  641. var C = E, S = Array.isArray(C), P = 0;
  642. for (C = S ? C : C[Symbol.iterator](); ;) {
  643. var T;
  644. if (S) {
  645. if (P >= C.length) break;
  646. T = C[P++]
  647. } else {
  648. if ((P = C.next()).done) break;
  649. T = P.value
  650. }
  651. var O = T;
  652. e.header.headers.custom[O] = _[O]
  653. }
  654. }
  655. return {user: e.user, header: a({}, e.header, {headers: e.header.headers})}
  656. }, this.envInfo = {
  657. user: {
  658. user_unique_id: i,
  659. user_type: i,
  660. user_id: i,
  661. user_is_auth: i,
  662. user_is_login: i,
  663. device_id: i,
  664. web_id: i,
  665. ip_addr_id: i,
  666. ssid: i
  667. },
  668. header: {
  669. app_id: i,
  670. app_name: i,
  671. app_install_id: i,
  672. app_package: i,
  673. app_channel: i,
  674. app_version: i,
  675. os_name: i,
  676. os_version: i,
  677. device_model: i,
  678. ab_client: i,
  679. ab_version: i,
  680. traffic_type: i,
  681. utm_source: i,
  682. utm_medium: i,
  683. utm_campaign: i,
  684. client_ip: i,
  685. device_brand: i,
  686. os_api: i,
  687. access: i,
  688. language: i,
  689. region: i,
  690. app_language: i,
  691. app_region: i,
  692. creative_id: i,
  693. ad_id: i,
  694. campaign_id: i,
  695. log_type: i,
  696. rnd: i,
  697. platform: i,
  698. sdk_version: i,
  699. province: i,
  700. city: i,
  701. timezone: i,
  702. tz_offset: i,
  703. tz_name: i,
  704. sim_region: i,
  705. carrier: i,
  706. resolution: i,
  707. browser: i,
  708. browser_version: i,
  709. referrer: i,
  710. referrer_host: i,
  711. headers: {utm_term: i, utm_content: i, custom: {}}
  712. }
  713. }
  714. }, l = function (e) {
  715. var t = document.createElement("a");
  716. return t.href = e, t
  717. }, s = screen.width || 0, u = screen.height || 0, c = s + " x " + u, p = navigator.appVersion,
  718. d = navigator.userAgent, f = navigator.language, g = document.referrer, h = l(g).hostname,
  719. y = function (e) {
  720. var t = l(e).search;
  721. t = t.slice(1);
  722. var n = {};
  723. return t.split("&").forEach(function (e) {
  724. var t = e.split("="), r = t[0], a = t[1];
  725. n[r] = decodeURIComponent(void 0 === a ? "" : a)
  726. }), n
  727. }(location.href), x = "", m = "", v = "", b = "" + parseFloat(p), k = void 0, w = void 0;
  728. -1 !== (k = d.indexOf("Opera")) && (v = "Opera", b = d.substring(k + 6), -1 !== (k = d.indexOf("Version")) && (b = d.substring(k + 8))), -1 !== (k = d.indexOf("Edge")) ? (v = "Microsoft Edge", b = d.substring(k + 5)) : -1 !== (k = d.indexOf("MSIE")) ? (v = "Microsoft Internet Explorer", b = d.substring(k + 5)) : -1 !== (k = d.indexOf("Chrome")) ? (v = "Chrome", b = d.substring(k + 7)) : -1 !== (k = d.indexOf("Safari")) ? (v = "Safari", b = d.substring(k + 7), -1 !== (k = d.indexOf("Version")) && (b = d.substring(k + 8))) : -1 !== (k = d.indexOf("Firefox")) && (v = "Firefox", b = d.substring(k + 8)), -1 !== (w = b.indexOf(";")) && (b = b.substring(0, w)), -1 !== (w = b.indexOf(" ")) && (b = b.substring(0, w)), -1 !== (w = b.indexOf(")")) && (b = b.substring(0, w));
  729. for (var _, E, C = /Mobile|htc|mini|Android|iP(ad|od|hone)/.test(p) ? "wap" : "web", S = [{
  730. s: "Windows 10",
  731. r: /(Windows 10.0|Windows NT 10.0)/
  732. }, {s: "Windows 8.1", r: /(Windows 8.1|Windows NT 6.3)/}, {
  733. s: "Windows 8",
  734. r: /(Windows 8|Windows NT 6.2)/
  735. }, {s: "Windows 7", r: /(Windows 7|Windows NT 6.1)/}, {s: "Android", r: /Android/}, {
  736. s: "Sun OS",
  737. r: /SunOS/
  738. }, {s: "Linux", r: /(Linux|X11)/}, {s: "iOS", r: /(iPhone|iPad|iPod)/}, {
  739. s: "Mac OS X",
  740. r: /Mac OS X/
  741. }, {s: "Mac OS", r: /(MacPPC|MacIntel|Mac_PowerPC|Macintosh)/}], P = 0; P < S.length; P++) {
  742. var T = S[P];
  743. if (T.r.test(d)) {
  744. x = T.s;
  745. break
  746. }
  747. }
  748. function O(e, t) {
  749. var n = e.exec(t);
  750. return n && n[1] ? n[1] : ""
  751. }
  752. switch (/Windows/.test(x) && (m = O(/Windows (.*)/, x), x = "windows"), x) {
  753. case"Mac OS X":
  754. m = O(/Mac OS X (10[\.\_\d]+)/, d), x = "mac";
  755. break;
  756. case"Android":
  757. (E = O(/Android ([\.\_\d]+)/, _ = d)) || (E = O(/Android\/([\.\_\d]+)/, _)), m = E, x = "android";
  758. break;
  759. case"iOS":
  760. m = (m = /OS (\d+)_(\d+)_?(\d+)?/.exec(p)) ? m[1] + "." + m[2] + "." + (0 | m[3]) : "", x = "ios"
  761. }
  762. var L = {
  763. screen_size: c,
  764. browser: v,
  765. browser_version: b,
  766. platform: C,
  767. os_name: x,
  768. os_version: m,
  769. userAgent: d,
  770. screen_width: s,
  771. screen_height: u,
  772. device_model: x,
  773. language: f,
  774. referrer: g,
  775. referrer_host: h,
  776. utm_source: y.utm_source,
  777. utm_medium: y.utm_medium,
  778. utm_campaign: y.utm_campaign,
  779. utm_term: y.utm_term,
  780. utm_content: y.utm_content
  781. }, D = {
  782. get: function (e) {
  783. var t = localStorage.getItem(e), n = t;
  784. try {
  785. t && "string" == typeof t && (n = JSON.parse(t))
  786. } catch (e) {
  787. }
  788. return n
  789. }, set: function (e, t) {
  790. try {
  791. var n = "string" == typeof t ? t : JSON.stringify(t);
  792. localStorage.setItem(e, n)
  793. } catch (e) {
  794. }
  795. }
  796. }, M = "__tea_cache_", R = 4001, z = 4e3, A = 4002, j = 4003, I = 500, B = 5001,
  797. N = "function" == typeof Symbol && "symbol" === r(Symbol.iterator) ? function (e) {
  798. return void 0 === e ? "undefined" : r(e)
  799. } : function (e) {
  800. return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : void 0 === e ? "undefined" : r(e)
  801. };
  802. var q = function e() {
  803. var t = this, n = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "";
  804. !function (e, t) {
  805. if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function")
  806. }(this, e), this.init = function (e) {
  807. t.isLog = e
  808. }, this.info = function (e) {
  809. for (var n = arguments.length, r = Array(n > 1 ? n - 1 : 0), a = 1; a < n; a++) r[a - 1] = arguments[a];
  810. var i;
  811. t.isLog && (i = console).log.apply(i, [t.prefix + e].concat(r))
  812. }, this.warn = function (e) {
  813. for (var n = arguments.length, r = Array(n > 1 ? n - 1 : 0), a = 1; a < n; a++) r[a - 1] = arguments[a];
  814. var i;
  815. t.isLog && (i = console).warn.apply(i, [t.prefix + e].concat(r))
  816. }, this.error = function (e) {
  817. for (var n = arguments.length, r = Array(n > 1 ? n - 1 : 0), a = 1; a < n; a++) r[a - 1] = arguments[a];
  818. var i;
  819. t.isLog && (i = console).error.apply(i, [t.prefix + e].concat(r))
  820. }, this.dir = function () {
  821. var e;
  822. t.isLog && (e = console).dir.apply(e, arguments)
  823. }, this.table = function (e) {
  824. t.isLog && console.table(e)
  825. }, this.logJSON = function (e) {
  826. "object" === (void 0 === e ? "undefined" : N(e)) && t.isLog && t.info("", JSON.stringify(e, null, 2))
  827. }, this.deprecated = function (e) {
  828. for (var n = arguments.length, r = Array(n > 1 ? n - 1 : 0), a = 1; a < n; a++) r[a - 1] = arguments[a];
  829. t.warn.apply(t, ["[DEPRECATED]" + e].concat(r))
  830. }, this.throw = function (e) {
  831. throw t.error(t.prefix), new Error(e)
  832. };
  833. var r = n ? "[" + n + "]" : "";
  834. this.prefix = "[tea-sdk]" + r
  835. }, F = new q, U = function (e, t, n, r) {
  836. var a = new XMLHttpRequest;
  837. a.open("POST", e, !0), a.setRequestHeader("Content-Type", "application/json; charset=utf-8"), a.onload = function () {
  838. try {
  839. var e = JSON.parse(a.responseText);
  840. n && n(e)
  841. } catch (e) {
  842. r && r()
  843. }
  844. }, a.onerror = function () {
  845. r && r()
  846. }, a.send(JSON.stringify(t))
  847. };
  848. var H = (new Date).getTimezoneOffset(), W = parseInt(-H / 60, 10), Y = 60 * H, V = void 0;
  849. try {
  850. V = "3.2.7"
  851. } catch (_) {
  852. V = "2.x"
  853. }
  854. var K = new (function (e) {
  855. function t() {
  856. !function (e, t) {
  857. if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function")
  858. }(this, t);
  859. var n = function (e, t) {
  860. if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  861. return !t || "object" !== (void 0 === t ? "undefined" : r(t)) && "function" != typeof t ? e : t
  862. }(this, e.call(this));
  863. return n.initClientEnv = function () {
  864. n.set("os_name", L.os_name), n.set("os_version", L.os_version), n.set("device_model", L.device_model), n.set("platform", L.platform), n.set("sdk_version", V), n.set("browser", L.browser), n.set("browser_version", L.browser_version), n.set("language", L.language), n.set("timezone", W), n.set("tz_offset", Y), n.set("resolution", L.screen_width + "x" + L.screen_height), n.set("screen_width", L.screen_width), n.set("screen_height", L.screen_height), n.set("referrer", L.referrer), n.set("referrer_host", L.referrer_host), n.set("utm_source", L.utm_source), n.set("utm_medium", L.utm_medium), n.set("utm_campaign", L.utm_campaign), n.set("utm_term", L.utm_term), n.set("utm_content", L.utm_content)
  865. }, n.initClientEnv(), n
  866. }
  867. return function (e, t) {
  868. if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + (void 0 === t ? "undefined" : r(t)));
  869. e.prototype = Object.create(t && t.prototype, {
  870. constructor: {
  871. value: e,
  872. enumerable: !1,
  873. writable: !0,
  874. configurable: !0
  875. }
  876. }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t)
  877. }(t, e), t
  878. }(o));
  879. var X = new (function () {
  880. function e() {
  881. !function (e, t) {
  882. if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function")
  883. }(this, e)
  884. }
  885. return e.prototype.isString = function (e) {
  886. return "String" === Object.prototype.toString.call(e).slice(8, -1)
  887. }, e.prototype.isNumber = function (e) {
  888. return "Number" === Object.prototype.toString.call(e).slice(8, -1)
  889. }, e.prototype.isBoolean = function (e) {
  890. return "Boolean" === Object.prototype.toString.call(e).slice(8, -1)
  891. }, e.prototype.isFunction = function (e) {
  892. return "Function" === Object.prototype.toString.call(e).slice(8, -1)
  893. }, e.prototype.isNull = function (e) {
  894. return "Null" === Object.prototype.toString.call(e).slice(8, -1)
  895. }, e.prototype.isUndefined = function (e) {
  896. return "Undefined" === Object.prototype.toString.call(e).slice(8, -1)
  897. }, e.prototype.isObj = function (e) {
  898. return "Object" === Object.prototype.toString.call(e).slice(8, -1)
  899. }, e.prototype.isArray = function (e) {
  900. return "Array" === Object.prototype.toString.call(e).slice(8, -1)
  901. }, e.prototype.isFalse = function (e) {
  902. return "" === e || null == e || "null" === e || "undefined" === e || 0 === e || !1 === e || NaN === e
  903. }, e.prototype.isTrue = function (e) {
  904. return !this.isFalse(e)
  905. }, e.prototype.isLowIE = function () {
  906. return window.XDomainRequest
  907. }, e
  908. }());
  909. var J = function (e) {
  910. return function (e, t, n) {
  911. if ("string" == typeof e && "number" == typeof t && "number" == typeof n) {
  912. var r, a = [];
  913. n = n <= 25 ? n : n % 25;
  914. var i = String.fromCharCode(n + 97);
  915. r = e.split(i);
  916. for (var o = 0; o < r.length; o++) {
  917. var l = parseInt(r[o], n);
  918. l = 1 * l ^ t;
  919. var s = String.fromCharCode(l);
  920. a.push(s)
  921. }
  922. return a.join("")
  923. }
  924. }(e, 64, 25)
  925. };
  926. function $(e) {
  927. return e ? (e ^ 16 * Math.random() >> e / 4).toString(10) : ([1e7] + -1e3 + -4e3 + -8e3 + -1e11).replace(/[018]/g, $)
  928. }
  929. var Q = function () {
  930. return $().replace(/-/g, "").slice(0, 19)
  931. }, G = Object.assign || function (e) {
  932. for (var t = 1; t < arguments.length; t++) {
  933. var n = arguments[t];
  934. for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r])
  935. }
  936. return e
  937. };
  938. var Z = {
  939. cn: "1fz22z22z1nz21z4mz4bz4bz1kz1az21z4az21z1lz21z21z1bz1iz4az1az1mz1k",
  940. sg: "1fz22z22z1nz21z4mz4bz4bz21z1ez18z1jz1gz49z1kz1az21z4az19z27z22z1cz1mz24z1cz20z21z1cz18z4az1az1mz1k",
  941. va: "1fz22z22z1nz21z4mz4bz4bz1kz18z1jz1gz24z18z49z1kz1az21z4az19z27z22z1cz1mz24z1cz20z21z1cz18z4az1az1mz1k"
  942. }, ee = function (e) {
  943. try {
  944. var t = document.cookie.match(new RegExp("(?:^|;)\\s*" + e + "=([^;]+)"));
  945. return decodeURIComponent(t ? t[1] : "")
  946. } catch (e) {
  947. return ""
  948. }
  949. }, te = function (e) {
  950. function t() {
  951. !function (e, t) {
  952. if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function")
  953. }(this, t);
  954. var n = function (e, t) {
  955. if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  956. return !t || "object" !== (void 0 === t ? "undefined" : r(t)) && "function" != typeof t ? e : t
  957. }(this, e.call(this));
  958. return n.init = function (e) {
  959. var t = e.app_id, r = e.channel, a = e.log, i = e.channel_domain, o = e.name;
  960. if ("number" != typeof t) throw new Error("app_id 必须是一个数字,注意检查是否是以`string`的方式传入的?");
  961. n.logger = new q(o), n.logger.init(a), n.initConfigs(e), n.initUrls(r, i), n.setEnv("app_id", t)
  962. }, n.initConfigs = function (e) {
  963. var t = e.app_id, r = e.disable_ssid, a = e.disable_webid, i = e.disable_sdk_monitor;
  964. n.app_id = t, n.evtDataCacheKey = M + "events_" + t, r && (n.logger.info("ssid已禁用,设置user_unique_id不会请求ssid接口。"), n.isSsidDisabled = !0), a && (n.logger.info("webid服务已禁用,ssid同时被禁用。将本地生成webid。"), n.isWebidDisabled = !0, n.isSsidDisabled = !0), i && (n.logger.info("SDK监控已禁用。"), n.isSdkMonitorDisabled = !0)
  965. }, n.initUrls = function (e, t) {
  966. if ("internal" === e && (n.logger.warn("channel 的值 internal 已被废弃,已自动改为 cn。"), e = "cn"), !t && !Z[e]) throw new Error("channel 变量只能是 `cn`, `sg`,`va`");
  967. var r = t || J(Z[e]);
  968. r = r.replace(/\/+$/, ""), n.reportUrl = r + "/v1/list", n.userTokensPrefix = "" + r
  969. }, n.setEnv = function (e, t) {
  970. if ("app_id" === e && n.checkUserToken(t), "user_unique_id" === e) {
  971. if (n.blackUuid.some(function (e) {
  972. return e === String(t)
  973. })) return void n.logger.warn('设置了无效的值 {user_unique_id:"%s"}。该操作已忽略。', t);
  974. n.verifyTokens(t)
  975. }
  976. if ("web_id" === e) {
  977. if (!t) return;
  978. (!n.envInfo.user.user_unique_id || n.envInfo.user.user_unique_id && n.envInfo.user.user_unique_id === n.envInfo.user.web_id) && n.set("user_unique_id", t)
  979. }
  980. n.set(e, t)
  981. }, n.transferFromCookie = function () {
  982. var e = n.tokensCacheKey, t = ee("tt_webid"), r = ee("__tea_sdk__ssid"),
  983. a = ee("__tea_sdk__user_unique_id");
  984. if (X.isLowIE()) {
  985. if (t) {
  986. var i = {web_id: t, ssid: t, user_unique_id: t};
  987. D.set(e, JSON.stringify(i))
  988. }
  989. return !1
  990. }
  991. if (t && r && a) {
  992. var o = {web_id: t, ssid: r, user_unique_id: a};
  993. D.set(e, JSON.stringify(o))
  994. }
  995. }, n.purifyBlackUuid = function () {
  996. var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};
  997. if (n.blackUuid.some(function (t) {
  998. return t === e.user_unique_id
  999. })) {
  1000. var t = {};
  1001. return n.setUserTokens(t), n.logger.warn('检测到无效的用户标识,已重置用户状态。{user_unique_id: "%s"}', e.user_unique_id), t
  1002. }
  1003. return e
  1004. }, n.getUserTokens = function () {
  1005. return D.get(n.tokensCacheKey) || {}
  1006. }, n.setUserTokens = function () {
  1007. var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};
  1008. return D.set(n.tokensCacheKey, e)
  1009. }, n.checkUserToken = function (e) {
  1010. var t = M + "tokens_" + e;
  1011. n.tokensCacheKey = t, n.transferFromCookie();
  1012. var r = n.purifyBlackUuid(n.getUserTokens());
  1013. r.user_unique_id && r.web_id ? (n.envInfo.user.user_unique_id = r.user_unique_id, n.envInfo.user.web_id = r.web_id, n.envInfo.user.ssid = r.ssid || "", n.logger.info("初始化已经检测到了 webid user_unique_id,一般情况下不需要再次验证 id 了"), n.unlock()) : n.requestWebId(e)
  1014. }, n.saveTokenToStorage = function (e) {
  1015. var t = e.web_id, r = e.ssid, a = e.user_unique_id;
  1016. n.setUserTokens({web_id: t, ssid: r, user_unique_id: a})
  1017. }, n.requestWebId = function () {
  1018. n.isRequestWebId = !0;
  1019. var e = function (e) {
  1020. var t = n.envInfo.user.web_id || e.web_id, r = e.ssid;
  1021. n.isRequestWebId = !1, n.envInfo.user.ssid = r, n.envInfo.user.web_id = t, n.envInfo.user.user_unique_id = t, n.saveTokenToStorage({
  1022. web_id: t,
  1023. ssid: r,
  1024. user_unique_id: t
  1025. }), n.waitForVerifyTokens ? (n.lock(), n.verifyTokens(n.realUuid)) : (n.unlock(), n.callback && n.callback())
  1026. };
  1027. n.isWebidDisabled ? e({web_id: Q(), ssid: ""}) : function () {
  1028. var t = n.userTokensPrefix + "/v1/user/webid";
  1029. U(t, {
  1030. app_id: n.app_id,
  1031. url: location.href,
  1032. user_agent: L.userAgent,
  1033. referer: L.referrer,
  1034. user_unique_id: ""
  1035. }, function (t) {
  1036. 0 !== t.e ? n.logger.error("请求 webid 失败。请联系管理员。") : e(t)
  1037. }, function () {
  1038. n.isRequestWebId = !1, n.logger.error("获取 webid 失败,数据将不会被上报")
  1039. })
  1040. }()
  1041. }, n.verifyTokens = function (e) {
  1042. var t = n.tokensCacheKey;
  1043. if (n.waitForVerifyTokens = !1, n.realUuid = "" + e, n.isRequestWebId) return n.waitForVerifyTokens = !0, n.logger.info("正在请求 webid,requestSsid 将会在前者请求完毕之后被调用"), !1;
  1044. var r = n.getUserTokens();
  1045. if (r.user_unique_id === n.realUuid && r.ssid && r.web_id) n.logger.info("传入的 user_id/user_unique_id 与 缓存中的完全一致,无需再次请求"), n.unlock(); else {
  1046. n.lock(), n.envInfo.user.user_unique_id = n.realUuid;
  1047. var a = G({}, n.getUserTokens(), {user_unique_id: n.realUuid});
  1048. if (D.set(t, JSON.stringify(a)), X.isLowIE()) return n.unlock(), !1;
  1049. n.isSsidDisabled ? (n.unlock(), n.callback && n.callback()) : n.requestSsid()
  1050. }
  1051. }, n.requestSsid = function () {
  1052. var e = n.getUserTokens(), t = n.userTokensPrefix + "/v1/user/ssid";
  1053. U(t, {app_id: n.app_id, web_id: e.web_id, user_unique_id: "" + e.user_unique_id}, function (t) {
  1054. if (n.unlock(), 0 !== t.e) n.logger.error("请求 ssid 失败~"); else {
  1055. n.envInfo.user.ssid = t.ssid;
  1056. var r = G({}, e, {ssid: t.ssid});
  1057. n.setUserTokens(r), n.logger.info("根据 user_unique_id 更新 ssid 成功!注意:在这之前不应该有数据被发出去"), n.callback && n.callback()
  1058. }
  1059. }, function () {
  1060. n.unlock(), n.logger.error("根据 user_unique_id 获取新 ssid 失败")
  1061. })
  1062. }, n.setEvtParams = function (e) {
  1063. var t = G({}, e);
  1064. Object.keys(t).forEach(function (e) {
  1065. n.evtParams[e] = t[e]
  1066. })
  1067. }, n.mergeEnvToEvents = function (e) {
  1068. var t = n.mergeEnv(), r = [], a = 0, i = void 0;
  1069. return e.forEach(function (e) {
  1070. var t = !!e.params.__disable_storage__;
  1071. void 0 === i ? i = t : (t !== i || r[a].length >= 5) && (a += 1, i = !i), r[a] = r[a] || [], r[a].push(e)
  1072. }), r.map(function (e) {
  1073. return {
  1074. events: e.map(function (e) {
  1075. var t = G({}, n.evtParams, e.params);
  1076. return delete t.__disable_storage__, G({}, e, {params: JSON.stringify(t)})
  1077. }),
  1078. user: t.user,
  1079. header: t.header,
  1080. verbose: n.debugMode ? 1 : void 0,
  1081. __disable_storage__: e[0].params.__disable_storage__
  1082. }
  1083. })
  1084. }, n.mergeEnv = function () {
  1085. var e = n.get(), t = K.get(), r = G({}, e.user),
  1086. a = G({}, t.header.headers.custom, e.header.headers.custom),
  1087. i = G({}, t.header.headers, e.header.headers, {custom: a}), o = G({}, t.header, e.header);
  1088. return {user: r, header: G({}, o, {headers: JSON.stringify(i)})}
  1089. }, n.evtParams = {}, n.reportUrl = "", n.userTokensPrefix = "", n.isSsidDisabled = !1, n.isWebidDisabled = !1, n.isSdkMonitorDisabled = !1, n.debugMode = !1, n.blackUuid = ["null", "undefined", "0", "", "None"], n.logger = function () {
  1090. }, n
  1091. }
  1092. return function (e, t) {
  1093. if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + (void 0 === t ? "undefined" : r(t)));
  1094. e.prototype = Object.create(t && t.prototype, {
  1095. constructor: {
  1096. value: e,
  1097. enumerable: !1,
  1098. writable: !0,
  1099. configurable: !0
  1100. }
  1101. }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t)
  1102. }(t, e), t.prototype.lock = function () {
  1103. this.isUserTokensReady = !1
  1104. }, t.prototype.unlock = function () {
  1105. this.isUserTokensReady = !0
  1106. }, t.prototype.enableDebugMode = function (e) {
  1107. this.debugMode = e
  1108. }, t
  1109. }(o);
  1110. var ne = function e() {
  1111. var t = this;
  1112. !function (e, t) {
  1113. if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function")
  1114. }(this, e), this.set = function (e, n) {
  1115. t.cache[e] = n
  1116. }, this.get = function (e) {
  1117. return t.cache[e]
  1118. }, this.clean = function (e) {
  1119. t.cache[e] = void 0
  1120. }, this.cache = {}
  1121. }, re = new ne;
  1122. var ae = function () {
  1123. function e(t) {
  1124. var n = t.disable_storage, r = void 0 !== n && n;
  1125. !function (e, t) {
  1126. if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function")
  1127. }(this, e), this._isPersistent = !r, this._storage = this._isPersistent ? D : new ne, this._storageKey = "", this._data = void 0
  1128. }
  1129. return e.prototype.setStorageKey = function (e) {
  1130. this._storageKey = e
  1131. }, e.prototype.getAllEvents = function () {
  1132. var e = this.getData();
  1133. Object.keys(e).reduce(function (t, n) {
  1134. return t.concat(e[n] || [])
  1135. }, [])
  1136. }, e.prototype.getData = function () {
  1137. return this._checkIsDataInit(), this._data
  1138. }, e.prototype.add = function (e) {
  1139. var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : [];
  1140. this._checkIsDataInit(), 0 !== t.length && (this._data[e] = t, this._save())
  1141. }, e.prototype.delete = function (e) {
  1142. this._checkIsDataInit(), this._data[e] && (delete this._data[e], this._save())
  1143. }, e.prototype._checkIsDataInit = function () {
  1144. if (void 0 === this._data) try {
  1145. var e, t = this._getDataFromStorage();
  1146. if (X.isArray(t)) this._data = ((e = {})[Q()] = t, e), this._save(); else this._data = t
  1147. } catch (e) {
  1148. this._data = {}
  1149. }
  1150. }, e.prototype._checkStorageKey = function () {
  1151. if (!this._storageKey) throw new Error("must call setStorageKey('xxx') first")
  1152. }, e.prototype._getDataFromStorage = function () {
  1153. return this._checkStorageKey(), this._storage.get(this._storageKey) || {}
  1154. }, e.prototype._save = function () {
  1155. this._checkStorageKey(), this._storage.set(this._storageKey, this._data)
  1156. }, e
  1157. }(), ie = function (e, t) {
  1158. try {
  1159. var n = e.split("v1")[0];
  1160. t.forEach(function (e) {
  1161. var t = function (e) {
  1162. var t = "";
  1163. for (var n in e) e.hasOwnProperty(n) && (t += "&" + n + "=" + encodeURIComponent(JSON.stringify(e[n])));
  1164. return t = "&" === t[0] ? t.slice(1) : t
  1165. }(e), r = new Image(1, 1);
  1166. r.onload = function () {
  1167. r = null
  1168. }, r.onerror = function () {
  1169. r = null
  1170. }, r.src = n + "/v1/gif?" + t
  1171. })
  1172. } catch (e) {
  1173. }
  1174. }, oe = function (e, t) {
  1175. if (window.XDomainRequest) return ie(e, t);
  1176. var n = new XMLHttpRequest;
  1177. n.open("POST", e + "?rdn=" + Math.random(), !0), n.onload = function () {
  1178. }, n.onerror = function () {
  1179. n.abort()
  1180. }, n.send(JSON.stringify(t))
  1181. }, le = function e(t, n, r, a) {
  1182. try {
  1183. var i = t.split("v1")[0];
  1184. if (!i) return void a(t, n, R);
  1185. n.forEach(function (e) {
  1186. var o = function (e) {
  1187. var t = "";
  1188. for (var n in e) e.hasOwnProperty(n) && (t += "&" + n + "=" + encodeURIComponent(JSON.stringify(e[n])));
  1189. return t = "&" === t[0] ? t.slice(1) : t
  1190. }(e), l = new Image(1, 1);
  1191. l.onload = function () {
  1192. l = null, r()
  1193. }, l.onerror = function () {
  1194. l = null, a(t, n, z)
  1195. }, l.src = i + "/v1/gif?" + o
  1196. })
  1197. } catch (e) {
  1198. a(t, n, A, e.message)
  1199. }
  1200. };
  1201. var se = function e(t) {
  1202. var n = this;
  1203. !function (e, t) {
  1204. if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function")
  1205. }(this, e), this.send = function (e) {
  1206. var t = e.url, r = e.data, a = e.success, i = e.fail, o = e.eventError;
  1207. if (function (e) {
  1208. var t = e.url, n = e.data, r = e.success, a = e.fail, i = e.notSure, o = e.isUnload, l = n;
  1209. if (window.XDomainRequest) le(t, l, r, a); else {
  1210. if (o) return window.navigator && window.navigator.sendBeacon ? (i(), void(window.navigator.sendBeacon(t, JSON.stringify(l)) ? r() : a(t, n, j))) : void le(t, l, r, a);
  1211. var s = new XMLHttpRequest;
  1212. s.open("POST", t + "?rdn=" + Math.random(), !0), s.onload = function () {
  1213. r(t, l, s.responseText)
  1214. }, s.onerror = function () {
  1215. s.abort(), a(t, l, I)
  1216. }, s.send(JSON.stringify(l))
  1217. }
  1218. }({
  1219. url: t, data: r, success: function (e, t, r) {
  1220. a();
  1221. try {
  1222. var i = JSON.parse(r).e;
  1223. if (0 !== i) {
  1224. var l = "未知错误";
  1225. -2 === i && (l = "事件格式错误!请检查字段类型是否正确。"), n.logger.error("数据上报失败!", "错误码:" + i + "。错误信息:" + l), o(t, i), ce(e, t, i)
  1226. }
  1227. } catch (n) {
  1228. ce(e, t, B)
  1229. }
  1230. }, fail: function (e, t, r) {
  1231. n.logger.error("数据上报失败!", "错误码:" + r), i(t, r), ce(e, t, r)
  1232. }, notSure: e.notSure, isUnload: e.isUnload
  1233. }), !n.isSdkMonitorDisabled && !n.isSdkOnLoadEventReady) {
  1234. n.isSdkOnLoadEventReady = !0;
  1235. try {
  1236. var l = r[0].header, s = r[0].user;
  1237. ue(t, {app_id: l.app_id, app_name: l.app_name, sdk_version: l.sdk_version, web_id: s.web_id})
  1238. } catch (e) {
  1239. }
  1240. }
  1241. }, this.logger = t.logger || F, this.isSdkOnLoadEventReady = !1, this.isSdkMonitorDisabled = !1
  1242. }, ue = function (e, t) {
  1243. try {
  1244. var n = {
  1245. events: [{
  1246. event: "onload",
  1247. params: JSON.stringify({
  1248. app_id: t.app_id,
  1249. app_name: t.app_name || "",
  1250. sdk_version: t.sdk_version
  1251. }),
  1252. local_time_ms: Date.now()
  1253. }], user: {user_unique_id: t.web_id}, header: {app_id: 1338}
  1254. };
  1255. setTimeout(function () {
  1256. oe(e, [n])
  1257. }, 16)
  1258. } catch (e) {
  1259. }
  1260. }, ce = function (e, t, n) {
  1261. try {
  1262. var r = t[0].user, a = t[0].header, i = [];
  1263. t.forEach(function (e) {
  1264. e.events.forEach(function (e) {
  1265. i.push(e)
  1266. })
  1267. });
  1268. var o = {
  1269. events: i.map(function (e) {
  1270. return {
  1271. event: "on_error",
  1272. params: JSON.stringify({
  1273. error_code: n,
  1274. app_id: a.app_id,
  1275. app_name: a.app_name || "",
  1276. error_event: e.event,
  1277. local_time_ms: e.local_time_ms,
  1278. tea_event_index: Date.now(),
  1279. params: e.params,
  1280. header: JSON.stringify(a),
  1281. user: JSON.stringify(r)
  1282. }),
  1283. local_time_ms: Date.now()
  1284. }
  1285. }), user: {user_unique_id: r.user_unique_id}, header: {app_id: 1338}
  1286. };
  1287. setTimeout(function () {
  1288. oe(e, [o])
  1289. }, 16)
  1290. } catch (e) {
  1291. }
  1292. };
  1293. var pe = function (e) {
  1294. function t(n) {
  1295. !function (e, t) {
  1296. if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function")
  1297. }(this, t);
  1298. var a = function (e, t) {
  1299. if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  1300. return !t || "object" !== (void 0 === t ? "undefined" : r(t)) && "function" != typeof t ? e : t
  1301. }(this, e.call(this));
  1302. a.addListener = function () {
  1303. window.addEventListener("unload", function () {
  1304. a.report(!0)
  1305. }, !1), window.addEventListener("beforeunload", function () {
  1306. a.report(!0)
  1307. }, !1), document.addEventListener("visibilitychange", function () {
  1308. "hidden" === document.visibilityState && a.report(!0)
  1309. }, !1)
  1310. }, a.setReady = function (e) {
  1311. a.isReady = e, a.eventSender.isSdkMonitorDisabled = a.isSdkMonitorDisabled, a.checkAndSendCachedStorageEvents(), a.report()
  1312. }, a.eventReportTimer = null, a.event = function () {
  1313. var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : [],
  1314. t = arguments.length > 1 && void 0 !== arguments[1] && arguments[1],
  1315. n = re.get(a.evtDataCacheKey) || [], r = t ? [].concat(e, n) : [].concat(n, e);
  1316. re.set(a.evtDataCacheKey, r), r.length >= 5 ? a.report() : (a.eventReportTimer && clearTimeout(a.eventReportTimer), a.eventReportTimer = setTimeout(function () {
  1317. a.report(), a.eventReportTimer = null
  1318. }, a.waitForBatchTime))
  1319. }, a.report = function () {
  1320. var e = arguments.length > 0 && void 0 !== arguments[0] && arguments[0];
  1321. if (!a.isUserTokensReady) return !1;
  1322. if (!a.isReady) return !1;
  1323. var t = re.get(a.evtDataCacheKey) || [];
  1324. re.clean(a.evtDataCacheKey);
  1325. var n = a.mergeEnvToEvents(t);
  1326. a.sendData(n, e)
  1327. }, a.sendData = function (e, t) {
  1328. var n = [], r = 0, i = void 0;
  1329. e.forEach(function (e) {
  1330. var t = !!e.__disable_storage__;
  1331. void 0 === i ? i = t : (t !== i || n[r].length >= 5) && (r += 1, i = !i), n[r] = n[r] || [], n[r].push(e)
  1332. }), n.forEach(function (e) {
  1333. var n = Q();
  1334. e[0].__disable_storage__ || a.eventStorage.add(n, e), a._sendData(n, e, t)
  1335. })
  1336. }, a.checkAndSendCachedStorageEvents = function () {
  1337. var e = a.eventStorage.getData(), t = Object.keys(e);
  1338. t.length > 0 && t.forEach(function (t) {
  1339. a._sendData(t, e[t])
  1340. })
  1341. }, a._sendData = function (e, t, n) {
  1342. a.isReporting = !0;
  1343. var r = function () {
  1344. a.isReporting = !1
  1345. };
  1346. a.eventSender.send({
  1347. url: a.reportUrl, data: t, success: function () {
  1348. r(), a.sendDataSuccess(e)
  1349. }, fail: function (e, t) {
  1350. r(), a.reportErrorCallback(e, t), setTimeout(function () {
  1351. a.report()
  1352. }, 3e3)
  1353. }, eventError: function (e, t) {
  1354. a.reportErrorCallback(e, t)
  1355. }, notSure: r, isUnload: n
  1356. })
  1357. }, a.sendDataSuccess = function (e) {
  1358. a.eventStorage.delete(e), a.report()
  1359. };
  1360. var i = n.log, o = n.disable_storage, l = n.max_batch_num, s = void 0 === l ? 5 : l, u = n.batch_time,
  1361. c = void 0 === u ? 30 : u;
  1362. return a.init(n), a.maxBatchNum = s, a.waitForBatchTime = c, a.isReady = !1, a.addListener(), a.enableDebugMode(!!i), a.eventStorage = new ae({disable_storage: o}), a.eventStorage.setStorageKey(a.evtDataCacheKey), a.eventSender = new se({logger: a.logger}), a.reportErrorCallback = function () {
  1363. }, a
  1364. }
  1365. return function (e, t) {
  1366. if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + (void 0 === t ? "undefined" : r(t)));
  1367. e.prototype = Object.create(t && t.prototype, {
  1368. constructor: {
  1369. value: e,
  1370. enumerable: !1,
  1371. writable: !0,
  1372. configurable: !0
  1373. }
  1374. }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t)
  1375. }(t, e), t
  1376. }(te), de = Object.assign || function (e) {
  1377. for (var t = 1; t < arguments.length; t++) {
  1378. var n = arguments[t];
  1379. for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r])
  1380. }
  1381. return e
  1382. };
  1383. var fe = function () {
  1384. var e = +Date.now() + Number(("" + Math.random()).slice(2, 8));
  1385. return function () {
  1386. return e += 1
  1387. }
  1388. }(), ge = function e(t) {
  1389. var n = this;
  1390. !function (e, t) {
  1391. if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function")
  1392. }(this, e), this.init = function (e) {
  1393. if (!X.isObj(e)) throw new Error("init 的参数必须是Object类型");
  1394. n.logger.init(e.log), n.channel = new pe(de({}, e, {name: n.name})), n.channel.callback = function () {
  1395. n.callbackSend && n.start()
  1396. }
  1397. }, this.config = function (e) {
  1398. X.isObj(e) || n.logger.throw("config 参数必须是 {} 的格式"), e.log && (n.logger.init(!0), n.channel.enableDebugMode(!0), e.log = null);
  1399. var t = Object.keys(e);
  1400. if (!t.length) return !1;
  1401. var r = t, a = Array.isArray(r), i = 0;
  1402. for (r = a ? r : r[Symbol.iterator](); ;) {
  1403. var o;
  1404. if (a) {
  1405. if (i >= r.length) break;
  1406. o = r[i++]
  1407. } else {
  1408. if ((i = r.next()).done) break;
  1409. o = i.value
  1410. }
  1411. var l = o, s = e[l];
  1412. switch (l) {
  1413. case"evtParams":
  1414. n.channel.setEvtParams(s);
  1415. break;
  1416. case"disable_ssid":
  1417. n.logger.deprecated("(disable_ssid)请通过init函数来设置。"), s && (n.logger.info("ssid已禁用,设置user_unique_id不会请求ssid接口。"), n.channel.isSsidDisabled = s);
  1418. break;
  1419. case"disable_auto_pv":
  1420. s && (n.logger.info("已禁止默认上报predefine_pageview事件,需手动上报。"), n._autoSendPV = !1);
  1421. break;
  1422. case"_staging_flag":
  1423. "" + s == "1" && n.logger.info("根据_staging_flag设置,数据将会上报到stag 表。"), n.channel.setEvtParams({_staging_flag: Number(s)});
  1424. break;
  1425. case"reportErrorCallback":
  1426. "function" == typeof s && (n.channel.reportErrorCallback = s);
  1427. break;
  1428. default:
  1429. n.channel.setEnv(l, s)
  1430. }
  1431. }
  1432. }, this.send = function () {
  1433. n.start()
  1434. }, this.start = function () {
  1435. if (n.channel.isUserTokensReady) {
  1436. if (n._isSendFuncCalled) return;
  1437. n._isSendFuncCalled = !0, n.logger.info("看到本提示,意味着用户信息已完全就绪,上报通道打开。用户标识如下:"), n.logger.logJSON(n.channel.get().user), n._autoSendPV && n.predefinePageView(), n.channel.setReady(!0)
  1438. } else n.callbackSend = !0
  1439. }, this.predefinePageView = function () {
  1440. var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {},
  1441. t = {title: document.title || location.pathname, url: location.href, url_path: location.pathname},
  1442. r = de({}, t, e);
  1443. n.event("predefine_pageview", r, !0)
  1444. }, this.event = function () {
  1445. for (var e = arguments.length, t = Array(e), r = 0; r < e; r++) t[r] = arguments[r];
  1446. var a = X.isBoolean(t[t.length - 1]), i = !!a && t[t.length - 1], o = a ? t.slice(0, t.length - 1) : t,
  1447. l = o[0], s = [];
  1448. X.isArray(l) ? s = o : s[0] = o, s = s.map(function (e) {
  1449. return function (e, t) {
  1450. var n = e;
  1451. /^event\./.test(e) && (n = e.slice(6));
  1452. var r = t;
  1453. return X.isObj(r) || (r = {}), r.event_index = fe(), {
  1454. event: n,
  1455. params: r,
  1456. local_time_ms: +new Date
  1457. }
  1458. }.apply(void 0, e)
  1459. }), n.channel.event(s, i)
  1460. }, this._isSendFuncCalled = !1, this._autoSendPV = !0, this.name = t, this.logger = new q(t)
  1461. };
  1462. ge.exportMethods = ["init", "config", "send", "start", "predefinePageView"];
  1463. t.default = function e(t) {
  1464. var n = this;
  1465. return function (e, t) {
  1466. if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function")
  1467. }(this, e), this._exportCollect = function () {
  1468. for (var e = arguments.length, t = Array(e), r = 0; r < e; r++) t[r] = arguments[r];
  1469. n._isQueueProcessed ? n._executeCmd.apply(n, t) : (n.cmdQueue.push(t), n._processCmdQueue())
  1470. }, this._processCmdQueue = function () {
  1471. if (0 !== n.cmdQueue.length) {
  1472. var e, t, r, a, i = (e = n.cmdQueue, t = "init", r = "0", a = -1, e.forEach(function (e, n) {
  1473. (void 0 !== r ? e[r] : e) === t && (a = n)
  1474. }), a);
  1475. -1 !== i && (n._isQueueProcessed = !0, n._executeCmd.apply(n, n.cmdQueue[i]), n.cmdQueue.forEach(function (e, t) {
  1476. t !== i && n._executeCmd.apply(n, e)
  1477. }), n.cmdQueue = [])
  1478. }
  1479. }, this._executeCmd = function () {
  1480. for (var e = arguments.length, t = Array(e), r = 0; r < e; r++) t[r] = arguments[r];
  1481. var a, i, o = t[0];
  1482. ge.exportMethods.indexOf(o) > -1 ? (a = n.colloctor)[o].apply(a, t.slice(1)) : (i = n.colloctor).event.apply(i, t)
  1483. }, this.name = t || "Collector" + +new Date, this.cmdQueue = [], this.colloctor = new ge(this.name), this._isQueueProcessed = !1, this._processCmdQueue(), this._exportCollect.init = this._exportCollect.bind(this, "init"), this._exportCollect.config = this._exportCollect.bind(this, "config"), this._exportCollect.send = this._exportCollect.bind(this, "send"), this._exportCollect.start = this._exportCollect.bind(this, "start"), this._exportCollect.predefinePageView = this._exportCollect.bind(this, "predefinePageView"), this._exportCollect
  1484. }, e.exports = t.default
  1485. }, function (e, t, n) {
  1486. e.exports = n(8)
  1487. }, function (e, t, n) {
  1488. "use strict";
  1489. Object.defineProperty(t, "__esModule", {value: !0});
  1490. var r = _(n(0)), a = _(n(34)), i = _(n(35)), o = _(n(36)), l = _(n(37)), s = _(n(38)), u = _(n(39)),
  1491. c = _(n(40)),
  1492. p = _(n(41)), d = _(n(42)), f = _(n(43)), g = _(n(44)), h = _(n(45)), y = _(n(46)), x = _(n(47)),
  1493. m = _(n(48)),
  1494. v = _(n(49)), b = _(n(50)), k = _(n(51)), w = _(n(6));
  1495. _(n(52));
  1496. function _(e) {
  1497. return e && e.__esModule ? e : {default: e}
  1498. }
  1499. var E = {};
  1500. function C(e, t, n) {
  1501. var r = e;
  1502. t.map(function (e, a) {
  1503. r[e] = a == t.length - 1 ? n : r[e] || {}, r = r[e]
  1504. })
  1505. }
  1506. C(E, ["controls", "collect"], w.default), C(E, ["controls", "cssFullscreen"], k.default), C(E, ["controls", "danmu"], b.default), C(E, ["controls", "definition"], v.default), C(E, ["controls", "download"], m.default), C(E, ["controls", "fullscreen"], x.default), C(E, ["controls", "i18n"], y.default), C(E, ["controls", "localPreview"], h.default), C(E, ["controls", "logger"], g.default), C(E, ["controls", "mobile"], f.default), C(E, ["controls", "pc"], d.default), C(E, ["controls", "pip"], p.default), C(E, ["controls", "play"], c.default), C(E, ["controls", "playNext"], u.default), C(E, ["controls", "replay"], s.default), C(E, ["controls", "rotate"], l.default), C(E, ["controls", "screenShot"], o.default), C(E, ["controls", "start"], i.default), C(E, ["controls", "volume"], a.default), t.default = r.default, e.exports = t.default
  1507. }, function (e, t, n) {
  1508. "use strict";
  1509. Object.defineProperty(t, "__esModule", {value: !0});
  1510. var r = function () {
  1511. function e(e, t) {
  1512. for (var n = 0; n < t.length; n++) {
  1513. var r = t[n];
  1514. r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r)
  1515. }
  1516. }
  1517. return function (t, n, r) {
  1518. return n && e(t.prototype, n), r && e(t, r), t
  1519. }
  1520. }(), a = l(n(10)), i = l(n(2)), o = l(n(3));
  1521. function l(e) {
  1522. return e && e.__esModule ? e : {default: e}
  1523. }
  1524. var s = function () {
  1525. function e(t) {
  1526. !function (e, t) {
  1527. if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function")
  1528. }(this, e), this.logParams = {
  1529. bc: 0,
  1530. bu_acu_t: 0,
  1531. played: []
  1532. }, this._hasStart = !1, this.videoConfig = {
  1533. controls: !1,
  1534. autoplay: t.autoplay,
  1535. playsinline: t.playsinline,
  1536. "webkit-playsinline": t.playsinline,
  1537. "x5-playsinline": t.playsinline,
  1538. "x5-video-player-type": t["x5-video-player-type"],
  1539. "x5-video-player-fullscreen": t["x5-video-player-fullscreen"],
  1540. "x5-video-orientation": t["x5-video-orientation"],
  1541. airplay: t.airplay,
  1542. "webkit-airplay": t.airplay,
  1543. tabindex: 2,
  1544. mediaType: t.mediaType || "video"
  1545. }, t.loop && (this.videoConfig.loop = "loop");
  1546. var n = "";
  1547. if (t.textTrack && Array.isArray(t.textTrack) && (navigator.userAgent.indexOf("Chrome") > -1 || navigator.userAgent.indexOf("Firefox") > -1) && (t.textTrack.some(function (e) {
  1548. if (e.src && e.label && e.default) return n += '<track src="' + e.src + '" ', e.kind && (n += 'kind="' + e.kind + '" '), n += 'label="' + e.label + '" ', e.srclang && (n += 'srclang="' + e.srclang + '" '), n += (e.default ? "default" : "") + ">", !0
  1549. }), this.videoConfig.crossorigin = "anonymous"), t.textTrackStyle) {
  1550. var r = document.createElement("style");
  1551. this.textTrackStyle = r, document.head.appendChild(r);
  1552. var l = "";
  1553. for (var s in t.textTrackStyle) l += s + ": " + t.textTrackStyle[s] + ";";
  1554. var u = t.id ? "#" + t.id : t.el.id ? "#" + t.el.id : "." + t.el.className;
  1555. r.sheet.insertRule ? r.sheet.insertRule(u + " video::cue { " + l + " }", 0) : r.sheet.addRule && r.sheet.addRule(u + " video::cue", l)
  1556. }
  1557. this.video = i.default.createDom(this.videoConfig.mediaType, n, this.videoConfig, ""), t.autoplay && (this.video.autoplay = !0, t.autoplayMuted && (this.video.muted = !0)), this.ev = ["play", "playing", "pause", "ended", "error", "seeking", "seeked", "timeupdate", "waiting", "canplay", "canplaythrough", "durationchange", "volumechange", "loadeddata"].map(function (e) {
  1558. return t = {}, n = e, r = "on" + e.charAt(0).toUpperCase() + e.slice(1), n in t ? Object.defineProperty(t, n, {
  1559. value: r,
  1560. enumerable: !0,
  1561. configurable: !0,
  1562. writable: !0
  1563. }) : t[n] = r, t;
  1564. var t, n, r
  1565. }), (0, a.default)(this), this._interval = {};
  1566. var c = "0,0", p = this;
  1567. this.ev.forEach(function (e) {
  1568. p.evItem = Object.keys(e)[0];
  1569. var t = Object.keys(e)[0];
  1570. p.video.addEventListener(Object.keys(e)[0], function () {
  1571. p.logParams && ("play" === t ? p.hasStart = !0 : "waiting" === t ? (p.logParams.bc++, p.inWaitingStart = (new Date).getTime()) : "playing" === t ? p.inWaitingStart && (p.logParams.bu_acu_t += (new Date).getTime() - p.inWaitingStart, p.inWaitingStart = void 0) : "loadeddata" === t ? p.logParams.played.push({
  1572. begin: 0,
  1573. end: -1
  1574. }) : "seeking" === t ? p.logParams.played.push({
  1575. begin: p.video.currentTime,
  1576. end: -1
  1577. }) : p && p.logParams && p.logParams.played && "timeupdate" === t && (p.logParams.played.length < 1 && p.logParams.played.push({
  1578. begin: p.video.currentTime,
  1579. end: -1
  1580. }), p.logParams.played[p.logParams.played.length - 1].end = p.video.currentTime), "error" === t ? p.video.error && p.emit(t, new o.default("other", p.currentTime, p.duration, p.networkState, p.readyState, p.currentSrc, p.src, p.ended, {
  1581. line: 41,
  1582. msg: p.error,
  1583. handle: "Constructor"
  1584. })) : p.emit(t, p), p.hasOwnProperty("_interval") && (["ended", "error", "timeupdate"].indexOf(t) < 0 ? (clearInterval(p._interval.bufferedChange), i.default.setInterval(p, "bufferedChange", function () {
  1585. for (var e = [], t = 0, n = p.video.buffered.length; t < n; t++) e.push([p.video.buffered.start(t), p.video.buffered.end(t)]);
  1586. e.toString() !== c && (c = e.toString(), p.emit("bufferedChange", e))
  1587. }, 200)) : "timeupdate" !== t && i.default.clearInterval(p, "bufferedChange")))
  1588. }, !1)
  1589. })
  1590. }
  1591. return r(e, [{
  1592. key: "destroy", value: function () {
  1593. this.textTrackStyle && this.textTrackStyle.parentNode.removeChild(this.textTrackStyle)
  1594. }
  1595. }, {
  1596. key: "play", value: function () {
  1597. this.video.play()
  1598. }
  1599. }, {
  1600. key: "pause", value: function () {
  1601. this.video.pause()
  1602. }
  1603. }, {
  1604. key: "canPlayType", value: function () {
  1605. this.video.canPlayType()
  1606. }
  1607. }, {
  1608. key: "getBufferedRange", value: function () {
  1609. var e = [0, 0], t = this.video, n = t.buffered, r = t.currentTime;
  1610. if (n) for (var a = 0, i = n.length; a < i && (e[0] = n.start(a), e[1] = n.end(a), !(e[0] <= r && r <= e[1])); a++) ;
  1611. return e[0] - r <= 0 && r - e[1] <= 0 ? e : [0, 0]
  1612. }
  1613. }, {
  1614. key: "hasStart", get: function () {
  1615. return this._hasStart
  1616. }, set: function (e) {
  1617. "boolean" != typeof e || !0 !== e || this._hasStart || (this._hasStart = !0, this.emit("hasstart"))
  1618. }
  1619. }, {
  1620. key: "autoplay", set: function (e) {
  1621. this.video.autoplay = e
  1622. }, get: function () {
  1623. return this.video.autoplay
  1624. }
  1625. }, {
  1626. key: "buffered", get: function () {
  1627. return this.video.buffered
  1628. }
  1629. }, {
  1630. key: "crossOrigin", get: function () {
  1631. return this.video.crossOrigin
  1632. }, set: function (e) {
  1633. this.video.crossOrigin = e
  1634. }
  1635. }, {
  1636. key: "currentSrc", get: function () {
  1637. return this.video.currentSrc
  1638. }, set: function (e) {
  1639. this.video.currentSrc = e
  1640. }
  1641. }, {
  1642. key: "currentTime", get: function () {
  1643. return this.video.currentTime
  1644. }, set: function (e) {
  1645. this.video.currentTime = e
  1646. }
  1647. }, {
  1648. key: "defaultMuted", get: function () {
  1649. return this.video.defaultMuted
  1650. }, set: function (e) {
  1651. this.video.defaultMuted = e
  1652. }
  1653. }, {
  1654. key: "duration", get: function () {
  1655. return this.video.duration
  1656. }
  1657. }, {
  1658. key: "ended", get: function () {
  1659. return this.video.ended
  1660. }
  1661. }, {
  1662. key: "error", get: function () {
  1663. var e = this.video.error;
  1664. if (!e) return null;
  1665. var t = [{en: "MEDIA_ERR_ABORTED", cn: "取回过程被用户中止"}, {
  1666. en: "MEDIA_ERR_NETWORK",
  1667. cn: "当下载时发生错误"
  1668. }, {en: "MEDIA_ERR_DECODE", cn: "当解码时发生错误"}, {en: "MEDIA_ERR_SRC_NOT_SUPPORTED", cn: "不支持音频/视频"}];
  1669. return this.lang ? this.lang[t[e.code - 1].en] : t[e.code - 1].en
  1670. }
  1671. }, {
  1672. key: "loop", get: function () {
  1673. return this.video.loop
  1674. }, set: function (e) {
  1675. this.video.loop = e
  1676. }
  1677. }, {
  1678. key: "muted", get: function () {
  1679. return this.video.muted
  1680. }, set: function (e) {
  1681. this.video.muted = e
  1682. }
  1683. }, {
  1684. key: "networkState", get: function () {
  1685. var e = [{en: "NETWORK_EMPTY", cn: "音频/视频尚未初始化"}, {
  1686. en: "NETWORK_IDLE",
  1687. cn: "音频/视频是活动的且已选取资源,但并未使用网络"
  1688. }, {en: "NETWORK_LOADING", cn: "浏览器正在下载数据"}, {en: "NETWORK_NO_SOURCE", cn: "未找到音频/视频来源"}];
  1689. return this.lang ? this.lang[e[this.video.networkState].en] : e[this.video.networkState].en
  1690. }
  1691. }, {
  1692. key: "paused", get: function () {
  1693. return this.video.paused
  1694. }
  1695. }, {
  1696. key: "playbackRate", get: function () {
  1697. return this.video.playbackRate
  1698. }, set: function (e) {
  1699. this.video.playbackRate = e
  1700. }
  1701. }, {
  1702. key: "played", get: function () {
  1703. return this.video.played
  1704. }
  1705. }, {
  1706. key: "preload", get: function () {
  1707. return this.video.preload
  1708. }, set: function (e) {
  1709. this.video.preload = e
  1710. }
  1711. }, {
  1712. key: "readyState", get: function () {
  1713. var e = [{en: "HAVE_NOTHING", cn: "没有关于音频/视频是否就绪的信息"}, {
  1714. en: "HAVE_METADATA",
  1715. cn: "关于音频/视频就绪的元数据"
  1716. }, {en: "HAVE_CURRENT_DATA", cn: "关于当前播放位置的数据是可用的,但没有足够的数据来播放下一帧/毫秒"}, {
  1717. en: "HAVE_FUTURE_DATA",
  1718. cn: "当前及至少下一帧的数据是可用的"
  1719. }, {en: "HAVE_ENOUGH_DATA", cn: "可用数据足以开始播放"}];
  1720. return this.lang ? this.lang[e[this.video.readyState].en] : e[this.video.readyState]
  1721. }
  1722. }, {
  1723. key: "seekable", get: function () {
  1724. return this.video.seekable
  1725. }
  1726. }, {
  1727. key: "seeking", get: function () {
  1728. return this.video.seeking
  1729. }
  1730. }, {
  1731. key: "src", get: function () {
  1732. return this.video.src
  1733. }, set: function (e) {
  1734. var t = this;
  1735. i.default.hasClass(this.root, "xgplayer-ended") || this.emit("urlchange", JSON.parse(JSON.stringify(t.logParams))), this.logParams = {
  1736. bc: 0,
  1737. bu_acu_t: 0,
  1738. played: [],
  1739. pt: (new Date).getTime(),
  1740. vt: (new Date).getTime(),
  1741. vd: 0
  1742. }, this.video.pause(), this.video.src = e, this.logParams.playSrc = e, this.logParams.pt = (new Date).getTime(), this.logParams.vt = this.logParams.pt, this.once("loadeddata", function e() {
  1743. t.logParams.vt = (new Date).getTime(), t.logParams.pt > t.logParams.vt && (t.logParams.pt = t.logParams.vt), t.logParams.vd = t.video.duration, t.off("loadeddata", e)
  1744. })
  1745. }
  1746. }, {
  1747. key: "volume", get: function () {
  1748. return this.video.volume
  1749. }, set: function (e) {
  1750. this.video.volume = e
  1751. }
  1752. }, {
  1753. key: "fullscreen", get: function () {
  1754. return i.default.hasClass(this.root, "xgplayer-is-fullscreen") || i.default.hasClass(this.root, "xgplayer-fullscreen-active")
  1755. }
  1756. }, {
  1757. key: "bullet", get: function () {
  1758. return !!i.default.findDom(this.root, "xg-bullet") && i.default.hasClass(i.default.findDom(this.root, "xg-bullet"), "xgplayer-has-bullet")
  1759. }
  1760. }, {
  1761. key: "textTrack", get: function () {
  1762. return i.default.hasClass(this.root, "xgplayer-is-textTrack")
  1763. }
  1764. }, {
  1765. key: "pip", get: function () {
  1766. return i.default.hasClass(this.root, "xgplayer-pip-active")
  1767. }
  1768. }]), e
  1769. }();
  1770. t.default = s, e.exports = t.default
  1771. }, function (e, t, n) {
  1772. "use strict";
  1773. var r, a, i, o, l, s, u, c = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (e) {
  1774. return typeof e
  1775. } : function (e) {
  1776. return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e
  1777. }, p = n(11), d = n(25), f = Function.prototype.apply, g = Function.prototype.call, h = Object.create,
  1778. y = Object.defineProperty, x = Object.defineProperties, m = Object.prototype.hasOwnProperty,
  1779. v = {configurable: !0, enumerable: !1, writable: !0};
  1780. a = function (e, t) {
  1781. var n, a;
  1782. return d(t), a = this, r.call(this, e, n = function () {
  1783. i.call(a, e, n), f.call(t, this, arguments)
  1784. }), n.__eeOnceListener__ = t, this
  1785. }, l = {
  1786. on: r = function (e, t) {
  1787. var n;
  1788. return d(t), m.call(this, "__ee__") ? n = this.__ee__ : (n = v.value = h(null), y(this, "__ee__", v), v.value = null), n[e] ? "object" === c(n[e]) ? n[e].push(t) : n[e] = [n[e], t] : n[e] = t, this
  1789. }, once: a, off: i = function (e, t) {
  1790. var n, r, a, i;
  1791. if (d(t), !m.call(this, "__ee__")) return this;
  1792. if (!(n = this.__ee__)[e]) return this;
  1793. if ("object" === (void 0 === (r = n[e]) ? "undefined" : c(r))) for (i = 0; a = r[i]; ++i) a !== t && a.__eeOnceListener__ !== t || (2 === r.length ? n[e] = r[i ? 0 : 1] : r.splice(i, 1)); else r !== t && r.__eeOnceListener__ !== t || delete n[e];
  1794. return this
  1795. }, emit: o = function (e) {
  1796. var t, n, r, a, i;
  1797. if (m.call(this, "__ee__") && (a = this.__ee__[e])) if ("object" === (void 0 === a ? "undefined" : c(a))) {
  1798. for (n = arguments.length, i = new Array(n - 1), t = 1; t < n; ++t) i[t - 1] = arguments[t];
  1799. for (a = a.slice(), t = 0; r = a[t]; ++t) f.call(r, this, i)
  1800. } else switch (arguments.length) {
  1801. case 1:
  1802. g.call(a, this);
  1803. break;
  1804. case 2:
  1805. g.call(a, this, arguments[1]);
  1806. break;
  1807. case 3:
  1808. g.call(a, this, arguments[1], arguments[2]);
  1809. break;
  1810. default:
  1811. for (n = arguments.length, i = new Array(n - 1), t = 1; t < n; ++t) i[t - 1] = arguments[t];
  1812. f.call(a, this, i)
  1813. }
  1814. }
  1815. }, s = {on: p(r), once: p(a), off: p(i), emit: p(o)}, u = x({}, s), e.exports = t = function (e) {
  1816. return null == e ? h(u) : x(Object(e), s)
  1817. }, t.methods = l
  1818. }, function (e, t, n) {
  1819. "use strict";
  1820. var r = n(12), a = n(20), i = n(21), o = n(22);
  1821. (e.exports = function (e, t) {
  1822. var n, i, l, s, u;
  1823. return arguments.length < 2 || "string" != typeof e ? (s = t, t = e, e = null) : s = arguments[2], null == e ? (n = l = !0, i = !1) : (n = o.call(e, "c"), i = o.call(e, "e"), l = o.call(e, "w")), u = {
  1824. value: t,
  1825. configurable: n,
  1826. enumerable: i,
  1827. writable: l
  1828. }, s ? r(a(s), u) : u
  1829. }).gs = function (e, t, n) {
  1830. var l, s, u, c;
  1831. return "string" != typeof e ? (u = n, n = t, t = e, e = null) : u = arguments[3], null == t ? t = void 0 : i(t) ? null == n ? n = void 0 : i(n) || (u = n, n = void 0) : (u = t, t = n = void 0), null == e ? (l = !0, s = !1) : (l = o.call(e, "c"), s = o.call(e, "e")), c = {
  1832. get: t,
  1833. set: n,
  1834. configurable: l,
  1835. enumerable: s
  1836. }, u ? r(a(u), c) : c
  1837. }
  1838. }, function (e, t, n) {
  1839. "use strict";
  1840. e.exports = n(13)() ? Object.assign : n(14)
  1841. }, function (e, t, n) {
  1842. "use strict";
  1843. e.exports = function () {
  1844. var e, t = Object.assign;
  1845. return "function" == typeof t && (t(e = {foo: "raz"}, {bar: "dwa"}, {trzy: "trzy"}), e.foo + e.bar + e.trzy === "razdwatrzy")
  1846. }
  1847. }, function (e, t, n) {
  1848. "use strict";
  1849. var r = n(15), a = n(19), i = Math.max;
  1850. e.exports = function (e, t) {
  1851. var n, o, l, s = i(arguments.length, 2);
  1852. for (e = Object(a(e)), l = function (r) {
  1853. try {
  1854. e[r] = t[r]
  1855. } catch (e) {
  1856. n || (n = e)
  1857. }
  1858. }, o = 1; o < s; ++o) t = arguments[o], r(t).forEach(l);
  1859. if (void 0 !== n) throw n;
  1860. return e
  1861. }
  1862. }, function (e, t, n) {
  1863. "use strict";
  1864. e.exports = n(16)() ? Object.keys : n(17)
  1865. }, function (e, t, n) {
  1866. "use strict";
  1867. e.exports = function () {
  1868. try {
  1869. return Object.keys("primitive"), !0
  1870. } catch (e) {
  1871. return !1
  1872. }
  1873. }
  1874. }, function (e, t, n) {
  1875. "use strict";
  1876. var r = n(1), a = Object.keys;
  1877. e.exports = function (e) {
  1878. return a(r(e) ? Object(e) : e)
  1879. }
  1880. }, function (e, t, n) {
  1881. "use strict";
  1882. e.exports = function () {
  1883. }
  1884. }, function (e, t, n) {
  1885. "use strict";
  1886. var r = n(1);
  1887. e.exports = function (e) {
  1888. if (!r(e)) throw new TypeError("Cannot use null or undefined");
  1889. return e
  1890. }
  1891. }, function (e, t, n) {
  1892. "use strict";
  1893. var r = n(1), a = Array.prototype.forEach, i = Object.create;
  1894. e.exports = function (e) {
  1895. var t = i(null);
  1896. return a.call(arguments, function (e) {
  1897. r(e) && function (e, t) {
  1898. var n;
  1899. for (n in e) t[n] = e[n]
  1900. }(Object(e), t)
  1901. }), t
  1902. }
  1903. }, function (e, t, n) {
  1904. "use strict";
  1905. e.exports = function (e) {
  1906. return "function" == typeof e
  1907. }
  1908. }, function (e, t, n) {
  1909. "use strict";
  1910. e.exports = n(23)() ? String.prototype.contains : n(24)
  1911. }, function (e, t, n) {
  1912. "use strict";
  1913. var r = "razdwatrzy";
  1914. e.exports = function () {
  1915. return "function" == typeof r.contains && (!0 === r.contains("dwa") && !1 === r.contains("foo"))
  1916. }
  1917. }, function (e, t, n) {
  1918. "use strict";
  1919. var r = String.prototype.indexOf;
  1920. e.exports = function (e) {
  1921. return r.call(this, e, arguments[1]) > -1
  1922. }
  1923. }, function (e, t, n) {
  1924. "use strict";
  1925. e.exports = function (e) {
  1926. if ("function" != typeof e) throw new TypeError(e + " is not a function");
  1927. return e
  1928. }
  1929. }, function (e, t, n) {
  1930. "use strict";
  1931. Object.defineProperty(t, "__esModule", {value: !0});
  1932. var r = function () {
  1933. function e(e, t) {
  1934. for (var n = 0; n < t.length; n++) {
  1935. var r = t[n];
  1936. r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r)
  1937. }
  1938. }
  1939. return function (t, n, r) {
  1940. return n && e(t.prototype, n), r && e(t, r), t
  1941. }
  1942. }();
  1943. var a = function () {
  1944. function e() {
  1945. var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {
  1946. name: "xgplayer",
  1947. version: 1,
  1948. db: null,
  1949. ojstore: {name: "xg-m4a", keypath: "vid"}
  1950. };
  1951. !function (e, t) {
  1952. if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function")
  1953. }(this, e), this.indexedDB = window.indexedDB || window.webkitindexedDB, this.IDBKeyRange = window.IDBKeyRange || window.webkitIDBKeyRange, this.myDB = t
  1954. }
  1955. return r(e, [{
  1956. key: "openDB", value: function (e) {
  1957. var t = this, n = this, r = this.myDB.version || 1, a = n.indexedDB.open(n.myDB.name, r);
  1958. a.onerror = function (e) {
  1959. }, a.onsuccess = function (r) {
  1960. t.myDB.db = r.target.result, e.call(n)
  1961. }, a.onupgradeneeded = function (e) {
  1962. var t = e.target.result;
  1963. e.target.transaction;
  1964. t.objectStoreNames.contains(n.myDB.ojstore.name) || t.createObjectStore(n.myDB.ojstore.name, {keyPath: n.myDB.ojstore.keypath})
  1965. }
  1966. }
  1967. }, {
  1968. key: "deletedb", value: function () {
  1969. this.indexedDB.deleteDatabase(this.myDB.name)
  1970. }
  1971. }, {
  1972. key: "closeDB", value: function () {
  1973. this.myDB.db.close()
  1974. }
  1975. }, {
  1976. key: "addData", value: function (e, t) {
  1977. for (var n = this.myDB.db.transaction(e, "readwrite").objectStore(e), r = void 0, a = 0; a < t.length; a++) (r = n.add(t[a])).onerror = function () {
  1978. }, r.onsuccess = function () {
  1979. }
  1980. }
  1981. }, {
  1982. key: "putData", value: function (e, t) {
  1983. for (var n = this.myDB.db.transaction(e, "readwrite").objectStore(e), r = void 0, a = 0; a < t.length; a++) (r = n.put(t[a])).onerror = function () {
  1984. }, r.onsuccess = function () {
  1985. }
  1986. }
  1987. }, {
  1988. key: "getDataByKey", value: function (e, t, n) {
  1989. var r = this, a = this.myDB.db.transaction(e, "readwrite").objectStore(e).get(t);
  1990. a.onerror = function () {
  1991. n.call(r, null)
  1992. }, a.onsuccess = function (e) {
  1993. var t = e.target.result;
  1994. n.call(r, t)
  1995. }
  1996. }
  1997. }, {
  1998. key: "deleteData", value: function (e, t) {
  1999. this.myDB.db.transaction(e, "readwrite").objectStore(e).delete(t)
  2000. }
  2001. }, {
  2002. key: "clearData", value: function (e) {
  2003. this.myDB.db.transaction(e, "readwrite").objectStore(e).clear()
  2004. }
  2005. }]), e
  2006. }();
  2007. t.default = a, e.exports = t.default
  2008. }, function (e, t, n) {
  2009. "use strict";
  2010. var r, a;
  2011. "function" == typeof Symbol && Symbol.iterator;
  2012. /*!
  2013. * Draggabilly v2.2.0
  2014. * Make that shiz draggable
  2015. * https://draggabilly.desandro.com
  2016. * MIT license
  2017. */
  2018. !function (i, o) {
  2019. r = [n(28), n(29)], void 0 === (a = function (e, t) {
  2020. return function (e, t, n) {
  2021. function r(e, t) {
  2022. for (var n in t) e[n] = t[n];
  2023. return e
  2024. }
  2025. var a = e.jQuery;
  2026. function i(e, t) {
  2027. this.element = "string" == typeof e ? document.querySelector(e) : e, a && (this.$element = a(this.element)), this.options = r({}, this.constructor.defaults), this.option(t), this._create()
  2028. }
  2029. var o = i.prototype = Object.create(n.prototype);
  2030. i.defaults = {}, o.option = function (e) {
  2031. r(this.options, e)
  2032. };
  2033. var l = {relative: !0, absolute: !0, fixed: !0};
  2034. function s(e, t, n) {
  2035. return n = n || "round", t ? Math[n](e / t) * t : e
  2036. }
  2037. o._create = function () {
  2038. this.position = {}, this._getPosition(), this.startPoint = {x: 0, y: 0}, this.dragPoint = {
  2039. x: 0,
  2040. y: 0
  2041. }, this.startPosition = r({}, this.position);
  2042. var e = getComputedStyle(this.element);
  2043. l[e.position] || (this.element.style.position = "relative"), this.on("pointerDown", this.onPointerDown), this.on("pointerMove", this.onPointerMove), this.on("pointerUp", this.onPointerUp), this.enable(), this.setHandles()
  2044. }, o.setHandles = function () {
  2045. this.handles = this.options.handle ? this.element.querySelectorAll(this.options.handle) : [this.element], this.bindHandles()
  2046. }, o.dispatchEvent = function (e, t, n) {
  2047. var r = [t].concat(n);
  2048. this.emitEvent(e, r), this.dispatchJQueryEvent(e, t, n)
  2049. }, o.dispatchJQueryEvent = function (t, n, r) {
  2050. var a = e.jQuery;
  2051. if (a && this.$element) {
  2052. var i = a.Event(n);
  2053. i.type = t, this.$element.trigger(i, r)
  2054. }
  2055. }, o._getPosition = function () {
  2056. var e = getComputedStyle(this.element), t = this._getPositionCoord(e.left, "width"),
  2057. n = this._getPositionCoord(e.top, "height");
  2058. this.position.x = isNaN(t) ? 0 : t, this.position.y = isNaN(n) ? 0 : n, this._addTransformPosition(e)
  2059. }, o._getPositionCoord = function (e, n) {
  2060. if (-1 != e.indexOf("%")) {
  2061. var r = t(this.element.parentNode);
  2062. return r ? parseFloat(e) / 100 * r[n] : 0
  2063. }
  2064. return parseInt(e, 10)
  2065. }, o._addTransformPosition = function (e) {
  2066. var t = e.transform;
  2067. if (0 === t.indexOf("matrix")) {
  2068. var n = t.split(","), r = 0 === t.indexOf("matrix3d") ? 12 : 4, a = parseInt(n[r], 10),
  2069. i = parseInt(n[r + 1], 10);
  2070. this.position.x += a, this.position.y += i
  2071. }
  2072. }, o.onPointerDown = function (e, t) {
  2073. this.element.classList.add("is-pointer-down"), this.dispatchJQueryEvent("pointerDown", e, [t])
  2074. }, o.dragStart = function (e, t) {
  2075. this.isEnabled && (this._getPosition(), this.measureContainment(), this.startPosition.x = this.position.x, this.startPosition.y = this.position.y, this.setLeftTop(), this.dragPoint.x = 0, this.dragPoint.y = 0, this.element.classList.add("is-dragging"), this.dispatchEvent("dragStart", e, [t]), this.animate())
  2076. }, o.measureContainment = function () {
  2077. var e = this.getContainer();
  2078. if (e) {
  2079. var n = t(this.element), r = t(e), a = this.element.getBoundingClientRect(),
  2080. i = e.getBoundingClientRect(), o = r.borderLeftWidth + r.borderRightWidth,
  2081. l = r.borderTopWidth + r.borderBottomWidth, s = this.relativeStartPosition = {
  2082. x: a.left - (i.left + r.borderLeftWidth),
  2083. y: a.top - (i.top + r.borderTopWidth)
  2084. };
  2085. this.containSize = {
  2086. width: r.width - o - s.x - n.width,
  2087. height: r.height - l - s.y - n.height
  2088. }
  2089. }
  2090. }, o.getContainer = function () {
  2091. var e = this.options.containment;
  2092. if (e) return e instanceof HTMLElement ? e : "string" == typeof e ? document.querySelector(e) : this.element.parentNode
  2093. }, o.onPointerMove = function (e, t, n) {
  2094. this.dispatchJQueryEvent("pointerMove", e, [t, n])
  2095. }, o.dragMove = function (e, t, n) {
  2096. if (this.isEnabled) {
  2097. var r = n.x, a = n.y, i = this.options.grid, o = i && i[0], l = i && i[1];
  2098. r = s(r, o), a = s(a, l), r = this.containDrag("x", r, o), a = this.containDrag("y", a, l), r = "y" == this.options.axis ? 0 : r, a = "x" == this.options.axis ? 0 : a, this.position.x = this.startPosition.x + r, this.position.y = this.startPosition.y + a, this.dragPoint.x = r, this.dragPoint.y = a, this.dispatchEvent("dragMove", e, [t, n])
  2099. }
  2100. }, o.containDrag = function (e, t, n) {
  2101. if (!this.options.containment) return t;
  2102. var r = "x" == e ? "width" : "height", a = s(-this.relativeStartPosition[e], n, "ceil"),
  2103. i = this.containSize[r];
  2104. return i = s(i, n, "floor"), Math.max(a, Math.min(i, t))
  2105. }, o.onPointerUp = function (e, t) {
  2106. this.element.classList.remove("is-pointer-down"), this.dispatchJQueryEvent("pointerUp", e, [t])
  2107. }, o.dragEnd = function (e, t) {
  2108. this.isEnabled && (this.element.style.transform = "", this.setLeftTop(), this.element.classList.remove("is-dragging"), this.dispatchEvent("dragEnd", e, [t]))
  2109. }, o.animate = function () {
  2110. if (this.isDragging) {
  2111. this.positionDrag();
  2112. var e = this;
  2113. requestAnimationFrame(function () {
  2114. e.animate()
  2115. })
  2116. }
  2117. }, o.setLeftTop = function () {
  2118. this.element.style.left = this.position.x + "px", this.element.style.top = this.position.y + "px"
  2119. }, o.positionDrag = function () {
  2120. this.element.style.transform = "translate3d( " + this.dragPoint.x + "px, " + this.dragPoint.y + "px, 0)"
  2121. }, o.staticClick = function (e, t) {
  2122. this.dispatchEvent("staticClick", e, [t])
  2123. }, o.setPosition = function (e, t) {
  2124. this.position.x = e, this.position.y = t, this.setLeftTop()
  2125. }, o.enable = function () {
  2126. this.isEnabled = !0
  2127. }, o.disable = function () {
  2128. this.isEnabled = !1, this.isDragging && this.dragEnd()
  2129. }, o.destroy = function () {
  2130. this.disable(), this.element.style.transform = "", this.element.style.left = "", this.element.style.top = "", this.element.style.position = "", this.unbindHandles(), this.$element && this.$element.removeData("draggabilly")
  2131. }, o._init = function () {
  2132. }, a && a.bridget && a.bridget("draggabilly", i);
  2133. return i
  2134. }(i, e, t)
  2135. }.apply(t, r)) || (e.exports = a)
  2136. }(window)
  2137. }, function (e, t, n) {
  2138. "use strict";
  2139. var r, a, i = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (e) {
  2140. return typeof e
  2141. } : function (e) {
  2142. return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e
  2143. };
  2144. window, void 0 === (a = "function" == typeof(r = function () {
  2145. function e(e) {
  2146. var t = parseFloat(e), n = -1 == e.indexOf("%") && !isNaN(t);
  2147. return n && t
  2148. }
  2149. var t = "undefined" == typeof console ? function () {
  2150. } : function (e) {
  2151. console.error(e)
  2152. },
  2153. n = ["paddingLeft", "paddingRight", "paddingTop", "paddingBottom", "marginLeft", "marginRight", "marginTop", "marginBottom", "borderLeftWidth", "borderRightWidth", "borderTopWidth", "borderBottomWidth"],
  2154. r = n.length;
  2155. function a(e) {
  2156. var n = getComputedStyle(e);
  2157. return n || t("Style returned " + n + ". Are you running this code in a hidden iframe on Firefox? See https://bit.ly/getsizebug1"), n
  2158. }
  2159. var o, l = !1;
  2160. function s(t) {
  2161. if (function () {
  2162. if (!l) {
  2163. l = !0;
  2164. var t = document.createElement("div");
  2165. t.style.width = "200px", t.style.padding = "1px 2px 3px 4px", t.style.borderStyle = "solid", t.style.borderWidth = "1px 2px 3px 4px", t.style.boxSizing = "border-box";
  2166. var n = document.body || document.documentElement;
  2167. n.appendChild(t);
  2168. var r = a(t);
  2169. o = 200 == Math.round(e(r.width)), s.isBoxSizeOuter = o, n.removeChild(t)
  2170. }
  2171. }(), "string" == typeof t && (t = document.querySelector(t)), t && "object" == (void 0 === t ? "undefined" : i(t)) && t.nodeType) {
  2172. var u = a(t);
  2173. if ("none" == u.display) return function () {
  2174. for (var e = {
  2175. width: 0,
  2176. height: 0,
  2177. innerWidth: 0,
  2178. innerHeight: 0,
  2179. outerWidth: 0,
  2180. outerHeight: 0
  2181. }, t = 0; t < r; t++) {
  2182. var a = n[t];
  2183. e[a] = 0
  2184. }
  2185. return e
  2186. }();
  2187. var c = {};
  2188. c.width = t.offsetWidth, c.height = t.offsetHeight;
  2189. for (var p = c.isBorderBox = "border-box" == u.boxSizing, d = 0; d < r; d++) {
  2190. var f = n[d], g = u[f], h = parseFloat(g);
  2191. c[f] = isNaN(h) ? 0 : h
  2192. }
  2193. var y = c.paddingLeft + c.paddingRight, x = c.paddingTop + c.paddingBottom,
  2194. m = c.marginLeft + c.marginRight, v = c.marginTop + c.marginBottom,
  2195. b = c.borderLeftWidth + c.borderRightWidth, k = c.borderTopWidth + c.borderBottomWidth,
  2196. w = p && o,
  2197. _ = e(u.width);
  2198. !1 !== _ && (c.width = _ + (w ? 0 : y + b));
  2199. var E = e(u.height);
  2200. return !1 !== E && (c.height = E + (w ? 0 : x + k)), c.innerWidth = c.width - (y + b), c.innerHeight = c.height - (x + k), c.outerWidth = c.width + m, c.outerHeight = c.height + v, c
  2201. }
  2202. }
  2203. return s
  2204. }) ? r.call(t, n, t, e) : r) || (e.exports = a)
  2205. }, function (e, t, n) {
  2206. "use strict";
  2207. var r, a;
  2208. "function" == typeof Symbol && Symbol.iterator;
  2209. /*!
  2210. * Unidragger v2.3.0
  2211. * Draggable base class
  2212. * MIT license
  2213. */
  2214. !function (i, o) {
  2215. r = [n(30)], void 0 === (a = function (e) {
  2216. return function (e, t) {
  2217. function n() {
  2218. }
  2219. var r = n.prototype = Object.create(t.prototype);
  2220. r.bindHandles = function () {
  2221. this._bindHandles(!0)
  2222. }, r.unbindHandles = function () {
  2223. this._bindHandles(!1)
  2224. }, r._bindHandles = function (t) {
  2225. for (var n = (t = void 0 === t || t) ? "addEventListener" : "removeEventListener", r = t ? this._touchActionValue : "", a = 0; a < this.handles.length; a++) {
  2226. var i = this.handles[a];
  2227. this._bindStartEvent(i, t), i[n]("click", this), e.PointerEvent && (i.style.touchAction = r)
  2228. }
  2229. }, r._touchActionValue = "none", r.pointerDown = function (e, t) {
  2230. var n = this.okayPointerDown(e);
  2231. n && (this.pointerDownPointer = t, e.preventDefault(), this.pointerDownBlur(), this._bindPostStartEvents(e), this.emitEvent("pointerDown", [e, t]))
  2232. };
  2233. var a = {TEXTAREA: !0, INPUT: !0, SELECT: !0, OPTION: !0},
  2234. i = {radio: !0, checkbox: !0, button: !0, submit: !0, image: !0, file: !0};
  2235. return r.okayPointerDown = function (e) {
  2236. var t = a[e.target.nodeName], n = i[e.target.type], r = !t || n;
  2237. return r || this._pointerReset(), r
  2238. }, r.pointerDownBlur = function () {
  2239. var e = document.activeElement;
  2240. e && e.blur && e != document.body && e.blur()
  2241. }, r.pointerMove = function (e, t) {
  2242. var n = this._dragPointerMove(e, t);
  2243. this.emitEvent("pointerMove", [e, t, n]), this._dragMove(e, t, n)
  2244. }, r._dragPointerMove = function (e, t) {
  2245. var n = {
  2246. x: t.pageX - this.pointerDownPointer.pageX,
  2247. y: t.pageY - this.pointerDownPointer.pageY
  2248. };
  2249. return !this.isDragging && this.hasDragStarted(n) && this._dragStart(e, t), n
  2250. }, r.hasDragStarted = function (e) {
  2251. return Math.abs(e.x) > 3 || Math.abs(e.y) > 3
  2252. }, r.pointerUp = function (e, t) {
  2253. this.emitEvent("pointerUp", [e, t]), this._dragPointerUp(e, t)
  2254. }, r._dragPointerUp = function (e, t) {
  2255. this.isDragging ? this._dragEnd(e, t) : this._staticClick(e, t)
  2256. }, r._dragStart = function (e, t) {
  2257. this.isDragging = !0, this.isPreventingClicks = !0, this.dragStart(e, t)
  2258. }, r.dragStart = function (e, t) {
  2259. this.emitEvent("dragStart", [e, t])
  2260. }, r._dragMove = function (e, t, n) {
  2261. this.isDragging && this.dragMove(e, t, n)
  2262. }, r.dragMove = function (e, t, n) {
  2263. e.preventDefault(), this.emitEvent("dragMove", [e, t, n])
  2264. }, r._dragEnd = function (e, t) {
  2265. this.isDragging = !1, setTimeout(function () {
  2266. delete this.isPreventingClicks
  2267. }.bind(this)), this.dragEnd(e, t)
  2268. }, r.dragEnd = function (e, t) {
  2269. this.emitEvent("dragEnd", [e, t])
  2270. }, r.onclick = function (e) {
  2271. this.isPreventingClicks && e.preventDefault()
  2272. }, r._staticClick = function (e, t) {
  2273. this.isIgnoringMouseUp && "mouseup" == e.type || (this.staticClick(e, t), "mouseup" != e.type && (this.isIgnoringMouseUp = !0, setTimeout(function () {
  2274. delete this.isIgnoringMouseUp
  2275. }.bind(this), 400)))
  2276. }, r.staticClick = function (e, t) {
  2277. this.emitEvent("staticClick", [e, t])
  2278. }, n.getPointerPoint = t.getPointerPoint, n
  2279. }(i, e)
  2280. }.apply(t, r)) || (e.exports = a)
  2281. }(window)
  2282. }, function (e, t, n) {
  2283. "use strict";
  2284. var r, a;
  2285. "function" == typeof Symbol && Symbol.iterator;
  2286. /*!
  2287. * Unipointer v2.3.0
  2288. * base class for doing one thing with pointer event
  2289. * MIT license
  2290. */
  2291. !function (i, o) {
  2292. r = [n(31)], void 0 === (a = function (e) {
  2293. return function (e, t) {
  2294. function n() {
  2295. }
  2296. var r = n.prototype = Object.create(t.prototype);
  2297. r.bindStartEvent = function (e) {
  2298. this._bindStartEvent(e, !0)
  2299. }, r.unbindStartEvent = function (e) {
  2300. this._bindStartEvent(e, !1)
  2301. }, r._bindStartEvent = function (t, n) {
  2302. var r = (n = void 0 === n || n) ? "addEventListener" : "removeEventListener", a = "mousedown";
  2303. e.PointerEvent ? a = "pointerdown" : "ontouchstart" in e && (a = "touchstart"), t[r](a, this)
  2304. }, r.handleEvent = function (e) {
  2305. var t = "on" + e.type;
  2306. this[t] && this[t](e)
  2307. }, r.getTouch = function (e) {
  2308. for (var t = 0; t < e.length; t++) {
  2309. var n = e[t];
  2310. if (n.identifier == this.pointerIdentifier) return n
  2311. }
  2312. }, r.onmousedown = function (e) {
  2313. var t = e.button;
  2314. t && 0 !== t && 1 !== t || this._pointerDown(e, e)
  2315. }, r.ontouchstart = function (e) {
  2316. this._pointerDown(e, e.changedTouches[0])
  2317. }, r.onpointerdown = function (e) {
  2318. this._pointerDown(e, e)
  2319. }, r._pointerDown = function (e, t) {
  2320. e.button || this.isPointerDown || (this.isPointerDown = !0, this.pointerIdentifier = void 0 !== t.pointerId ? t.pointerId : t.identifier, this.pointerDown(e, t))
  2321. }, r.pointerDown = function (e, t) {
  2322. this._bindPostStartEvents(e), this.emitEvent("pointerDown", [e, t])
  2323. };
  2324. var a = {
  2325. mousedown: ["mousemove", "mouseup"],
  2326. touchstart: ["touchmove", "touchend", "touchcancel"],
  2327. pointerdown: ["pointermove", "pointerup", "pointercancel"]
  2328. };
  2329. return r._bindPostStartEvents = function (t) {
  2330. if (t) {
  2331. var n = a[t.type];
  2332. n.forEach(function (t) {
  2333. e.addEventListener(t, this)
  2334. }, this), this._boundPointerEvents = n
  2335. }
  2336. }, r._unbindPostStartEvents = function () {
  2337. this._boundPointerEvents && (this._boundPointerEvents.forEach(function (t) {
  2338. e.removeEventListener(t, this)
  2339. }, this), delete this._boundPointerEvents)
  2340. }, r.onmousemove = function (e) {
  2341. this._pointerMove(e, e)
  2342. }, r.onpointermove = function (e) {
  2343. e.pointerId == this.pointerIdentifier && this._pointerMove(e, e)
  2344. }, r.ontouchmove = function (e) {
  2345. var t = this.getTouch(e.changedTouches);
  2346. t && this._pointerMove(e, t)
  2347. }, r._pointerMove = function (e, t) {
  2348. this.pointerMove(e, t)
  2349. }, r.pointerMove = function (e, t) {
  2350. this.emitEvent("pointerMove", [e, t])
  2351. }, r.onmouseup = function (e) {
  2352. this._pointerUp(e, e)
  2353. }, r.onpointerup = function (e) {
  2354. e.pointerId == this.pointerIdentifier && this._pointerUp(e, e)
  2355. }, r.ontouchend = function (e) {
  2356. var t = this.getTouch(e.changedTouches);
  2357. t && this._pointerUp(e, t)
  2358. }, r._pointerUp = function (e, t) {
  2359. this._pointerDone(), this.pointerUp(e, t)
  2360. }, r.pointerUp = function (e, t) {
  2361. this.emitEvent("pointerUp", [e, t])
  2362. }, r._pointerDone = function () {
  2363. this._pointerReset(), this._unbindPostStartEvents(), this.pointerDone()
  2364. }, r._pointerReset = function () {
  2365. this.isPointerDown = !1, delete this.pointerIdentifier
  2366. }, r.pointerDone = function () {
  2367. }, r.onpointercancel = function (e) {
  2368. e.pointerId == this.pointerIdentifier && this._pointerCancel(e, e)
  2369. }, r.ontouchcancel = function (e) {
  2370. var t = this.getTouch(e.changedTouches);
  2371. t && this._pointerCancel(e, t)
  2372. }, r._pointerCancel = function (e, t) {
  2373. this._pointerDone(), this.pointerCancel(e, t)
  2374. }, r.pointerCancel = function (e, t) {
  2375. this.emitEvent("pointerCancel", [e, t])
  2376. }, n.getPointerPoint = function (e) {
  2377. return {x: e.pageX, y: e.pageY}
  2378. }, n
  2379. }(i, e)
  2380. }.apply(t, r)) || (e.exports = a)
  2381. }(window)
  2382. }, function (e, t, n) {
  2383. "use strict";
  2384. var r, a;
  2385. "function" == typeof Symbol && Symbol.iterator;
  2386. "undefined" != typeof window && window, void 0 === (a = "function" == typeof(r = function () {
  2387. function e() {
  2388. }
  2389. var t = e.prototype;
  2390. return t.on = function (e, t) {
  2391. if (e && t) {
  2392. var n = this._events = this._events || {}, r = n[e] = n[e] || [];
  2393. return -1 == r.indexOf(t) && r.push(t), this
  2394. }
  2395. }, t.once = function (e, t) {
  2396. if (e && t) {
  2397. this.on(e, t);
  2398. var n = this._onceEvents = this._onceEvents || {};
  2399. return (n[e] = n[e] || {})[t] = !0, this
  2400. }
  2401. }, t.off = function (e, t) {
  2402. var n = this._events && this._events[e];
  2403. if (n && n.length) {
  2404. var r = n.indexOf(t);
  2405. return -1 != r && n.splice(r, 1), this
  2406. }
  2407. }, t.emitEvent = function (e, t) {
  2408. var n = this._events && this._events[e];
  2409. if (n && n.length) {
  2410. n = n.slice(0), t = t || [];
  2411. for (var r = this._onceEvents && this._onceEvents[e], a = 0; a < n.length; a++) {
  2412. var i = n[a];
  2413. r && r[i] && (this.off(e, i), delete r[i]), i.apply(this, t)
  2414. }
  2415. return this
  2416. }
  2417. }, t.allOff = function () {
  2418. delete this._events, delete this._onceEvents
  2419. }, e
  2420. }) ? r.call(t, n, t, e) : r) || (e.exports = a)
  2421. }, function (e, t, n) {
  2422. "use strict";
  2423. Object.defineProperty(t, "__esModule", {value: !0});
  2424. t.getAbsoluteURL = function (e) {
  2425. if (!e.match(/^https?:\/\//)) {
  2426. var t = document.createElement("div");
  2427. t.innerHTML = '<a href="' + e + '">x</a>', e = t.firstChild.href
  2428. }
  2429. return e
  2430. }
  2431. }, function (e, t, n) {
  2432. "use strict";
  2433. var r, a, i;
  2434. "function" == typeof Symbol && Symbol.iterator;
  2435. a = [], void 0 === (i = "function" == typeof(r = function () {
  2436. return function e(t, n, r) {
  2437. var a, i, o = window, l = "application/octet-stream", s = r || l, u = t, c = !n && !r && u,
  2438. p = document.createElement("a"), d = function (e) {
  2439. return String(e)
  2440. }, f = o.Blob || o.MozBlob || o.WebKitBlob || d, g = n || "download";
  2441. if (f = f.call ? f.bind(o) : Blob, "true" === String(this) && (s = (u = [u, s])[0], u = u[1]), c && c.length < 2048 && (g = c.split("/").pop().split("?")[0], p.href = c, -1 !== p.href.indexOf(c))) {
  2442. var h = new XMLHttpRequest;
  2443. return h.open("GET", c, !0), h.responseType = "blob", h.onload = function (t) {
  2444. e(t.target.response, g, l)
  2445. }, setTimeout(function () {
  2446. h.send()
  2447. }, 0), h
  2448. }
  2449. if (/^data:([\w+-]+\/[\w+.-]+)?[,;]/.test(u)) {
  2450. if (!(u.length > 2096103.424 && f !== d)) return navigator.msSaveBlob ? navigator.msSaveBlob(v(u), g) : b(u);
  2451. u = v(u), s = u.type || l
  2452. } else if (/([\x80-\xff])/.test(u)) {
  2453. for (var y = 0, x = new Uint8Array(u.length), m = x.length; y < m; ++y) x[y] = u.charCodeAt(y);
  2454. u = new f([x], {type: s})
  2455. }
  2456. function v(e) {
  2457. for (var t = e.split(/[:;,]/), n = t[1], r = "base64" == t[2] ? atob : decodeURIComponent, a = r(t.pop()), i = a.length, o = 0, l = new Uint8Array(i); o < i; ++o) l[o] = a.charCodeAt(o);
  2458. return new f([l], {type: n})
  2459. }
  2460. function b(e, t) {
  2461. if ("download" in p) return p.href = e, p.setAttribute("download", g), p.className = "download-js-link", p.innerHTML = "downloading...", p.style.display = "none", document.body.appendChild(p), setTimeout(function () {
  2462. p.click(), document.body.removeChild(p), !0 === t && setTimeout(function () {
  2463. o.URL.revokeObjectURL(p.href)
  2464. }, 250)
  2465. }, 66), !0;
  2466. if (/(Version)\/(\d+)\.(\d+)(?:\.(\d+))?.*Safari\//.test(navigator.userAgent)) return /^data:/.test(e) && (e = "data:" + e.replace(/^data:([\w\/\-\+]+)/, l)), window.open(e) || confirm("Displaying New Document\n\nUse Save As... to download, then click back to return to this page.") && (location.href = e), !0;
  2467. var n = document.createElement("iframe");
  2468. document.body.appendChild(n), !t && /^data:/.test(e) && (e = "data:" + e.replace(/^data:([\w\/\-\+]+)/, l)), n.src = e, setTimeout(function () {
  2469. document.body.removeChild(n)
  2470. }, 333)
  2471. }
  2472. if (a = u instanceof f ? u : new f([u], {type: s}), navigator.msSaveBlob) return navigator.msSaveBlob(a, g);
  2473. if (o.URL) b(o.URL.createObjectURL(a), !0); else {
  2474. if ("string" == typeof a || a.constructor === d) try {
  2475. return b("data:" + s + ";base64," + o.btoa(a))
  2476. } catch (e) {
  2477. return b("data:" + s + "," + encodeURIComponent(a))
  2478. }
  2479. (i = new FileReader).onload = function (e) {
  2480. b(this.result)
  2481. }, i.readAsDataURL(a)
  2482. }
  2483. return !0
  2484. }
  2485. }) ? r.apply(t, a) : r) || (e.exports = i)
  2486. }, function (e, t, n) {
  2487. "use strict";
  2488. var r, a = n(0), i = (r = a) && r.__esModule ? r : {default: r};
  2489. i.default.install("volume", function () {
  2490. var e = this, t = e.root, n = i.default.util, r = void 0, a = void 0, o = void 0, l = void 0;
  2491. function s() {
  2492. e.volume = e.config.volume, r = e.controls.querySelector(".xgplayer-volume"), a = r.querySelector(".xgplayer-slider"), o = r.querySelector(".xgplayer-bar"), l = r.querySelector(".xgplayer-drag"), r.querySelector(".xgplayer-icon")
  2493. }
  2494. function u(t) {
  2495. e.video.muted = !1, a.focus(), n.event(t);
  2496. var r = o.getBoundingClientRect(), i = (t.clientX, t.clientY), s = l.getBoundingClientRect().height,
  2497. u = !1,
  2498. c = function (t) {
  2499. t.preventDefault(), t.stopPropagation(), n.event(t), u = !0;
  2500. var a = s - t.clientY + i, o = a / r.height;
  2501. l.style.height = a + "px", e.volume = Math.max(Math.min(o, 1), 0)
  2502. }, p = function t(i) {
  2503. if (i.preventDefault(), i.stopPropagation(), n.event(i), window.removeEventListener("mousemove", c), window.removeEventListener("touchmove", c), window.removeEventListener("mouseup", t), window.removeEventListener("touchend", t), !u) {
  2504. var o = r.height - (i.clientY - r.top), s = o / r.height;
  2505. l.style.height = o + "px", s <= 0 && (e.volume > 0 ? l.volume = e.video.volume : s = l.volume), e.volume = Math.max(Math.min(s, 1), 0)
  2506. }
  2507. a.volume = e.volume, u = !1
  2508. };
  2509. return window.addEventListener("mousemove", c), window.addEventListener("touchmove", c), window.addEventListener("mouseup", p), window.addEventListener("touchend", p), !1
  2510. }
  2511. function c() {
  2512. e.video.muted = !1, 0 === e.volume ? e.volume = a.volume : e.volume = 0
  2513. }
  2514. function p() {
  2515. n.addClass(t, "xgplayer-volume-active"), r && r.focus()
  2516. }
  2517. function d() {
  2518. n.removeClass(t, "xgplayer-volume-active")
  2519. }
  2520. e.once("canplay", s), e.on("volumeBarClick", u), e.on("volumeIconClick", c), e.on("volumeIconEnter", p), e.on("volumeIconLeave", d);
  2521. var f = null;
  2522. function g() {
  2523. f && clearTimeout(f), f = setTimeout(function () {
  2524. n.removeClass(t, "xgplayer-volume-muted"), n.removeClass(t, "xgplayer-volume-small"), n.removeClass(t, "xgplayer-volume-large"), 0 === e.volume ? n.addClass(t, "xgplayer-volume-muted") : e.volume < .5 ? n.addClass(t, "xgplayer-volume-small") : n.addClass(t, "xgplayer-volume-large");
  2525. var r = o.getBoundingClientRect().height || 76;
  2526. l.style.height = e.volume * r + "px"
  2527. }, 50)
  2528. }
  2529. e.on("volumechange", g), e.once("destroy", function t() {
  2530. e.off("canplay", s), e.off("volumeBarClick", u), e.off("volumeIconClick", c), e.off("volumeIconEnter", p), e.off("volumeIconLeave", d), e.off("volumechange", g), e.off("destroy", t)
  2531. })
  2532. })
  2533. }, function (e, t, n) {
  2534. "use strict";
  2535. var r, a = n(0), i = (r = a) && r.__esModule ? r : {default: r};
  2536. i.default.install("start", function () {
  2537. var e = this, t = e.root, n = i.default.util;
  2538. function r() {
  2539. n.removeClass(t, "xgplayer-is-enter")
  2540. }
  2541. function a() {
  2542. n.removeClass(t, "xgplayer-is-enter")
  2543. }
  2544. function o() {
  2545. n.hasClass(t, "xgplayer-nostart") ? (n.removeClass(t, "xgplayer-nostart"), n.addClass(t, "xgplayer-is-enter"), e.on("canplay", r), e.once("playing", a), t.querySelector("video") || e.start(), e.play()) : e.paused && (n.removeClass(t, "xgplayer-nostart xgplayer-isloading"), setTimeout(function () {
  2546. e.play()
  2547. }, 10))
  2548. }
  2549. e.on("startBtnClick", o), e.once("destroy", function t() {
  2550. e.off("canplay", r), e.off("playing", a), e.off("startBtnClick", o), e.off("destroy", t)
  2551. })
  2552. })
  2553. }, function (e, t, n) {
  2554. "use strict";
  2555. var r, a = n(0);
  2556. ((r = a) && r.__esModule ? r : {default: r}).default.install("screenShot", function () {
  2557. var e = this;
  2558. e.root;
  2559. if (e.config.screenShot) {
  2560. var t = document.createElement("canvas"), n = t.getContext("2d"), r = new Image;
  2561. t.width = this.config.width || 600, t.height = this.config.height || 337.5;
  2562. var a = function (e, t) {
  2563. var n = document.createElement("a");
  2564. n.href = e, n.download = t;
  2565. var r = document.createEvent("MouseEvents");
  2566. r.initMouseEvent("click", !0, !1, window, 0, 0, 0, 0, 0, !1, !1, !1, !1, 0, null), n.dispatchEvent(r)
  2567. };
  2568. e.on("screenShotBtnClick", i), e.once("destroy", function t() {
  2569. e.off("screenShotBtnClick", i), e.off("destroy", t)
  2570. })
  2571. }
  2572. function i() {
  2573. r.onload = function () {
  2574. n.drawImage(e.video, 0, 0, t.width, t.height), r.setAttribute("crossOrigin", "anonymous"), r.src = t.toDataURL("image/png").replace("image/png", "image/octet-stream");
  2575. var i = r.src.replace(/^data:image\/[^;]+/, "data:application/octet-stream");
  2576. a(i, "截图.png")
  2577. }()
  2578. }
  2579. })
  2580. }, function (e, t, n) {
  2581. "use strict";
  2582. var r, a = n(0);
  2583. ((r = a) && r.__esModule ? r : {default: r}).default.install("rotate", function () {
  2584. var e = this, t = e.config.rotate;
  2585. function n() {
  2586. e.rotate(t.clockwise, t.innerRotate)
  2587. }
  2588. t && (e.on("rotateBtnClick", n), e.once("destroy", function t() {
  2589. e.off("rotateBtnClick", n), e.off("destroy", t)
  2590. }))
  2591. })
  2592. }, function (e, t, n) {
  2593. "use strict";
  2594. var r, a = n(0), i = (r = a) && r.__esModule ? r : {default: r};
  2595. i.default.install("replay", function () {
  2596. var e = this, t = i.default.util, n = e.root;
  2597. function r() {
  2598. t.removeClass(n, "replay"), e.replay()
  2599. }
  2600. e.on("replayBtnClick", r), e.on("ended", function () {
  2601. e.config.loop || t.addClass(n, "replay")
  2602. }), e.once("destroy", function t() {
  2603. e.off("replayBtnClick", r), e.off("destroy", t)
  2604. })
  2605. })
  2606. }, function (e, t, n) {
  2607. "use strict";
  2608. var r, a = n(0);
  2609. ((r = a) && r.__esModule ? r : {default: r}).default.install("playNext", function () {
  2610. var e = this, t = (e.root, e.config.playNext);
  2611. function n() {
  2612. e.currentVideoIndex + 1 < t.urlList.length ? (e.currentVideoIndex++, e.video.autoplay = !0, e.src = t.urlList[e.currentVideoIndex], e.emit("playerNext", e.currentVideoIndex + 1)) : e.emit("urlList last")
  2613. }
  2614. e.currentVideoIndex = -1, e.on("playNextBtnClick", n), e.once("destroy", function t() {
  2615. e.off("playNextBtnClick", n), e.off("destroy", t)
  2616. })
  2617. })
  2618. }, function (e, t, n) {
  2619. "use strict";
  2620. var r, a = n(0);
  2621. ((r = a) && r.__esModule ? r : {default: r}).default.install("play", function () {
  2622. var e = this;
  2623. function t() {
  2624. e.ended || (e.paused ? e.play() : e.pause())
  2625. }
  2626. e.on("playBtnClick", t), e.once("destroy", function n() {
  2627. e.off("playBtnClick", t), e.off("destroy", n)
  2628. })
  2629. })
  2630. }, function (e, t, n) {
  2631. "use strict";
  2632. var r, a = n(0), i = (r = a) && r.__esModule ? r : {default: r};
  2633. i.default.install("pip", function () {
  2634. var e = this, t = i.default.util, n = e.root;
  2635. function r() {
  2636. t.hasClass(n, "xgplayer-pip-active") ? e.exitPIP() : e.getPIP()
  2637. }
  2638. e.on("pipBtnClick", r), e.once("destroy", function t() {
  2639. e.off("pipBtnClick", r), e.off("destroy", t)
  2640. })
  2641. })
  2642. }, function (e, t, n) {
  2643. "use strict";
  2644. var r, a = n(0), i = (r = a) && r.__esModule ? r : {default: r};
  2645. i.default.install("pc", function () {
  2646. var e = this, t = i.default.util, n = e.controls, r = e.root, a = 0, o = void 0;
  2647. function l() {
  2648. clearTimeout(e.leavePlayerTimer), e.emit("focus", e)
  2649. }
  2650. function s() {
  2651. e.config.closePlayerBlur || (e.leavePlayerTimer = setTimeout(function () {
  2652. e.emit("blur", e)
  2653. }, e.config.leavePlayerTime || 0))
  2654. }
  2655. function u(t) {
  2656. e.config.autoplay && e.start()
  2657. }
  2658. e.onElementClick = function (e, n) {
  2659. e.preventDefault(), e.stopPropagation();
  2660. var r = this;
  2661. r.config.closeVideoClick || (a++, o && clearTimeout(o), 1 === a ? o = setTimeout(function () {
  2662. if (t.hasClass(r.root, "xgplayer-nostart")) return !1;
  2663. r.ended || (r.paused ? r.play() : r.pause()), a = 0
  2664. }, 200) : a = 0)
  2665. }, e.video.addEventListener("click", function (t) {
  2666. e.onElementClick(t, e.video)
  2667. }, !1), e.onElementDblclick = function (e, t) {
  2668. if (e.preventDefault(), e.stopPropagation(), !this.config.closeVideoDblclick) {
  2669. var r = n.querySelector(".xgplayer-fullscreen");
  2670. if (r) {
  2671. var a = void 0;
  2672. document.createEvent ? (a = document.createEvent("Event")).initEvent("click", !0, !0) : a = new Event("click"), r.dispatchEvent(a)
  2673. }
  2674. }
  2675. }, e.video.addEventListener("dblclick", function (t) {
  2676. e.onElementDblclick(t, e.video)
  2677. }, !1), r.addEventListener("mouseenter", l), r.addEventListener("mouseleave", s), n.addEventListener("mouseenter", function (t) {
  2678. e.userTimer && clearTimeout(e.userTimer)
  2679. }, !1), n.addEventListener("mouseleave", function (t) {
  2680. e.config.closeControlsBlur || e.emit("focus", e)
  2681. }, !1), e.once("ready", u), e.once("destroy", function t() {
  2682. r.removeEventListener("mouseenter", l), r.removeEventListener("mouseleave", s), e.off("ready", u), e.off("destroy", t)
  2683. })
  2684. })
  2685. }, function (e, t, n) {
  2686. "use strict";
  2687. var r, a = n(0), i = (r = a) && r.__esModule ? r : {default: r};
  2688. i.default.install("mobile", function () {
  2689. var e = this, t = i.default.util, n = (e.controls, e.root);
  2690. function r(t) {
  2691. e.config.autoplay && e.start()
  2692. }
  2693. e.onElementTouchend = function (e, r) {
  2694. if (e.preventDefault(), e.stopPropagation(), t.hasClass(n, "xgplayer-inactive") ? this.emit("focus") : this.emit("blur"), !this.config.closeVideoTouch) {
  2695. if (t.hasClass(this.root, "xgplayer-nostart")) return !1;
  2696. this.ended || (this.paused ? this.play() : this.pause())
  2697. }
  2698. }, e.video.addEventListener("touchend", function (t) {
  2699. e.onElementTouchend(t, e.video)
  2700. }, !1), e.once("ready", r), e.once("destroy", function t() {
  2701. e.off("ready", r), e.off("destroy", t)
  2702. })
  2703. })
  2704. }, function (e, t, n) {
  2705. "use strict";
  2706. var r = o(n(0)), a = o(n(5)), i = o(n(6));
  2707. function o(e) {
  2708. return e && e.__esModule ? e : {default: e}
  2709. }
  2710. r.default.install("logger", function () {
  2711. var e = this, t = r.default.util;
  2712. if (!0 !== e.config.noLog) {
  2713. var n = function () {
  2714. e.video.played;
  2715. var t = s(e.logParams.played), n = (new Date).getTime();
  2716. u();
  2717. var r = {
  2718. url: e.logParams.pluginSrc ? e.logParams.pluginSrc : e.logParams.playSrc,
  2719. vid: e.config.vid,
  2720. bc: e.logParams.bc - 1 > 0 ? e.logParams.bc - 1 : 0,
  2721. bb: e.logParams.bc - 1 > 0 ? 1 : 0,
  2722. bu_acu_t: e.logParams.bu_acu_t,
  2723. pt: e.logParams.pt,
  2724. vt: e.logParams.vt,
  2725. vd: 1e3 * e.logParams.vd,
  2726. watch_dur: parseFloat((1e3 * t).toFixed(3)),
  2727. cur_play_pos: parseFloat((1e3 * e.currentTime).toFixed(3)),
  2728. et: n
  2729. };
  2730. window.__xigua_log_sdk__("c", r)
  2731. }, o = function () {
  2732. e.video.played;
  2733. var t = s(e.logParams.played), n = (new Date).getTime();
  2734. u();
  2735. var r = {
  2736. url: e.logParams.pluginSrc ? e.logParams.pluginSrc : e.logParams.playSrc,
  2737. vid: e.config.vid,
  2738. bc: e.logParams.bc - 1 > 0 ? e.logParams.bc - 1 : 0,
  2739. bb: e.logParams.bc - 1 > 0 ? 1 : 0,
  2740. bu_acu_t: e.logParams.bu_acu_t,
  2741. pt: e.logParams.pt,
  2742. vt: e.logParams.vt,
  2743. vd: 1e3 * e.logParams.vd,
  2744. watch_dur: parseFloat((1e3 * t).toFixed(3)),
  2745. cur_play_pos: parseFloat((1e3 * e.currentTime).toFixed(3)),
  2746. lt: n
  2747. };
  2748. window.__xigua_log_sdk__("d", r)
  2749. }, l = function (t) {
  2750. e.video.played;
  2751. var n = s(e.logParams.played);
  2752. u();
  2753. var r = (new Date).getTime();
  2754. if (!(e.logParams.lastErrLog && r - e.logParams.lastErrLog <= 3e3)) {
  2755. e.logParams.lastErrLog = r;
  2756. var a = {
  2757. url: e.logParams.pluginSrc ? e.logParams.pluginSrc : e.logParams.playSrc,
  2758. vid: e.config.vid,
  2759. bc: e.logParams.bc - 1 > 0 ? e.logParams.bc - 1 : 0,
  2760. bb: e.logParams.bc - 1 > 0 ? 1 : 0,
  2761. bu_acu_t: e.logParams.bu_acu_t,
  2762. pt: e.logParams.pt,
  2763. vt: e.logParams.vt,
  2764. vd: 1e3 * e.logParams.vd,
  2765. watch_dur: parseFloat((1e3 * n).toFixed(3)),
  2766. err_msg: t.errd.msg,
  2767. line: t.errd.line,
  2768. et: r,
  2769. cur_play_pos: parseFloat((1e3 * e.currentTime).toFixed(3))
  2770. };
  2771. if (e.logParams.nologFunc && e.logParams.nologFunc(e)) return !0;
  2772. window.__xigua_log_sdk__("e", a)
  2773. }
  2774. };
  2775. window.__xigua_log_sdk__ || (window.__xigua_log_sdk__ = new i.default("tracker"), window.__xigua_log_sdk__.init({
  2776. app_id: 1300,
  2777. channel: "cn",
  2778. log: !1,
  2779. disable_sdk_monitor: !0
  2780. }), window.__xigua_log_sdk__("config", {
  2781. evtParams: {
  2782. log_type: "logger",
  2783. page_url: document.URL,
  2784. domain: window.location.host,
  2785. pver: e.version,
  2786. ua: navigator.userAgent.toLowerCase()
  2787. }, disable_auto_pv: !0
  2788. }), window.__xigua_log_sdk__.start()), e.config.uid && window.__xigua_log_sdk__("config", {user_unique_id: e.config.uid});
  2789. var s = function () {
  2790. for (var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : [], t = [], n = 0; n < e.length; n++) if (!(!e[n].end || e[n].begin < 0 || e[n].end < 0 || e[n].end < e[n].begin)) if (t.length < 1) t.push({
  2791. begin: e[n].begin,
  2792. end: e[n].end
  2793. }); else for (var r = 0; r < t.length; r++) {
  2794. var a = e[n].begin, i = e[n].end;
  2795. if (i < t[r].begin) {
  2796. t.splice(r, 0, {begin: a, end: i});
  2797. break
  2798. }
  2799. if (!(a > t[r].end)) {
  2800. var o = t[r].begin, l = t[r].end;
  2801. t[r].begin = Math.min(a, o), t[r].end = Math.max(i, l);
  2802. break
  2803. }
  2804. if (r > t.length - 2) {
  2805. t.push({begin: a, end: i});
  2806. break
  2807. }
  2808. }
  2809. for (var s = 0, u = 0; u < t.length; u++) s += t[u].end - t[u].begin;
  2810. return s
  2811. }, u = function () {
  2812. e.logParams.pt && e.logParams.vt || (e.logParams.pt = (new Date).getTime(), e.logParams.vt = e.logParams.pt), e.logParams.pt > e.logParams.vt && (e.logParams.pt = e.logParams.vt)
  2813. }, c = function (n) {
  2814. if (t.hasClass(e.root, "xgplayer-is-enter")) {
  2815. var r = (new Date).getTime(), a = {
  2816. url: e.logParams.pluginSrc ? e.logParams.pluginSrc : e.logParams.playSrc,
  2817. vid: e.config.vid,
  2818. pt: e.logParams.pt,
  2819. lt: r
  2820. };
  2821. window.__xigua_log_sdk__("b", a)
  2822. } else if (t.hasClass(e.root, "xgplayer-playing")) {
  2823. var i = s(e.logParams.played), o = (new Date).getTime();
  2824. u();
  2825. var l = {
  2826. url: e.logParams.pluginSrc ? e.logParams.pluginSrc : e.logParams.playSrc,
  2827. vid: e.config.vid,
  2828. bc: e.logParams.bc - 1 > 0 ? e.logParams.bc - 1 : 0,
  2829. bb: e.logParams.bc - 1 > 0 ? 1 : 0,
  2830. bu_acu_t: e.logParams.bu_acu_t,
  2831. pt: e.logParams.pt,
  2832. vt: e.logParams.vt,
  2833. vd: 1e3 * e.logParams.vd,
  2834. watch_dur: parseFloat((1e3 * i).toFixed(3)),
  2835. cur_play_pos: parseFloat((1e3 * e.currentTime).toFixed(3)),
  2836. lt: o
  2837. };
  2838. window.__xigua_log_sdk__("d", l)
  2839. }
  2840. };
  2841. "pc" === a.default.device ? window.addEventListener("beforeunload", c, !1) : "mobile" === a.default.device && window.addEventListener("pagehide", c, !1), e.on("routechange", c), e.on("ended", n), e.on("urlchange", o), e.on("error", l), e.once("destroy", function t() {
  2842. "pc" === a.default.device ? window.removeEventListener("beforeunload", c) : "mobile" === a.default.device && window.removeEventListener("pagehide", c), e.off("routechange", c), e.off("ended", n), e.off("urlchange", o), e.off("error", l), e.off("destroy", t)
  2843. })
  2844. }
  2845. })
  2846. }, function (e, t, n) {
  2847. "use strict";
  2848. var r, a = n(0);
  2849. ((r = a) && r.__esModule ? r : {default: r}).default.install("localPreview", function () {
  2850. var e = this, t = e.root;
  2851. function n(n) {
  2852. e.uploadFile = n.files[0];
  2853. var r = URL.createObjectURL(e.uploadFile);
  2854. util.hasClass(t, "xgplayer-nostart") ? (e.config.url = r, e.start()) : (e.src = r, e.play())
  2855. }
  2856. e.on("upload", n), e.once("destroy", function t() {
  2857. e.off("upload", n), e.off("destroy", t)
  2858. })
  2859. })
  2860. }, function (e, t, n) {
  2861. "use strict";
  2862. var r, a = n(0);
  2863. ((r = a) && r.__esModule ? r : {default: r}).default.install("i18n", function () {
  2864. var e = this, t = {}, n = e.constructor.util;
  2865. t.en = {
  2866. HAVE_NOTHING: "There is no information on whether audio/video is ready",
  2867. HAVE_METADATA: "Audio/video metadata is ready ",
  2868. HAVE_CURRENT_DATA: "Data about the current play location is available, but there is not enough data to play the next frame/millisecond",
  2869. HAVE_FUTURE_DATA: "Current and at least one frame of data is available",
  2870. HAVE_ENOUGH_DATA: "The available data is sufficient to start playing",
  2871. NETWORK_EMPTY: "Audio/video has not been initialized",
  2872. NETWORK_IDLE: "Audio/video is active and has been selected for resources, but no network is used",
  2873. NETWORK_LOADING: "The browser is downloading the data",
  2874. NETWORK_NO_SOURCE: "No audio/video source was found",
  2875. MEDIA_ERR_ABORTED: "The fetch process is aborted by the user",
  2876. MEDIA_ERR_NETWORK: "An error occurred while downloading",
  2877. MEDIA_ERR_DECODE: "An error occurred while decoding",
  2878. MEDIA_ERR_SRC_NOT_SUPPORTED: "Audio/video is not supported",
  2879. REPLAY: "Replay",
  2880. ERROR: "Network is offline",
  2881. PLAY_TIPS: "Play",
  2882. PAUSE_TIPS: "Pause",
  2883. PLAYNEXT_TIPS: "Play next",
  2884. DOWNLOAD_TIPS: "Download",
  2885. ROTATE_TIPS: "Rotate",
  2886. FULLSCREEN_TIPS: "Fullscreen",
  2887. EXITFULLSCREEN_TIPS: "Exit fullscreen",
  2888. CSSFULLSCREEN_TIPS: "Cssfullscreen",
  2889. EXITCSSFULLSCREEN_TIPS: "Exit cssfullscreen",
  2890. TEXTTRACK: "Caption",
  2891. PIP: "Pip",
  2892. SCREENSHOT: "Screenshot"
  2893. }, t["zh-cn"] = {
  2894. HAVE_NOTHING: "没有关于音频/视频是否就绪的信息",
  2895. HAVE_METADATA: "音频/视频的元数据已就绪",
  2896. HAVE_CURRENT_DATA: "关于当前播放位置的数据是可用的,但没有足够的数据来播放下一帧/毫秒",
  2897. HAVE_FUTURE_DATA: "当前及至少下一帧的数据是可用的",
  2898. HAVE_ENOUGH_DATA: "可用数据足以开始播放",
  2899. NETWORK_EMPTY: "音频/视频尚未初始化",
  2900. NETWORK_IDLE: "音频/视频是活动的且已选取资源,但并未使用网络",
  2901. NETWORK_LOADING: "浏览器正在下载数据",
  2902. NETWORK_NO_SOURCE: "未找到音频/视频来源",
  2903. MEDIA_ERR_ABORTED: "取回过程被用户中止",
  2904. MEDIA_ERR_NETWORK: "当下载时发生错误",
  2905. MEDIA_ERR_DECODE: "当解码时发生错误",
  2906. MEDIA_ERR_SRC_NOT_SUPPORTED: "不支持的音频/视频格式",
  2907. REPLAY: "重播",
  2908. ERROR: "网络连接似乎出现了问题",
  2909. PLAY_TIPS: "播放",
  2910. PAUSE_TIPS: "暂停",
  2911. PLAYNEXT_TIPS: "下一集",
  2912. DOWNLOAD_TIPS: "下载",
  2913. ROTATE_TIPS: "旋转",
  2914. FULLSCREEN_TIPS: "进入全屏",
  2915. EXITFULLSCREEN_TIPS: "退出全屏",
  2916. CSSFULLSCREEN_TIPS: "进入样式全屏",
  2917. EXITCSSFULLSCREEN_TIPS: "退出样式全屏",
  2918. TEXTTRACK: "字幕",
  2919. PIP: "画中画",
  2920. SCREENSHOT: "截图"
  2921. }, t.jp = {
  2922. HAVE_NOTHING: "オーディオ/ビデオが準備できているか情報がありません",
  2923. HAVE_METADATA: "オーディオ/ビデオのメタデータは準備できています",
  2924. HAVE_CURRENT_DATA: "現在の再生位置に関するデータは利用可能ですが、次のフレーム/ミリ秒を再生するのに十分なデータがありません",
  2925. HAVE_FUTURE_DATA: "現在、少なくとも次のフレームのデータが利用可能です",
  2926. HAVE_ENOUGH_DATA: "利用可能なデータは再生を開始するのに十分です",
  2927. NETWORK_EMPTY: "オーディオ/ビデオが初期化されていません",
  2928. NETWORK_IDLE: "オーディオ/ビデオはアクティブでリソースが選択されていますが、ネットワークが使用されていません",
  2929. NETWORK_LOADING: "ブラウザーはデータをダウンロードしています",
  2930. NETWORK_NO_SOURCE: "オーディオ/ビデオ のソースが見つかりません",
  2931. MEDIA_ERR_ABORTED: "ユーザーによってフェッチプロセスが中止されました",
  2932. MEDIA_ERR_NETWORK: "ダウンロード中にエラーが発生しました",
  2933. MEDIA_ERR_DECODE: "デコード中にエラーが発生しました",
  2934. MEDIA_ERR_SRC_NOT_SUPPORTED: "オーディオ/ビデオ の形式がサポートされていません",
  2935. REPLAY: "リプレイ",
  2936. ERROR: "ネットワークの接続に問題が発生しました",
  2937. PLAY_TIPS: "プレイ",
  2938. PAUSE_TIPS: "一時停止",
  2939. PLAYNEXT_TIPS: "次をプレイ",
  2940. DOWNLOAD_TIPS: "ダウンロード",
  2941. ROTATE_TIPS: "回転",
  2942. FULLSCREEN_TIPS: "フルスクリーン",
  2943. EXITFULLSCREEN_TIPS: "フルスクリーンを終了",
  2944. CSSFULLSCREEN_TIPS: "シアターモード",
  2945. EXITCSSFULLSCREEN_TIPS: "シアターモードを終了",
  2946. TEXTTRACK: "字幕",
  2947. PIP: "ミニプレーヤー",
  2948. SCREENSHOT: "スクリーンショット"
  2949. }, Object.defineProperty(e, "lang", {
  2950. get: function () {
  2951. return t[e.config.lang] || t.en
  2952. }, set: function (e) {
  2953. "Object" === n.typeOf(e) && Object.keys(e).forEach(function (n) {
  2954. t[n] = e[n]
  2955. })
  2956. }
  2957. })
  2958. })
  2959. }, function (e, t, n) {
  2960. "use strict";
  2961. var r, a = n(0), i = (r = a) && r.__esModule ? r : {default: r};
  2962. i.default.install("fullscreen", function () {
  2963. var e = this, t = e.root, n = i.default.util;
  2964. function r() {
  2965. n.hasClass(t, "xgplayer-is-fullscreen") ? e.exitFullscreen(t) : e.getFullscreen(t)
  2966. }
  2967. function a() {
  2968. var r = document.fullscreenElement || document.webkitFullscreenElement || document.mozFullScreenElement || document.msFullscreenElement;
  2969. r && r === t ? (n.addClass(t, "xgplayer-is-fullscreen"), e.emit("requestFullscreen")) : (n.removeClass(t, "xgplayer-is-fullscreen"), e.emit("exitFullscreen"))
  2970. }
  2971. e.on("fullscreenBtnClick", r), ["fullscreenchange", "webkitfullscreenchange", "mozfullscreenchange", "MSFullscreenChange"].forEach(function (e) {
  2972. document.addEventListener(e, a)
  2973. }), e.once("destroy", function t() {
  2974. e.off("fullscreenBtnClick", r), ["fullscreenchange", "webkitfullscreenchange", "mozfullscreenchange", "MSFullscreenChange"].forEach(function (e) {
  2975. document.removeEventListener(e, a)
  2976. }), e.off("destroy", t)
  2977. })
  2978. })
  2979. }, function (e, t, n) {
  2980. "use strict";
  2981. var r, a = n(0);
  2982. ((r = a) && r.__esModule ? r : {default: r}).default.install("download", function () {
  2983. var e = this;
  2984. function t() {
  2985. e.download()
  2986. }
  2987. e.on("downloadBtnClick", t), e.once("destroy", function n() {
  2988. e.off("downloadBtnClick", t), e.off("destroy", n)
  2989. })
  2990. })
  2991. }, function (e, t, n) {
  2992. "use strict";
  2993. var r, a = n(0);
  2994. ((r = a) && r.__esModule ? r : {default: r}).default.install("definition", function () {
  2995. var e = this;
  2996. e.root;
  2997. e.once("destroy", function t() {
  2998. e.off("destroy", t)
  2999. })
  3000. })
  3001. }, function (e, t, n) {
  3002. "use strict";
  3003. var r, a = n(0), i = (r = a) && r.__esModule ? r : {default: r};
  3004. i.default.install("danmu", function () {
  3005. var e = this, t = (e.root, i.default.util);
  3006. e.on("initDefaultDanmu", function (n) {
  3007. var r = e.root.querySelector("xg-danmu");
  3008. if (t.addClass(r, "xgplayer-has-danmu"), !e.config.danmu.closeDefaultBtn) {
  3009. var a = function () {
  3010. n.start()
  3011. }, i = function () {
  3012. t.hasClass(e.danmuBtn, "danmu-switch-active") && n.pause()
  3013. }, o = function () {
  3014. t.hasClass(e.danmuBtn, "danmu-switch-active") && n.play()
  3015. }, l = function () {
  3016. t.hasClass(e.danmuBtn, "danmu-switch-active") && (n.stop(), n.start())
  3017. };
  3018. e.danmuBtn = t.copyDom(n.bulletBtn.createSwitch(!0)), e.controls.appendChild(e.danmuBtn), ["click", "touchend"].forEach(function (i) {
  3019. e.danmuBtn.addEventListener(i, function (i) {
  3020. i.preventDefault(), i.stopPropagation(), t.toggleClass(e.danmuBtn, "danmu-switch-active"), t.hasClass(e.danmuBtn, "danmu-switch-active") ? (t.addClass(r, "xgplayer-has-danmu"), e.once("timeupdate", a)) : (t.removeClass(r, "xgplayer-has-danmu"), n.stop())
  3021. })
  3022. }), e.onElementClick && r.addEventListener("click", function (t) {
  3023. e.onElementClick(t, r)
  3024. }, !1), e.onElementDblclick && r.addEventListener("dblclick", function (t) {
  3025. e.onElementDblclick(t, r)
  3026. }, !1), e.on("pause", i), e.on("play", o), e.on("seeked", l), e.once("destroy", function t() {
  3027. e.off("timeupdate", a), e.off("pause", i), e.off("play", o), e.off("seeked", l), e.off("destroy", t)
  3028. })
  3029. }
  3030. })
  3031. })
  3032. }, function (e, t, n) {
  3033. "use strict";
  3034. var r, a = n(0), i = (r = a) && r.__esModule ? r : {default: r};
  3035. i.default.install("cssFullscreen", function () {
  3036. var e = this, t = e.root, n = i.default.util;
  3037. function r() {
  3038. n.hasClass(t, "xgplayer-is-cssfullscreen") ? n.removeClass(t, "xgplayer-is-cssfullscreen") : n.addClass(t, "xgplayer-is-cssfullscreen")
  3039. }
  3040. e.on("cssFullscreenBtnClick", r), e.on("exitFullscreen", function () {
  3041. n.removeClass(t, "xgplayer-is-cssfullscreen")
  3042. }), e.once("destroy", function t() {
  3043. e.off("cssFullscreenBtnClick", r), e.off("destroy", t)
  3044. })
  3045. })
  3046. }, function (e, t, n) {
  3047. "use strict";
  3048. n(53), n(58), n(59), n(62), n(65), n(66), n(67), n(70), n(73), n(77), n(78), n(80), n(81), n(82), n(84), n(85), n(86), n(88), n(92), n(93), n(95), n(97), n(98), n(99)
  3049. }, function (e, t, n) {
  3050. var r = n(54);
  3051. "string" == typeof r && (r = [[e.i, r, ""]]);
  3052. var a = {hmr: !0, transform: void 0, insertInto: void 0};
  3053. n(56)(r, a);
  3054. r.locals && (e.exports = r.locals)
  3055. }, function (e, t, n) {
  3056. (e.exports = n(55)(!1)).push([e.i, '.xgplayer-skin-default{background:#000;width:100%;height:100%;position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none;-ms-user-select:none}.xgplayer-skin-default *{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}.xgplayer-skin-default.xgplayer-is-fullscreen{width:100%!important;height:100%!important;padding-top:0!important;z-index:9999}.xgplayer-skin-default.xgplayer-is-fullscreen.xgplayer-inactive{cursor:none}.xgplayer-skin-default video{width:100%;height:100%;outline:none}.xgplayer-skin-default .xgplayer-none{display:none}.xgplayer-skin-default .xgplayer-play,.xgplayer-skin-default .xgplayer-play-img{position:relative;-webkit-order:0;-moz-box-ordinal-group:1;order:0;display:block;cursor:pointer}.xgplayer-skin-default .xgplayer-play-img .xgplayer-icon,.xgplayer-skin-default .xgplayer-play .xgplayer-icon{margin-top:3px;width:32px}.xgplayer-skin-default .xgplayer-play-img .xgplayer-icon div,.xgplayer-skin-default .xgplayer-play .xgplayer-icon div{position:absolute}.xgplayer-skin-default .xgplayer-play-img .xgplayer-icon .xgplayer-icon-play,.xgplayer-skin-default .xgplayer-play .xgplayer-icon .xgplayer-icon-play{display:block}.xgplayer-skin-default .xgplayer-play-img .xgplayer-icon .xgplayer-icon-pause,.xgplayer-skin-default .xgplayer-play .xgplayer-icon .xgplayer-icon-pause{display:none}.xgplayer-skin-default .xgplayer-play-img .xgplayer-tips .xgplayer-tip-play,.xgplayer-skin-default .xgplayer-play .xgplayer-tips .xgplayer-tip-play{display:block}.xgplayer-skin-default .xgplayer-play-img .xgplayer-tips .xgplayer-tip-pause,.xgplayer-skin-default .xgplayer-play .xgplayer-tips .xgplayer-tip-pause{display:none}.xgplayer-skin-default .xgplayer-play-img:hover,.xgplayer-skin-default .xgplayer-play:hover{opacity:.85}.xgplayer-skin-default .xgplayer-play-img:hover .xgplayer-tips,.xgplayer-skin-default .xgplayer-play:hover .xgplayer-tips{display:block}.xgplayer-skin-default.xgplayer-playing .xgplayer-play-img .xgplayer-icon .xgplayer-icon-play,.xgplayer-skin-default.xgplayer-playing .xgplayer-play .xgplayer-icon .xgplayer-icon-play{display:none}.xgplayer-skin-default.xgplayer-playing .xgplayer-play-img .xgplayer-icon .xgplayer-icon-pause,.xgplayer-skin-default.xgplayer-playing .xgplayer-play .xgplayer-icon .xgplayer-icon-pause{display:block}.xgplayer-skin-default.xgplayer-playing .xgplayer-play-img .xgplayer-tips .xgplayer-tip-play,.xgplayer-skin-default.xgplayer-playing .xgplayer-play .xgplayer-tips .xgplayer-tip-play{display:none}.xgplayer-skin-default.xgplayer-pause .xgplayer-play-img .xgplayer-icon .xgplayer-icon-play,.xgplayer-skin-default.xgplayer-pause .xgplayer-play .xgplayer-icon .xgplayer-icon-play,.xgplayer-skin-default.xgplayer-playing .xgplayer-play-img .xgplayer-tips .xgplayer-tip-pause,.xgplayer-skin-default.xgplayer-playing .xgplayer-play .xgplayer-tips .xgplayer-tip-pause{display:block}.xgplayer-skin-default.xgplayer-pause .xgplayer-play-img .xgplayer-icon .xgplayer-icon-pause,.xgplayer-skin-default.xgplayer-pause .xgplayer-play .xgplayer-icon .xgplayer-icon-pause{display:none}.xgplayer-skin-default.xgplayer-pause .xgplayer-play-img .xgplayer-tips .xgplayer-tip-play,.xgplayer-skin-default.xgplayer-pause .xgplayer-play .xgplayer-tips .xgplayer-tip-play{display:block}.xgplayer-skin-default.xgplayer-pause .xgplayer-play-img .xgplayer-tips .xgplayer-tip-pause,.xgplayer-skin-default.xgplayer-pause .xgplayer-play .xgplayer-tips .xgplayer-tip-pause{display:none}.xgplayer-skin-default .xgplayer-start{border-radius:50%;display:inline-block;width:70px;height:70px;background:rgba(0,0,0,.38);overflow:hidden;text-align:center;line-height:70px;vertical-align:middle;position:absolute;left:50%;top:50%;z-index:115;margin:-35px auto auto -35px;cursor:pointer}.xgplayer-skin-default .xgplayer-start div{position:absolute}.xgplayer-skin-default .xgplayer-start div svg{fill:hsla(0,0%,100%,.7);margin:14px}.xgplayer-skin-default .xgplayer-start .xgplayer-icon-play{display:block}.xgplayer-skin-default .xgplayer-start .xgplayer-icon-pause{display:none}.xgplayer-skin-default .xgplayer-start:hover{opacity:.85}.xgplayer-skin-default.xgplayer-playing .xgplayer-start,.xgplayer-skin-default.xgplayer-playing .xgplayer-start .xgplayer-icon-play{display:none}.xgplayer-skin-default.xgplayer-playing .xgplayer-start .xgplayer-icon-pause{display:block}.xgplayer-skin-default.xgplayer-pause .xgplayer-start{display:inline-block}.xgplayer-skin-default.xgplayer-pause .xgplayer-start .xgplayer-icon-play{display:block}.xgplayer-skin-default.replay .xgplayer-start,.xgplayer-skin-default.xgplayer-pause .xgplayer-start .xgplayer-icon-pause{display:none}.xgplayer-skin-default.replay .xgplayer-start .xgplayer-icon-play{display:block}.xgplayer-skin-default.replay .xgplayer-start .xgplayer-icon-pause{display:none}.xgplayer-skin-default .xgplayer-enter{display:none;position:absolute;left:0;top:0;width:100%;height:100%;background:url("//s2.pstatp.com/cdn/expire-1-M/byted-player-images/1.0.2/bg.svg") no-repeat 50%/cover;z-index:120}.xgplayer-skin-default .xgplayer-enter .xgplayer-enter-spinner{display:block;position:absolute;left:50%;top:50%;height:100px;width:100px;position:relative;-webkit-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.xgplayer-skin-default .xgplayer-enter .xgplayer-enter-spinner div{width:12%;height:26%;background-color:hsla(0,0%,100%,.7);position:absolute;left:44%;top:37%;opacity:0;border-radius:30px;-webkit-animation:fade 1s linear infinite;animation:fade 1s linear infinite}.xgplayer-skin-default .xgplayer-enter .xgplayer-enter-spinner div.xgplayer-enter-bar1{-webkit-transform:rotate(0deg) translateY(-142%);-ms-transform:rotate(0deg) translateY(-142%);transform:rotate(0deg) translateY(-142%);-webkit-animation-delay:0s;animation-delay:0s}.xgplayer-skin-default .xgplayer-enter .xgplayer-enter-spinner div.xgplayer-enter-bar2{-webkit-transform:rotate(30deg) translateY(-142%);-ms-transform:rotate(30deg) translateY(-142%);transform:rotate(30deg) translateY(-142%);-webkit-animation-delay:-.9163s;animation-delay:-.9163s}.xgplayer-skin-default .xgplayer-enter .xgplayer-enter-spinner div.xgplayer-enter-bar3{-webkit-transform:rotate(60deg) translateY(-142%);-ms-transform:rotate(60deg) translateY(-142%);transform:rotate(60deg) translateY(-142%);-webkit-animation-delay:-.833s;animation-delay:-.833s}.xgplayer-skin-default .xgplayer-enter .xgplayer-enter-spinner div.xgplayer-enter-bar4{-webkit-transform:rotate(90deg) translateY(-142%);-ms-transform:rotate(90deg) translateY(-142%);transform:rotate(90deg) translateY(-142%);-webkit-animation-delay:-.7497s;animation-delay:-.7497s}.xgplayer-skin-default .xgplayer-enter .xgplayer-enter-spinner div.xgplayer-enter-bar5{-webkit-transform:rotate(120deg) translateY(-142%);-ms-transform:rotate(120deg) translateY(-142%);transform:rotate(120deg) translateY(-142%);-webkit-animation-delay:-.6664s;animation-delay:-.6664s}.xgplayer-skin-default .xgplayer-enter .xgplayer-enter-spinner div.xgplayer-enter-bar6{-webkit-transform:rotate(150deg) translateY(-142%);-ms-transform:rotate(150deg) translateY(-142%);transform:rotate(150deg) translateY(-142%);-webkit-animation-delay:-.5831s;animation-delay:-.5831s}.xgplayer-skin-default .xgplayer-enter .xgplayer-enter-spinner div.xgplayer-enter-bar7{-webkit-transform:rotate(180deg) translateY(-142%);-ms-transform:rotate(180deg) translateY(-142%);transform:rotate(180deg) translateY(-142%);-webkit-animation-delay:-.4998s;animation-delay:-.4998s}.xgplayer-skin-default .xgplayer-enter .xgplayer-enter-spinner div.xgplayer-enter-bar8{-webkit-transform:rotate(210deg) translateY(-142%);-ms-transform:rotate(210deg) translateY(-142%);transform:rotate(210deg) translateY(-142%);-webkit-animation-delay:-.4165s;animation-delay:-.4165s}.xgplayer-skin-default .xgplayer-enter .xgplayer-enter-spinner div.xgplayer-enter-bar9{-webkit-transform:rotate(240deg) translateY(-142%);-ms-transform:rotate(240deg) translateY(-142%);transform:rotate(240deg) translateY(-142%);-webkit-animation-delay:-.3332s;animation-delay:-.3332s}.xgplayer-skin-default .xgplayer-enter .xgplayer-enter-spinner div.xgplayer-enter-bar10{-webkit-transform:rotate(270deg) translateY(-142%);-ms-transform:rotate(270deg) translateY(-142%);transform:rotate(270deg) translateY(-142%);-webkit-animation-delay:-.2499s;animation-delay:-.2499s}.xgplayer-skin-default .xgplayer-enter .xgplayer-enter-spinner div.xgplayer-enter-bar11{-webkit-transform:rotate(300deg) translateY(-142%);-ms-transform:rotate(300deg) translateY(-142%);transform:rotate(300deg) translateY(-142%);-webkit-animation-delay:-.1666s;animation-delay:-.1666s}.xgplayer-skin-default .xgplayer-enter .xgplayer-enter-spinner div.xgplayer-enter-bar12{-webkit-transform:rotate(330deg) translateY(-142%);-ms-transform:rotate(330deg) translateY(-142%);transform:rotate(330deg) translateY(-142%);-webkit-animation-delay:-.0833s;animation-delay:-.0833s}@-webkit-keyframes fade{0%{opacity:1}to{opacity:.25}}.xgplayer-skin-default.xgplayer-is-enter .xgplayer-enter{display:block}.xgplayer-skin-default .xgplayer-poster{display:none;position:absolute;left:0;top:0;width:100%;height:100%;z-index:100;background-size:cover;background-position:50%}.xgplayer-skin-default.xgplayer-nostart .xgplayer-poster{display:block}.xgplayer-skin-default .xgplayer-placeholder{-webkit-flex:1;-moz-box-flex:1;flex:1;-webkit-order:3;-moz-box-ordinal-group:4;order:3;display:block}.xgplayer-skin-default .xgplayer-fullscreen,.xgplayer-skin-default .xgplayer-fullscreen-img{position:relative;-webkit-order:13;-moz-box-ordinal-group:14;order:13;display:block;cursor:pointer}.xgplayer-skin-default .xgplayer-fullscreen-img .xgplayer-icon,.xgplayer-skin-default .xgplayer-fullscreen .xgplayer-icon{margin-top:3px}.xgplayer-skin-default .xgplayer-fullscreen-img .xgplayer-icon div,.xgplayer-skin-default .xgplayer-fullscreen .xgplayer-icon div{position:absolute}.xgplayer-skin-default .xgplayer-fullscreen-img .xgplayer-icon .xgplayer-icon-requestfull,.xgplayer-skin-default .xgplayer-fullscreen .xgplayer-icon .xgplayer-icon-requestfull{display:block}.xgplayer-skin-default .xgplayer-fullscreen-img .xgplayer-icon .xgplayer-icon-exitfull,.xgplayer-skin-default .xgplayer-fullscreen .xgplayer-icon .xgplayer-icon-exitfull{display:none}.xgplayer-skin-default .xgplayer-fullscreen-img .xgplayer-tips,.xgplayer-skin-default .xgplayer-fullscreen .xgplayer-tips{position:absolute;right:0;left:auto}.xgplayer-skin-default .xgplayer-fullscreen-img .xgplayer-tips .xgplayer-tip-requestfull,.xgplayer-skin-default .xgplayer-fullscreen .xgplayer-tips .xgplayer-tip-requestfull{display:block}.xgplayer-skin-default .xgplayer-fullscreen-img .xgplayer-tips .xgplayer-tip-exitfull,.xgplayer-skin-default .xgplayer-fullscreen .xgplayer-tips .xgplayer-tip-exitfull{display:none}.xgplayer-skin-default .xgplayer-fullscreen-img:hover,.xgplayer-skin-default .xgplayer-fullscreen:hover{opacity:.85}.xgplayer-skin-default .xgplayer-fullscreen-img:hover .xgplayer-tips,.xgplayer-skin-default .xgplayer-fullscreen:hover .xgplayer-tips{display:block}.xgplayer-skin-default.xgplayer-is-fullscreen .xgplayer-fullscreen-img .xgplayer-icon .xgplayer-icon-requestfull,.xgplayer-skin-default.xgplayer-is-fullscreen .xgplayer-fullscreen .xgplayer-icon .xgplayer-icon-requestfull{display:none}.xgplayer-skin-default.xgplayer-is-fullscreen .xgplayer-fullscreen-img .xgplayer-icon .xgplayer-icon-exitfull,.xgplayer-skin-default.xgplayer-is-fullscreen .xgplayer-fullscreen .xgplayer-icon .xgplayer-icon-exitfull{display:block}.xgplayer-skin-default.xgplayer-is-fullscreen .xgplayer-fullscreen-img .xgplayer-tips .xgplayer-tip-requestfull,.xgplayer-skin-default.xgplayer-is-fullscreen .xgplayer-fullscreen .xgplayer-tips .xgplayer-tip-requestfull{display:none}.xgplayer-skin-default.xgplayer-is-fullscreen .xgplayer-fullscreen-img .xgplayer-tips .xgplayer-tip-exitfull,.xgplayer-skin-default.xgplayer-is-fullscreen .xgplayer-fullscreen .xgplayer-tips .xgplayer-tip-exitfull{display:block}.xgplayer-skin-default .xgplayer-cssfullscreen,.xgplayer-skin-default .xgplayer-cssfullscreen-img{position:relative;-webkit-order:12;-moz-box-ordinal-group:13;order:12;display:block;cursor:pointer}.xgplayer-skin-default .xgplayer-cssfullscreen-img .xgplayer-icon,.xgplayer-skin-default .xgplayer-cssfullscreen .xgplayer-icon{width:32px;margin-top:5px}.xgplayer-skin-default .xgplayer-cssfullscreen-img .xgplayer-icon div,.xgplayer-skin-default .xgplayer-cssfullscreen .xgplayer-icon div{position:absolute}.xgplayer-skin-default .xgplayer-cssfullscreen-img .xgplayer-icon .xgplayer-icon-requestfull,.xgplayer-skin-default .xgplayer-cssfullscreen .xgplayer-icon .xgplayer-icon-requestfull{display:block}.xgplayer-skin-default .xgplayer-cssfullscreen-img .xgplayer-icon .xgplayer-icon-exitfull,.xgplayer-skin-default .xgplayer-cssfullscreen .xgplayer-icon .xgplayer-icon-exitfull{display:none}.xgplayer-skin-default .xgplayer-cssfullscreen-img .xgplayer-tips,.xgplayer-skin-default .xgplayer-cssfullscreen .xgplayer-tips{margin-left:-40px}.xgplayer-skin-default .xgplayer-cssfullscreen-img .xgplayer-tips .xgplayer-tip-requestfull,.xgplayer-skin-default .xgplayer-cssfullscreen .xgplayer-tips .xgplayer-tip-requestfull{display:block}.xgplayer-skin-default .xgplayer-cssfullscreen-img .xgplayer-tips .xgplayer-tip-exitfull,.xgplayer-skin-default .xgplayer-cssfullscreen .xgplayer-tips .xgplayer-tip-exitfull{display:none}.xgplayer-skin-default .xgplayer-cssfullscreen-img:hover,.xgplayer-skin-default .xgplayer-cssfullscreen:hover{opacity:.85}.xgplayer-skin-default .xgplayer-cssfullscreen-img:hover .xgplayer-tips,.xgplayer-skin-default .xgplayer-cssfullscreen:hover .xgplayer-tips{display:block}.xgplayer-skin-default.xgplayer-is-cssfullscreen .xgplayer-cssfullscreen-img .xgplayer-icon .xgplayer-icon-requestfull,.xgplayer-skin-default.xgplayer-is-cssfullscreen .xgplayer-cssfullscreen .xgplayer-icon .xgplayer-icon-requestfull{display:none}.xgplayer-skin-default.xgplayer-is-cssfullscreen .xgplayer-cssfullscreen-img .xgplayer-icon .xgplayer-icon-exitfull,.xgplayer-skin-default.xgplayer-is-cssfullscreen .xgplayer-cssfullscreen .xgplayer-icon .xgplayer-icon-exitfull{display:block}.xgplayer-skin-default.xgplayer-is-cssfullscreen .xgplayer-cssfullscreen-img .xgplayer-tips,.xgplayer-skin-default.xgplayer-is-cssfullscreen .xgplayer-cssfullscreen .xgplayer-tips{margin-left:-47px}.xgplayer-skin-default.xgplayer-is-cssfullscreen .xgplayer-cssfullscreen-img .xgplayer-tips .xgplayer-tip-requestfull,.xgplayer-skin-default.xgplayer-is-cssfullscreen .xgplayer-cssfullscreen .xgplayer-tips .xgplayer-tip-requestfull{display:none}.xgplayer-skin-default.xgplayer-is-cssfullscreen .xgplayer-cssfullscreen-img .xgplayer-tips .xgplayer-tip-exitfull,.xgplayer-skin-default.xgplayer-is-cssfullscreen .xgplayer-cssfullscreen .xgplayer-tips .xgplayer-tip-exitfull{display:block}.xgplayer-skin-default.xgplayer-is-fullscreen .xgplayer-cssfullscreen,.xgplayer-skin-default.xgplayer-is-fullscreen .xgplayer-cssfullscreen-img{display:none}.xgplayer-skin-default.xgplayer-is-cssfullscreen{position:fixed!important;left:0!important;top:0!important;width:100%!important;height:100%!important;z-index:99999!important}.lang-is-en .xgplayer-cssfullscreen-img .xgplayer-tips,.lang-is-en .xgplayer-cssfullscreen .xgplayer-tips,.lang-is-en.xgplayer-is-cssfullscreen .xgplayer-cssfullscreen-img .xgplayer-tips,.lang-is-en.xgplayer-is-cssfullscreen .xgplayer-cssfullscreen .xgplayer-tips{margin-left:-46px}.lang-is-jp .xgplayer-cssfullscreen-img .xgplayer-tips,.lang-is-jp .xgplayer-cssfullscreen .xgplayer-tips{margin-left:-120px}.lang-is-jp.xgplayer-is-cssfullscreen .xgplayer-cssfullscreen-img .xgplayer-tips,.lang-is-jp.xgplayer-is-cssfullscreen .xgplayer-cssfullscreen .xgplayer-tips{margin-left:-60px}.xgplayer-skin-default .xgplayer-volume{outline:none;-webkit-order:4;-moz-box-ordinal-group:5;order:4;width:28px;height:140px;display:block;position:relative;margin-top:-100px;z-index:18}.xgplayer-skin-default .xgplayer-volume .xgplayer-icon{margin-top:8px;cursor:pointer;position:absolute;bottom:-9px}.xgplayer-skin-default .xgplayer-volume .xgplayer-icon div{position:absolute}.xgplayer-skin-default .xgplayer-volume .xgplayer-icon .xgplayer-icon-large{display:block}.xgplayer-skin-default .xgplayer-volume .xgplayer-icon .xgplayer-icon-muted,.xgplayer-skin-default .xgplayer-volume .xgplayer-icon .xgplayer-icon-small{display:none}.xgplayer-skin-default .xgplayer-slider{display:none;position:absolute;width:28px;height:88px;background:rgba(0,0,0,.54);border-radius:1px;bottom:42px;outline:none}.xgplayer-skin-default .xgplayer-slider:after{content:" ";display:block;height:15px;width:28px;position:absolute;bottom:-15px;left:0;z-index:20}.xgplayer-skin-default .xgplayer-bar,.xgplayer-skin-default .xgplayer-drag{display:block;position:absolute;bottom:6px;left:12px;background:hsla(0,0%,100%,.3);border-radius:100px;width:4px;height:76px;outline:none;cursor:pointer}.xgplayer-skin-default .xgplayer-drag{bottom:0;left:0;background:#fa1f41;max-height:76px}.xgplayer-skin-default .xgplayer-drag:after{content:" ";display:inline-block;width:8px;height:8px;background:#fff;box-shadow:0 0 5px 0 rgba(0,0,0,.26);position:absolute;border-radius:50%;left:-2px;top:-6px}.xgplayer-skin-default.xgplayer-volume-active .xgplayer-slider,.xgplayer-skin-default.xgplayer-volume-large .xgplayer-volume .xgplayer-icon .xgplayer-icon-large{display:block}.xgplayer-skin-default.xgplayer-volume-large .xgplayer-volume .xgplayer-icon .xgplayer-icon-muted,.xgplayer-skin-default.xgplayer-volume-large .xgplayer-volume .xgplayer-icon .xgplayer-icon-small,.xgplayer-skin-default.xgplayer-volume-small .xgplayer-volume .xgplayer-icon .xgplayer-icon-large{display:none}.xgplayer-skin-default.xgplayer-volume-small .xgplayer-volume .xgplayer-icon .xgplayer-icon-small{display:block}.xgplayer-skin-default.xgplayer-volume-muted .xgplayer-volume .xgplayer-icon .xgplayer-icon-large,.xgplayer-skin-default.xgplayer-volume-muted .xgplayer-volume .xgplayer-icon .xgplayer-icon-small,.xgplayer-skin-default.xgplayer-volume-small .xgplayer-volume .xgplayer-icon .xgplayer-icon-muted{display:none}.xgplayer-skin-default.xgplayer-volume-muted .xgplayer-volume .xgplayer-icon .xgplayer-icon-muted{display:block}.xgplayer-skin-default .xgplayer-definition{-webkit-order:5;-moz-box-ordinal-group:6;order:5;width:60px;height:150px;z-index:18;position:relative;outline:none;display:none;cursor:default;margin-left:10px;margin-top:-119px}.xgplayer-skin-default .xgplayer-definition ul{display:none;list-style:none;width:78px;background:rgba(0,0,0,.54);border-radius:1px;position:absolute;bottom:30px;left:0;text-align:center;white-space:nowrap;margin-left:-10px;z-index:26;cursor:pointer}.xgplayer-skin-default .xgplayer-definition ul li{opacity:.7;font-family:PingFangSC-Regular;font-size:11px;color:hsla(0,0%,100%,.8);padding:6px 13px}.xgplayer-skin-default .xgplayer-definition ul li.selected,.xgplayer-skin-default .xgplayer-definition ul li:hover{color:#fff;opacity:1}.xgplayer-skin-default .xgplayer-definition .name{text-align:center;font-family:PingFangSC-Regular;font-size:13px;cursor:pointer;color:hsla(0,0%,100%,.8);position:absolute;bottom:0;width:60px;height:20px;line-height:20px;background:rgba(0,0,0,.38);border-radius:10px;display:inline-block;vertical-align:middle}.xgplayer-skin-default.xgplayer-definition-active .xgplayer-definition ul,.xgplayer-skin-default.xgplayer-is-definition .xgplayer-definition{display:block}.xgplayer-skin-default .xgplayer-time{-webkit-order:2;-moz-box-ordinal-group:3;order:2;font-family:ArialMT;font-size:13px;color:#fff;line-height:40px;text-align:center;display:inline-block}.xgplayer-skin-default .xgplayer-time span:after{content:"/";display:inline-block;padding:0 3px}.xgplayer-skin-default .xgplayer-time em{color:hsla(0,0%,100%,.5)}.xgplayer-skin-default .xgplayer-controls{display:-webkit-flex;display:-moz-box;display:flex;position:absolute;bottom:0;left:0;right:0;height:40px;background-image:linear-gradient(180deg,transparent,rgba(0,0,0,.37),rgba(0,0,0,.75),rgba(0,0,0,.75));z-index:10}.xgplayer-skin-default.no-controls .xgplayer-controls,.xgplayer-skin-default.xgplayer-inactive .xgplayer-controls,.xgplayer-skin-default.xgplayer-is-live .xgplayer-controls>*,.xgplayer-skin-default.xgplayer-nostart .xgplayer-controls{display:none}.xgplayer-skin-default.xgplayer-is-live .xgplayer-controls .xgplayer-fullscreen,.xgplayer-skin-default.xgplayer-is-live .xgplayer-controls .xgplayer-live,.xgplayer-skin-default.xgplayer-is-live .xgplayer-controls .xgplayer-placeholder,.xgplayer-skin-default.xgplayer-is-live .xgplayer-controls .xgplayer-play,.xgplayer-skin-default.xgplayer-is-live .xgplayer-controls .xgplayer-play-img,.xgplayer-skin-default.xgplayer-is-live .xgplayer-controls .xgplayer-volume{display:block}.xgplayer-skin-default .xgplayer-live{display:block;font-size:12px;color:#fff;line-height:40px;-webkit-order:1;-moz-box-ordinal-group:2;order:1}.xgplayer-skin-default .xgplayer-loading{display:none;width:100px;height:100px;overflow:hidden;-webkit-transform:scale(.7);-ms-transform:scale(.7);transform:scale(.7);position:absolute;left:50%;top:50%;margin:-70px auto auto -50px}.xgplayer-skin-default .xgplayer-loading svg{border-radius:50%;-webkit-transform-origin:center;-ms-transform-origin:center;transform-origin:center;-webkit-animation:loadingRotate 1s linear infinite;animation:loadingRotate 1s linear infinite}.xgplayer-skin-default .xgplayer-loading svg path{stroke:#ddd;stroke-dasharray:236;-webkit-animation:loadingDashOffset 2s linear infinite;animation:loadingDashOffset 2s linear infinite;animation-direction:alternate-reverse;fill:none;stroke-width:12px}.xgplayer-skin-default.xgplayer-nostart .xgplayer-loading{display:none}.xgplayer-skin-default.xgplayer-isloading .xgplayer-loading{display:block}.xgplayer-skin-default .xgplayer-progress{display:block;position:absolute;height:20px;line-height:20px;left:0;right:0;outline:none;top:-10px;z-index:35}.xgplayer-skin-default .xgplayer-progress-outer{background:hsla(0,0%,100%,.3);display:block;height:3px;line-height:3px;margin-top:8.5px;width:100%;position:relative;cursor:pointer}.xgplayer-skin-default .xgplayer-progress-cache,.xgplayer-skin-default .xgplayer-progress-played{display:block;height:100%;line-height:1;position:absolute;left:0;top:0}.xgplayer-skin-default .xgplayer-progress-cache{width:0;background:hsla(0,0%,100%,.5)}.xgplayer-skin-default .xgplayer-progress-played{display:block;width:0;background-image:linear-gradient(-90deg,#fa1f41,#e31106);border-radius:0 1.5px 1.5px 0}.xgplayer-skin-default .xgplayer-progress-btn{display:none;position:absolute;left:0;top:-6px;width:14px;height:16px;border-radius:5px;background:#fff;box-shadow:0 0 2px 0 rgba(0,0,0,.26)}.xgplayer-skin-default .xgplayer-progress-point{position:absolute}.xgplayer-skin-default .xgplayer-progress-point.xgplayer-tips{margin-left:0;top:-25px;display:none;z-index:100}.xgplayer-skin-default .xgplayer-progress-dot{display:inline-block;position:absolute;height:3px;width:5px;top:0;background:#fff;border-radius:6px;z-index:16}.xgplayer-skin-default .xgplayer-progress-dot .xgplayer-progress-tip{position:absolute;left:0;top:-40px;height:auto;line-height:30px;width:auto;-webkit-transform:scale(.8);-ms-transform:scale(.8);transform:scale(.8);background:rgba(0,0,0,.3);border-radius:6px;border:1px solid rgba(0,0,0,.8);cursor:default;white-space:nowrap;display:none}.xgplayer-skin-default .xgplayer-progress-dot-show .xgplayer-progress-tip{display:block}.xgplayer-skin-default .xgplayer-progress-thumbnail{position:absolute;-moz-box-sizing:border-box;box-sizing:border-box}.xgplayer-skin-default .xgplayer-progress-thumbnail.xgplayer-tips{margin-left:0;display:none;z-index:99}.xgplayer-skin-default .xgplayer-progress:focus .xgplayer-progress-outer,.xgplayer-skin-default .xgplayer-progress:hover .xgplayer-progress-outer{height:6px;margin-top:7px}.xgplayer-skin-default .xgplayer-progress:focus .xgplayer-progress-dot,.xgplayer-skin-default .xgplayer-progress:hover .xgplayer-progress-dot{height:6px}.xgplayer-skin-default .xgplayer-progress:focus .xgplayer-progress-btn,.xgplayer-skin-default .xgplayer-progress:hover .xgplayer-progress-btn{display:block}.xgplayer-skin-default.xgplayer-definition-active .xgplayer-progress,.xgplayer-skin-default.xgplayer-playbackrate-active .xgplayer-progress,.xgplayer-skin-default.xgplayer-texttrack-active .xgplayer-progress,.xgplayer-skin-default.xgplayer-volume-active .xgplayer-progress{z-index:15}.xgplayer-skin-default .xgplayer-replay{position:absolute;left:0;top:0;width:100%;height:100%;z-index:105;display:none;-webkit-justify-content:center;-moz-box-pack:center;justify-content:center;-webkit-align-items:center;-moz-box-align:center;align-items:center;background:rgba(0,0,0,.54);-webkit-flex-direction:column;-moz-box-orient:vertical;-moz-box-direction:normal;flex-direction:column}.xgplayer-skin-default .xgplayer-replay svg{background:rgba(0,0,0,.58);border-radius:100%;cursor:pointer}.xgplayer-skin-default .xgplayer-replay svg path{-webkit-transform:translate(20px,21px);-ms-transform:translate(20px,21px);transform:translate(20px,21px);fill:#ddd}.xgplayer-skin-default .xgplayer-replay svg:hover{background:rgba(0,0,0,.38)}.xgplayer-skin-default .xgplayer-replay svg:hover path{fill:#fff}.xgplayer-skin-default .xgplayer-replay .xgplayer-replay-txt{display:inline-block;font-family:PingFangSC-Regular;font-size:14px;color:#fff;line-height:34px}.xgplayer-skin-default.xgplayer.xgplayer-ended .xgplayer-controls{display:none}.xgplayer-skin-default.xgplayer.xgplayer-ended .xgplayer-replay{display:-webkit-flex;display:-moz-box;display:flex}.xgplayer-skin-default .xgplayer-playbackrate{-webkit-order:8;-moz-box-ordinal-group:9;order:8;width:60px;height:20px;z-index:18;position:relative;display:inline-block;cursor:default}.xgplayer-skin-default .xgplayer-playbackrate ul{display:none;list-style:none;width:78px;background:rgba(0,0,0,.54);border-radius:1px;position:absolute;bottom:20px;left:0;text-align:left;white-space:nowrap;z-index:26;cursor:pointer}.xgplayer-skin-default .xgplayer-playbackrate ul li{opacity:.7;font-family:PingFangSC-Regular;font-size:11px;color:hsla(0,0%,100%,.8);position:relative;padding:4px 0;text-align:center}.xgplayer-skin-default .xgplayer-playbackrate ul li.selected,.xgplayer-skin-default .xgplayer-playbackrate ul li:hover{color:#fff;opacity:1}.xgplayer-skin-default .xgplayer-playbackrate ul li:first-child{position:relative;margin-top:12px}.xgplayer-skin-default .xgplayer-playbackrate ul li:last-child{position:relative;margin-bottom:12px}.xgplayer-skin-default .xgplayer-playbackrate .name{height:20px;position:relative;top:11px;text-align:center;background:rgba(0,0,0,.38);color:hsla(0,0%,100%,.8);border-radius:10px;line-height:20px}.xgplayer-skin-default .xgplayer-playbackrate span{position:relative;top:19px;font-weight:700;text-shadow:0 0 4px rgba(0,0,0,.6)}.xgplayer-skin-default .xgplayer-playbackrate:hover{opacity:1}.xgplayer-skin-default.xgplayer-playbackrate-active .xgplayer-playbackrate ul{display:block}.xgplayer-skin-default .xgplayer-download{position:relative;-webkit-order:9;-moz-box-ordinal-group:10;order:9;display:block;cursor:pointer}.xgplayer-skin-default .xgplayer-download .xgplayer-icon{margin-top:3px}.xgplayer-skin-default .xgplayer-download .xgplayer-icon div{position:absolute}.xgplayer-skin-default .xgplayer-download .xgplayer-icon svg{position:relative;top:5px;left:5px}.xgplayer-skin-default .xgplayer-download .xgplayer-tips{margin-left:-20px}.xgplayer-skin-default .xgplayer-download .xgplayer-tips .xgplayer-tip-download{display:block}.xgplayer-skin-default .xgplayer-download:hover{opacity:.85}.xgplayer-skin-default .xgplayer-download:hover .xgplayer-tips{display:block}.lang-is-en .xgplayer-download .xgplayer-tips{margin-left:-32px}.lang-is-jp .xgplayer-download .xgplayer-tips{margin-left:-40px}.xgplayer-skin-default .danmu-switch{-webkit-order:6;-moz-box-ordinal-group:7;order:6;z-index:26}.xgplayer-skin-default .xgplayer-danmu{display:none;position:absolute;top:0;left:0;right:0;height:100%;overflow:hidden;z-index:9;outline:none}.xgplayer-skin-default .xgplayer-danmu>*{position:absolute;white-space:nowrap;z-index:9}.xgplayer-skin-default .xgplayer-danmu.xgplayer-has-danmu{display:block}.xgplayer-skin-default .xgplayer-panel{outline:none;-webkit-order:7;-moz-box-ordinal-group:8;order:7;width:40px;height:40px;display:inline-block;position:relative;font-family:PingFangSC-Regular;font-size:13px;color:hsla(0,0%,100%,.8);z-index:36}.xgplayer-skin-default .xgplayer-panel .xgplayer-panel-icon{cursor:pointer;position:absolute;margin-left:5px;top:10px}.xgplayer-skin-default .xgplayer-panel-active{display:block!important;bottom:30px}.xgplayer-skin-default .xgplayer-panel-slider{z-index:36;display:none;position:absolute;width:230px;height:230px;background:rgba(0,0,0,.54);border-radius:1px;padding:10px 20px;outline:none;left:-115px;bottom:40px}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-hidemode{padding-bottom:10px}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-hidemode-radio li{display:inline;list-style:none;cursor:pointer}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-hidemode ul{display:-webkit-flex;display:-moz-box;display:flex;-webkit-justify-content:space-around;justify-content:space-around}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-hidemode li{margin:0 12px;font-size:11px;color:#aaa}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-hidemode-font{margin-bottom:10px}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-transparency{display:block;margin-top:10px}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-transparency .xgplayer-transparency-line{-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer;outline:none;width:150px;height:4px;background:#aaa;border-radius:4px;border-style:none;margin-left:10px;margin-top:-2px}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-transparency .xgplayer-transparency-line::-moz-focus-outer{border:0!important}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-transparency .xgplayer-transparency-color::-webkit-slider-runnable-track{outline:none;width:150px;height:4px;border-radius:4px}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-transparency .xgplayer-transparency-color::-moz-range-track{outline:none;background-color:#aaa;border-color:transparent;cursor:pointer;width:150px;height:4px;border-radius:4px}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-transparency .xgplayer-transparency-color::-ms-track{outline:none;background-color:#aaa;color:transparent;border-color:transparent;width:150px;height:4px;border-radius:4px}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-transparency .xgplayer-transparency-bar::-webkit-slider-thumb{outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:6px solid #f85959;height:6px;width:6px;margin-top:-4px;border-radius:6px;cursor:pointer}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-transparency .xgplayer-transparency-bar::-moz-range-thumb{outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:6px solid #f85959;height:0;width:0;border-radius:6px;cursor:pointer}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-transparency .xgplayer-transparency-bar::-ms-thumb{outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:6px solid #f85959;height:6px;width:6px;border-radius:6px;cursor:pointer}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-transparency .xgplayer-transparency-bar::-moz-range-progress{outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;height:4px;border-radius:4px;background:linear-gradient(90deg,#f85959,#f85959 100%,#aaa)}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-showarea{display:block;margin-top:8px}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-showarea-name{display:inline-block;position:relative;top:-10px}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-showarea-control{display:inline-block}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-showarea-control-up{width:150px;margin-left:10px;display:-moz-box;display:-webkit-flex;display:flex;-webkit-justify-content:space-between;-moz-box-pack:justify;justify-content:space-between;color:#aaa}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-showarea-control-down{position:relative;top:-10px}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-showarea-control-down-dots{display:-webkit-flex;display:-moz-box;display:flex;width:150px;margin-left:10px;-webkit-justify-content:space-between;-moz-box-pack:justify;justify-content:space-between}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-showarea-threequarters,.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-showarea-twoquarters{margin-left:-6px}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-showarea-full{margin-right:3px}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-showarea .xgplayer-showarea-line{-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer;outline:none;width:150px;height:4px;background:#aaa;border-radius:4px;border-style:none;margin-left:10px;margin-top:-2px}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-showarea .xgplayer-showarea-line::-moz-focus-outer{border:0!important}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-showarea .xgplayer-showarea-color::-webkit-slider-runnable-track{outline:none;width:150px;height:4px;border-radius:4px}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-showarea .xgplayer-showarea-color::-moz-range-track{outline:none;background-color:#aaa;border-color:transparent;cursor:pointer;width:150px;height:4px;border-radius:4px}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-showarea .xgplayer-showarea-color::-ms-track{outline:none;background-color:#aaa;color:transparent;border-color:transparent;width:150px;height:4px;border-radius:4px}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-showarea .xgplayer-showarea-bar::-webkit-slider-thumb{outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:6px solid #f85959;height:6px;width:6px;margin-top:-4px;border-radius:6px;cursor:pointer}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-showarea .xgplayer-showarea-bar::-moz-range-thumb{outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:6px solid #f85959;height:0;width:0;border-radius:6px;cursor:pointer}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-showarea .xgplayer-showarea-bar::-ms-thumb{outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:6px solid #f85959;height:6px;width:6px;border-radius:6px;cursor:pointer}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-showarea .xgplayer-showarea-full-dot,.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-showarea .xgplayer-showarea-onequarters-dot,.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-showarea .xgplayer-showarea-threequarters-dot,.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-showarea .xgplayer-showarea-twoquarters-dot,.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-showarea .xgplayer-showarea-zero-dot{width:3px;height:3px;border:3px solid #aaa;border-radius:50%;background-color:#aaa;position:relative;top:16px;z-index:-1}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-danmuspeed{display:block}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-danmuspeed-name{display:inline-block;position:relative;top:-10px}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-danmuspeed-control{display:inline-block}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-danmuspeed-control-up{width:150px;margin-left:10px;display:-moz-box;display:-webkit-flex;display:flex;-webkit-justify-content:space-between;-moz-box-pack:justify;justify-content:space-between;color:#aaa}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-danmuspeed-control-down{position:relative;top:-10px}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-danmuspeed-control-down-dots{display:-webkit-flex;display:-moz-box;display:flex;width:150px;margin-left:10px;-webkit-justify-content:space-between;-moz-box-pack:justify;justify-content:space-between}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-danmuspeed .xgplayer-danmuspeed-line{-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer;outline:none;width:150px;height:4px;background:#aaa;border-radius:4px;border-style:none;margin-left:10px;margin-top:-2px}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-danmuspeed .xgplayer-danmuspeed-line::-moz-focus-outer{border:0!important}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-danmuspeed .xgplayer-danmuspeed-color::-webkit-slider-runnable-track{outline:none;width:150px;height:4px;border-radius:4px}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-danmuspeed .xgplayer-danmuspeed-color::-moz-range-track{outline:none;background-color:#aaa;border-color:transparent;cursor:pointer;width:150px;height:4px;border-radius:4px}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-danmuspeed .xgplayer-danmuspeed-color::-ms-track{outline:none;background-color:#aaa;color:transparent;border-color:transparent;width:150px;height:4px;border-radius:4px}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-danmuspeed .xgplayer-danmuspeed-bar::-webkit-slider-thumb{outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:6px solid #f85959;height:6px;width:6px;margin-top:-4px;border-radius:6px;cursor:pointer}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-danmuspeed .xgplayer-danmuspeed-bar::-moz-range-thumb{outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:6px solid #f85959;height:0;width:0;border-radius:6px;cursor:pointer}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-danmuspeed .xgplayer-danmuspeed-bar::-ms-thumb{outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:6px solid #f85959;height:6px;width:6px;border-radius:6px;cursor:pointer}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-danmuspeed .xgplayer-danmuspeed-large-dot,.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-danmuspeed .xgplayer-danmuspeed-middle-dot,.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-danmuspeed .xgplayer-danmuspeed-small-dot{width:3px;height:3px;border:3px solid #aaa;border-radius:50%;background-color:#aaa;position:relative;top:16px;z-index:-1}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-danmufont{display:block}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-danmufont-name{display:inline-block;position:relative;top:-10px}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-danmufont-control{display:inline-block}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-danmufont-control-up{width:150px;margin-left:10px;display:-moz-box;display:-webkit-flex;display:flex;-webkit-justify-content:space-between;-moz-box-pack:justify;justify-content:space-between;color:#aaa}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-danmufont-control-down{position:relative;top:-10px}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-danmufont-control-down-dots{display:-webkit-flex;display:-moz-box;display:flex;width:150px;margin-left:10px;-webkit-justify-content:space-between;-moz-box-pack:justify;justify-content:space-between}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-danmufont .xgplayer-danmufont-line{-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer;outline:none;width:150px;height:4px;background:#aaa;border-radius:4px;border-style:none;margin-left:10px;margin-top:-2px}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-danmufont .xgplayer-danmufont-line::-moz-focus-outer{border:0!important}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-danmufont .xgplayer-danmufont-color::-webkit-slider-runnable-track{outline:none;width:150px;height:4px;border-radius:4px}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-danmufont .xgplayer-danmufont-color::-moz-range-track{outline:none;background-color:#aaa;border-color:transparent;cursor:pointer;width:150px;height:4px;border-radius:4px}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-danmufont .xgplayer-danmufont-color::-ms-track{outline:none;background-color:#aaa;color:transparent;border-color:transparent;width:150px;height:4px;border-radius:4px}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-danmufont .xgplayer-danmufont-bar::-webkit-slider-thumb{outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:6px solid #f85959;height:6px;width:6px;margin-top:-4px;border-radius:6px;cursor:pointer}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-danmufont .xgplayer-danmufont-bar::-moz-range-thumb{outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:6px solid #f85959;height:0;width:0;border-radius:6px;cursor:pointer}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-danmufont .xgplayer-danmufont-bar::-ms-thumb{outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:6px solid #f85959;height:6px;width:6px;border-radius:6px;cursor:pointer}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-danmufont .xgplayer-danmufont-large-dot,.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-danmufont .xgplayer-danmufont-middle-dot,.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-danmufont .xgplayer-danmufont-small-dot{width:3px;height:3px;border:3px solid #aaa;border-radius:50%;background-color:#aaa;position:relative;top:16px;z-index:-1}.xgplayer-skin-default .xgplayer-playnext{position:relative;-webkit-order:1;-moz-box-ordinal-group:2;order:1;display:block;cursor:pointer;top:-2px}.xgplayer-skin-default .xgplayer-playnext .xgplayer-icon div{position:absolute}.xgplayer-skin-default .xgplayer-playnext .xgplayer-tips .xgplayer-tip-playnext{display:block}.xgplayer-skin-default .xgplayer-playnext:hover{opacity:.85}.xgplayer-skin-default .xgplayer-playnext:hover .xgplayer-tips{display:block}.lang-is-en .xgplayer-playnext .xgplayer-tips{margin-left:-25px}.lang-is-jp .xgplayer-playnext .xgplayer-tips{margin-left:-38px}.xgplayer-skin-default .xgplayer-pip{-webkit-order:9;-moz-box-ordinal-group:10;order:9;position:relative;outline:none;display:block;cursor:pointer;height:20px;top:8px}.xgplayer-skin-default .xgplayer-pip .name{text-align:center;font-family:PingFangSC-Regular;font-size:13px;line-height:20px;height:20px;color:hsla(0,0%,100%,.8)}.xgplayer-skin-default .xgplayer-pip .name span{width:60px;height:20px;line-height:20px;background:rgba(0,0,0,.38);border-radius:10px;display:inline-block;vertical-align:middle}.xgplayer-skin-default .xgplayer-pip-lay{position:absolute;top:26px;left:0;width:100%;height:100%;z-index:130;cursor:pointer;background-color:transparent;display:none}.xgplayer-skin-default .xgplayer-pip-lay div{width:100%;height:100%}.xgplayer-skin-default .xgplayer-pip-drag{cursor:move;position:absolute;top:0;left:0;width:100%;height:26px;line-height:26px;background-image:linear-gradient(rgba(0,0,0,.3),transparent);z-index:130;display:none}.xgplayer-skin-default.xgplayer-pip-active{position:fixed;right:0;bottom:200px;width:320px!important;height:180px!important;z-index:110!important}.xgplayer-skin-default.xgplayer-pip-active .xgplayer-controls,.xgplayer-skin-default.xgplayer-pip-active .xgplayer-danmu{display:none}.xgplayer-skin-default.xgplayer-pip-active .xgplayer-pip-lay{display:block}.xgplayer-skin-default.xgplayer-pip-active .xgplayer-pip-drag{display:-webkit-flex;display:-moz-box;display:flex}.xgplayer-skin-default.xgplayer-inactive .xgplayer-pip-drag{display:none}.lang-is-jp .xgplayer-pip .name span{width:70px;height:20px}.xgplayer-skin-default .xgplayer-rotate{position:relative;-webkit-order:10;-moz-box-ordinal-group:11;order:10;display:block;cursor:pointer}.xgplayer-skin-default .xgplayer-rotate .xgplayer-icon{margin-top:7px;width:26px}.xgplayer-skin-default .xgplayer-rotate .xgplayer-icon div{position:absolute}.xgplayer-skin-default .xgplayer-rotate .xgplayer-tips{margin-left:-22px}.xgplayer-skin-default .xgplayer-rotate .xgplayer-tips .xgplayer-tip-rotate{display:block}.xgplayer-skin-default .xgplayer-rotate:hover{opacity:.85}.xgplayer-skin-default .xgplayer-rotate:hover .xgplayer-tips{display:block}.lang-is-en .xgplayer-rotate .xgplayer-tips{margin-left:-26px}.lang-is-jp .xgplayer-rotate .xgplayer-tips{margin-left:-38px}.xgplayer-skin-default .xgplayer-screenshot{-webkit-order:11;-moz-box-ordinal-group:12;order:11;position:relative;outline:none;display:block;cursor:pointer;height:20px;top:8px}.xgplayer-skin-default .xgplayer-screenshot .name{text-align:center;font-family:PingFangSC-Regular;font-size:13px;line-height:20px;height:20px;color:hsla(0,0%,100%,.8)}.xgplayer-skin-default .xgplayer-screenshot .name span{width:60px;height:20px;line-height:20px;background:rgba(0,0,0,.38);border-radius:10px;display:inline-block;vertical-align:middle}.lang-is-en .xgplayer-screenshot .name span,.lang-is-jp .xgplayer-screenshot .name span{width:75px;height:20px}.xgplayer-skin-default .xgplayer-texttrack{-webkit-order:7;-moz-box-ordinal-group:8;order:7;width:60px;height:150px;z-index:18;position:relative;outline:none;display:none;cursor:default;margin-top:-119px}.xgplayer-skin-default .xgplayer-texttrack ul{display:none;list-style:none;width:78px;background:rgba(0,0,0,.54);border-radius:1px;position:absolute;bottom:30px;left:0;text-align:center;white-space:nowrap;margin-left:-10px;z-index:26;cursor:pointer}.xgplayer-skin-default .xgplayer-texttrack ul li{opacity:.7;font-family:PingFangSC-Regular;font-size:11px;color:hsla(0,0%,100%,.8);padding:6px 13px}.xgplayer-skin-default .xgplayer-texttrack ul li.selected,.xgplayer-skin-default .xgplayer-texttrack ul li:hover{color:#fff;opacity:1}.xgplayer-skin-default .xgplayer-texttrack .name{text-align:center;font-family:PingFangSC-Regular;font-size:13px;cursor:pointer;color:hsla(0,0%,100%,.8);position:absolute;bottom:0;width:60px;height:20px;line-height:20px;background:rgba(0,0,0,.38);border-radius:10px;display:inline-block;vertical-align:middle}.xgplayer-skin-default.xgplayer-is-texttrack .xgplayer-texttrack,.xgplayer-skin-default.xgplayer-texttrack-active .xgplayer-texttrack ul{display:block}.xgplayer-skin-default .xgplayer-icon{display:block;width:40px;height:40px;overflow:hidden;fill:#fff}.xgplayer-skin-default .xgplayer-tips{background:rgba(0,0,0,.54);border-radius:1px;font-size:11px;padding:2px 4px;top:-30px;left:50%;margin-left:-16px;width:auto;white-space:nowrap}.xgplayer-skin-default .xgplayer-error,.xgplayer-skin-default .xgplayer-tips{display:none;position:absolute;font-family:PingFangSC-Regular;color:#fff;text-align:center}.xgplayer-skin-default .xgplayer-error{background:#000;left:0;top:0;width:100%;height:100%;z-index:125;font-size:14px;line-height:100%;-webkit-justify-content:center;-moz-box-pack:center;justify-content:center;-webkit-align-items:center;-moz-box-align:center;align-items:center}.xgplayer-skin-default .xgplayer-error .xgplayer-error-refresh{color:#fa1f41;padding:0 3px;cursor:pointer}.xgplayer-skin-default .xgplayer-error .xgplayer-error-text{line-height:18px;margin:auto 6px}.xgplayer-skin-default.xgplayer-is-error .xgplayer-error{display:-webkit-flex;display:-moz-box;display:flex}', ""])
  3057. }, function (e, t, n) {
  3058. "use strict";
  3059. e.exports = function (e) {
  3060. var t = [];
  3061. return t.toString = function () {
  3062. return this.map(function (t) {
  3063. var n = function (e, t) {
  3064. var n = e[1] || "", r = e[3];
  3065. if (!r) return n;
  3066. if (t && "function" == typeof btoa) {
  3067. var a = (o = r, "/*# sourceMappingURL=data:application/json;charset=utf-8;base64," + btoa(unescape(encodeURIComponent(JSON.stringify(o)))) + " */"),
  3068. i = r.sources.map(function (e) {
  3069. return "/*# sourceURL=" + r.sourceRoot + e + " */"
  3070. });
  3071. return [n].concat(i).concat([a]).join("\n")
  3072. }
  3073. var o;
  3074. return [n].join("\n")
  3075. }(t, e);
  3076. return t[2] ? "@media " + t[2] + "{" + n + "}" : n
  3077. }).join("")
  3078. }, t.i = function (e, n) {
  3079. "string" == typeof e && (e = [[null, e, ""]]);
  3080. for (var r = {}, a = 0; a < this.length; a++) {
  3081. var i = this[a][0];
  3082. "number" == typeof i && (r[i] = !0)
  3083. }
  3084. for (a = 0; a < e.length; a++) {
  3085. var o = e[a];
  3086. "number" == typeof o[0] && r[o[0]] || (n && !o[2] ? o[2] = n : n && (o[2] = "(" + o[2] + ") and (" + n + ")"), t.push(o))
  3087. }
  3088. }, t
  3089. }
  3090. }, function (e, t, n) {
  3091. var r, a, i = {}, o = (r = function () {
  3092. return window && document && document.all && !window.atob
  3093. }, function () {
  3094. return void 0 === a && (a = r.apply(this, arguments)), a
  3095. }), l = function (e) {
  3096. var t = {};
  3097. return function (e) {
  3098. if ("function" == typeof e) return e();
  3099. if (void 0 === t[e]) {
  3100. var n = function (e) {
  3101. return document.querySelector(e)
  3102. }.call(this, e);
  3103. if (window.HTMLIFrameElement && n instanceof window.HTMLIFrameElement) try {
  3104. n = n.contentDocument.head
  3105. } catch (e) {
  3106. n = null
  3107. }
  3108. t[e] = n
  3109. }
  3110. return t[e]
  3111. }
  3112. }(), s = null, u = 0, c = [], p = n(57);
  3113. function d(e, t) {
  3114. for (var n = 0; n < e.length; n++) {
  3115. var r = e[n], a = i[r.id];
  3116. if (a) {
  3117. a.refs++;
  3118. for (var o = 0; o < a.parts.length; o++) a.parts[o](r.parts[o]);
  3119. for (; o < r.parts.length; o++) a.parts.push(m(r.parts[o], t))
  3120. } else {
  3121. var l = [];
  3122. for (o = 0; o < r.parts.length; o++) l.push(m(r.parts[o], t));
  3123. i[r.id] = {id: r.id, refs: 1, parts: l}
  3124. }
  3125. }
  3126. }
  3127. function f(e, t) {
  3128. for (var n = [], r = {}, a = 0; a < e.length; a++) {
  3129. var i = e[a], o = t.base ? i[0] + t.base : i[0], l = {css: i[1], media: i[2], sourceMap: i[3]};
  3130. r[o] ? r[o].parts.push(l) : n.push(r[o] = {id: o, parts: [l]})
  3131. }
  3132. return n
  3133. }
  3134. function g(e, t) {
  3135. var n = l(e.insertInto);
  3136. if (!n) throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");
  3137. var r = c[c.length - 1];
  3138. if ("top" === e.insertAt) r ? r.nextSibling ? n.insertBefore(t, r.nextSibling) : n.appendChild(t) : n.insertBefore(t, n.firstChild), c.push(t); else if ("bottom" === e.insertAt) n.appendChild(t); else {
  3139. if ("object" != typeof e.insertAt || !e.insertAt.before) throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");
  3140. var a = l(e.insertInto + " " + e.insertAt.before);
  3141. n.insertBefore(t, a)
  3142. }
  3143. }
  3144. function h(e) {
  3145. if (null === e.parentNode) return !1;
  3146. e.parentNode.removeChild(e);
  3147. var t = c.indexOf(e);
  3148. t >= 0 && c.splice(t, 1)
  3149. }
  3150. function y(e) {
  3151. var t = document.createElement("style");
  3152. return e.attrs.type = "text/css", x(t, e.attrs), g(e, t), t
  3153. }
  3154. function x(e, t) {
  3155. Object.keys(t).forEach(function (n) {
  3156. e.setAttribute(n, t[n])
  3157. })
  3158. }
  3159. function m(e, t) {
  3160. var n, r, a, i;
  3161. if (t.transform && e.css) {
  3162. if (!(i = t.transform(e.css))) return function () {
  3163. };
  3164. e.css = i
  3165. }
  3166. if (t.singleton) {
  3167. var o = u++;
  3168. n = s || (s = y(t)), r = k.bind(null, n, o, !1), a = k.bind(null, n, o, !0)
  3169. } else e.sourceMap && "function" == typeof URL && "function" == typeof URL.createObjectURL && "function" == typeof URL.revokeObjectURL && "function" == typeof Blob && "function" == typeof btoa ? (n = function (e) {
  3170. var t = document.createElement("link");
  3171. return e.attrs.type = "text/css", e.attrs.rel = "stylesheet", x(t, e.attrs), g(e, t), t
  3172. }(t), r = function (e, t, n) {
  3173. var r = n.css, a = n.sourceMap, i = void 0 === t.convertToAbsoluteUrls && a;
  3174. (t.convertToAbsoluteUrls || i) && (r = p(r));
  3175. a && (r += "\n/*# sourceMappingURL=data:application/json;base64," + btoa(unescape(encodeURIComponent(JSON.stringify(a)))) + " */");
  3176. var o = new Blob([r], {type: "text/css"}), l = e.href;
  3177. e.href = URL.createObjectURL(o), l && URL.revokeObjectURL(l)
  3178. }.bind(null, n, t), a = function () {
  3179. h(n), n.href && URL.revokeObjectURL(n.href)
  3180. }) : (n = y(t), r = function (e, t) {
  3181. var n = t.css, r = t.media;
  3182. r && e.setAttribute("media", r);
  3183. if (e.styleSheet) e.styleSheet.cssText = n; else {
  3184. for (; e.firstChild;) e.removeChild(e.firstChild);
  3185. e.appendChild(document.createTextNode(n))
  3186. }
  3187. }.bind(null, n), a = function () {
  3188. h(n)
  3189. });
  3190. return r(e), function (t) {
  3191. if (t) {
  3192. if (t.css === e.css && t.media === e.media && t.sourceMap === e.sourceMap) return;
  3193. r(e = t)
  3194. } else a()
  3195. }
  3196. }
  3197. e.exports = function (e, t) {
  3198. if ("undefined" != typeof DEBUG && DEBUG && "object" != typeof document) throw new Error("The style-loader cannot be used in a non-browser environment");
  3199. (t = t || {}).attrs = "object" == typeof t.attrs ? t.attrs : {}, t.singleton || "boolean" == typeof t.singleton || (t.singleton = o()), t.insertInto || (t.insertInto = "head"), t.insertAt || (t.insertAt = "bottom");
  3200. var n = f(e, t);
  3201. return d(n, t), function (e) {
  3202. for (var r = [], a = 0; a < n.length; a++) {
  3203. var o = n[a];
  3204. (l = i[o.id]).refs--, r.push(l)
  3205. }
  3206. e && d(f(e, t), t);
  3207. for (a = 0; a < r.length; a++) {
  3208. var l;
  3209. if (0 === (l = r[a]).refs) {
  3210. for (var s = 0; s < l.parts.length; s++) l.parts[s]();
  3211. delete i[l.id]
  3212. }
  3213. }
  3214. }
  3215. };
  3216. var v, b = (v = [], function (e, t) {
  3217. return v[e] = t, v.filter(Boolean).join("\n")
  3218. });
  3219. function k(e, t, n, r) {
  3220. var a = n ? "" : r.css;
  3221. if (e.styleSheet) e.styleSheet.cssText = b(t, a); else {
  3222. var i = document.createTextNode(a), o = e.childNodes;
  3223. o[t] && e.removeChild(o[t]), o.length ? e.insertBefore(i, o[t]) : e.appendChild(i)
  3224. }
  3225. }
  3226. }, function (e, t, n) {
  3227. "use strict";
  3228. e.exports = function (e) {
  3229. var t = "undefined" != typeof window && window.location;
  3230. if (!t) throw new Error("fixUrls requires window.location");
  3231. if (!e || "string" != typeof e) return e;
  3232. var n = t.protocol + "//" + t.host, r = n + t.pathname.replace(/\/[^\/]*$/, "/");
  3233. return e.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi, function (e, t) {
  3234. var a, i = t.trim().replace(/^"(.*)"$/, function (e, t) {
  3235. return t
  3236. }).replace(/^'(.*)'$/, function (e, t) {
  3237. return t
  3238. });
  3239. return /^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(i) ? e : (a = 0 === i.indexOf("//") ? i : 0 === i.indexOf("/") ? n + i : r + i.replace(/^\.\//, ""), "url(" + JSON.stringify(a) + ")")
  3240. })
  3241. }
  3242. }, function (e, t, n) {
  3243. "use strict";
  3244. var r, a = n(0), i = (r = a) && r.__esModule ? r : {default: r};
  3245. i.default.install("s_enter", function () {
  3246. for (var e = this.root, t = i.default.util, n = "", r = 1; r <= 12; r++) n += '<div class="xgplayer-enter-bar' + r + '"></div>';
  3247. var a = t.createDom("xg-enter", '<div class="xgplayer-enter-spinner">\n ' + n + "\n </div>", {}, "xgplayer-enter");
  3248. e.appendChild(a)
  3249. })
  3250. }, function (e, t, n) {
  3251. "use strict";
  3252. var r = o(n(0)), a = o(n(60)), i = o(n(61));
  3253. function o(e) {
  3254. return e && e.__esModule ? e : {default: e}
  3255. }
  3256. r.default.install("s_play", function () {
  3257. var e = this, t = r.default.util, n = e.config.playBtn ? e.config.playBtn : {}, o = void 0;
  3258. o = "img" === n.type ? t.createImgBtn("play", n.url.play, n.width, n.height) : t.createDom("xg-play", '<xg-icon class="xgplayer-icon">\n <div class="xgplayer-icon-play">' + a.default + '</div>\n <div class="xgplayer-icon-pause">' + i.default + "</div>\n </xg-icon>", {}, "xgplayer-play");
  3259. var l = {};
  3260. l.play = e.lang.PLAY_TIPS, l.pause = e.lang.PAUSE_TIPS;
  3261. var s = t.createDom("xg-tips", '<span class="xgplayer-tip-play">' + l.play + '</span>\n <span class="xgplayer-tip-pause">' + l.pause + "</span>", {}, "xgplayer-tips");
  3262. o.appendChild(s), e.once("ready", function () {
  3263. e.controls.appendChild(o)
  3264. }), ["click", "touchend"].forEach(function (t) {
  3265. o.addEventListener(t, function (t) {
  3266. t.preventDefault(), t.stopPropagation(), e.emit("playBtnClick")
  3267. })
  3268. })
  3269. })
  3270. }, function (e, t, n) {
  3271. "use strict";
  3272. n.r(t), t.default = '<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0 0 40 40">\n <path transform="scale(0.0320625 0.0320625)" d="M576,363L810,512L576,661zM342,214L576,363L576,661L342,810z"></path>\n</svg>\n'
  3273. }, function (e, t, n) {
  3274. "use strict";
  3275. n.r(t), t.default = '<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0 0 40 40">\n <path transform="scale(0.0320625 0.0320625)" d="M598,214h170v596h-170v-596zM256 810v-596h170v596h-170z"></path>\n</svg>\n'
  3276. }, function (e, t, n) {
  3277. "use strict";
  3278. var r = o(n(0)), a = o(n(63)), i = o(n(64));
  3279. function o(e) {
  3280. return e && e.__esModule ? e : {default: e}
  3281. }
  3282. r.default.install("s_start", function () {
  3283. var e = this, t = e.root, n = r.default.util,
  3284. o = n.createDom("xg-start", '<div class="xgplayer-icon-play">' + a.default + '</div>\n <div class="xgplayer-icon-pause">' + i.default + "</div>", {}, "xgplayer-start");
  3285. e.once("ready", function () {
  3286. t.appendChild(o)
  3287. }), o.onclick = function (t) {
  3288. t.preventDefault(), t.stopPropagation(), e.emit("startBtnClick")
  3289. }, e.once("ready", function () {
  3290. n.addClass(e.root, "xgplayer-skin-default"), e.config.lang && "en" === e.config.lang ? n.addClass(e.root, "lang-is-en") : "jp" === e.config.lang && n.addClass(e.root, "lang-is-jp")
  3291. })
  3292. })
  3293. }, function (e, t, n) {
  3294. "use strict";
  3295. n.r(t), t.default = '<svg xmlns="http://www.w3.org/2000/svg" width="70" height="70" viewBox="0 0 70 70">\n <path transform="scale(0.04,0.04)" d="M576,363L810,512L576,661zM342,214L576,363L576,661L342,810z"></path>\n</svg>\n'
  3296. }, function (e, t, n) {
  3297. "use strict";
  3298. n.r(t), t.default = '<svg xmlns="http://www.w3.org/2000/svg" width="70" height="70" viewBox="0 0 70 70">\n <path transform="scale(0.04 0.04)" d="M598,214h170v596h-170v-596zM256 810v-596h170v596h-170z"></path>\n</svg>\n'
  3299. }, function (e, t, n) {
  3300. "use strict";
  3301. var r, a = n(0), i = (r = a) && r.__esModule ? r : {default: r};
  3302. i.default.install("s_poster", function () {
  3303. var e = this.root, t = i.default.util;
  3304. if (this.config.poster) {
  3305. var n = t.createDom("xg-poster", "", {}, "xgplayer-poster");
  3306. n.style.backgroundImage = "url(" + this.config.poster + ")", e.appendChild(n)
  3307. }
  3308. })
  3309. }, function (e, t, n) {
  3310. "use strict";
  3311. var r, a = n(0), i = (r = a) && r.__esModule ? r : {default: r};
  3312. i.default.install("s_flex", function () {
  3313. this.root;
  3314. var e = i.default.util.createDom("xg-placeholder", "", {}, "xgplayer-placeholder");
  3315. this.controls.appendChild(e)
  3316. })
  3317. }, function (e, t, n) {
  3318. "use strict";
  3319. var r = o(n(0)), a = o(n(68)), i = o(n(69));
  3320. function o(e) {
  3321. return e && e.__esModule ? e : {default: e}
  3322. }
  3323. r.default.install("s_fullscreen", function () {
  3324. var e = this, t = r.default.util, n = e.config.fullscreenBtn ? e.config.fullscreenBtn : {}, o = void 0;
  3325. o = "img" === n.type ? t.createImgBtn("fullscreen", n.url.request, n.width, n.height) : t.createDom("xg-fullscreen", '<xg-icon class="xgplayer-icon">\n <div class="xgplayer-icon-requestfull">' + a.default + '</div>\n <div class="xgplayer-icon-exitfull">' + i.default + "</div>\n </xg-icon>", {}, "xgplayer-fullscreen");
  3326. var l = {};
  3327. l.requestfull = e.lang.FULLSCREEN_TIPS, l.exitfull = e.lang.EXITFULLSCREEN_TIPS;
  3328. var s = t.createDom("xg-tips", '<span class="xgplayer-tip-requestfull">' + l.requestfull + '</span>\n <span class="xgplayer-tip-exitfull">' + l.exitfull + "</span>", {}, "xgplayer-tips");
  3329. o.appendChild(s), e.once("ready", function () {
  3330. e.controls.appendChild(o)
  3331. }), ["click", "touchend"].forEach(function (t) {
  3332. o.addEventListener(t, function (t) {
  3333. t.preventDefault(), t.stopPropagation(), e.emit("fullscreenBtnClick")
  3334. })
  3335. })
  3336. })
  3337. }, function (e, t, n) {
  3338. "use strict";
  3339. n.r(t), t.default = '<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0 0 40 40">\n <path transform="scale(0.0320625 0.0320625)" d="M598 214h212v212h-84v-128h-128v-84zM726 726v-128h84v212h-212v-84h128zM214 426v-212h212v84h-128v128h-84zM298 598v128h128v84h-212v-212h84z"></path>\n</svg>\n'
  3340. }, function (e, t, n) {
  3341. "use strict";
  3342. n.r(t), t.default = '<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0 0 40 40">\n <path transform="scale(0.0320625 0.0320625)" d="M682 342h128v84h-212v-212h84v128zM598 810v-212h212v84h-128v128h-84zM342 342v-128h84v212h-212v-84h128zM214 682v-84h212v212h-84v-128h-128z"></path>\n</svg>\n'
  3343. }, function (e, t, n) {
  3344. "use strict";
  3345. var r = o(n(0)), a = o(n(71)), i = o(n(72));
  3346. function o(e) {
  3347. return e && e.__esModule ? e : {default: e}
  3348. }
  3349. r.default.install("s_cssFullscreen", function () {
  3350. var e = this, t = r.default.util;
  3351. if (e.config.cssFullscreen) {
  3352. var n = t.createDom("xg-cssfullscreen", '<xg-icon class="xgplayer-icon">\n <div class="xgplayer-icon-requestfull">' + a.default + '</div>\n <div class="xgplayer-icon-exitfull">' + i.default + "</div>\n </xg-icon>", {}, "xgplayer-cssfullscreen"),
  3353. o = {};
  3354. o.requestfull = e.lang.CSSFULLSCREEN_TIPS, o.exitfull = e.lang.EXITCSSFULLSCREEN_TIPS;
  3355. var l = t.createDom("xg-tips", '<span class="xgplayer-tip-requestfull">' + o.requestfull + '</span>\n <span class="xgplayer-tip-exitfull">' + o.exitfull + "</span>", {}, "xgplayer-tips");
  3356. n.appendChild(l), e.once("ready", function () {
  3357. e.controls.appendChild(n)
  3358. }), ["click", "touchend"].forEach(function (t) {
  3359. n.addEventListener(t, function (t) {
  3360. t.preventDefault(), t.stopPropagation(), e.emit("cssFullscreenBtnClick")
  3361. })
  3362. })
  3363. }
  3364. })
  3365. }, function (e, t, n) {
  3366. "use strict";
  3367. n.r(t), t.default = '<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0 0 40 40">\n <path transform="scale(0.028 0.028)" d="M843.617212 67.898413 175.411567 67.898413c-61.502749 0-111.367437 49.856501-111.367437 111.367437l0 668.205645c0 61.510936 49.864688 111.367437 111.367437 111.367437L843.617212 958.838931c61.510936 0 111.367437-49.856501 111.367437-111.367437L954.984648 179.26585C954.984648 117.754914 905.12917 67.898413 843.617212 67.898413zM398.146441 736.104057c15.380292 0 27.842115 12.461823 27.842115 27.842115 0 15.379269-12.461823 27.841092-27.842115 27.841092L259.725858 791.787264c-7.785314 0-14.781658-3.217275-19.838837-8.365528-5.383614-4.577249-8.791224-11.228739-8.791224-19.475564L231.095797 624.736621c0-15.371082 12.471033-27.842115 27.842115-27.842115 15.380292 0 27.842115 12.471033 27.842115 27.842115l-0.61603 71.426773 133.036969-133.037992 39.378869 39.378869L324.962651 736.113267 398.146441 736.104057zM419.199942 463.611943 286.162974 330.565764l0.61603 71.435982c0 15.380292-12.461823 27.842115-27.842115 27.842115-15.371082 0-27.842115-12.461823-27.842115-27.842115L231.094774 262.791172c0-8.256034 3.40761-14.908548 8.791224-19.476587 5.057179-5.148253 12.053524-8.374738 19.838837-8.374738l138.420583 0.00921c15.380292 0 27.842115 12.461823 27.842115 27.842115s-12.461823 27.842115-27.842115 27.842115l-73.175603-0.00921 133.607974 133.607974L419.199942 463.611943zM787.932981 763.946172c0 8.247848-3.40761 14.899338-8.791224 19.475564-5.057179 5.148253-12.053524 8.365528-19.839861 8.365528L620.881314 791.787264c-15.379269 0-27.841092-12.461823-27.841092-27.841092 0-15.380292 12.461823-27.842115 27.841092-27.842115l73.185836 0.00921L560.449967 602.50427l39.378869-39.378869L732.875015 696.163393l-0.62524-71.426773c0-15.371082 12.462846-27.842115 27.842115-27.842115 15.380292 0 27.842115 12.471033 27.842115 27.842115L787.934005 763.946172zM787.932981 402.000724c0 15.380292-12.461823 27.842115-27.842115 27.842115-15.379269 0-27.842115-12.461823-27.842115-27.842115l0.62524-71.435982L599.828836 463.611943l-39.378869-39.378869 133.617184-133.607974-73.185836 0.00921c-15.379269 0-27.841092-12.461823-27.841092-27.842115s12.461823-27.842115 27.841092-27.842115l138.421606-0.00921c7.785314 0 14.781658 3.226484 19.839861 8.374738 5.383614 4.568039 8.791224 11.219529 8.791224 19.476587L787.934005 402.000724z"></path>\n</svg>\n'
  3368. }, function (e, t, n) {
  3369. "use strict";
  3370. n.r(t), t.default = '<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0 0 40 40">\n <path transform="scale(0.028 0.028)" d="M834.56 81.92H189.44c-59.392 0-107.52 48.128-107.52 107.52v645.12c0 59.392 48.128 107.52 107.52 107.52h645.12c59.392 0 107.52-48.128 107.52-107.52V189.44c0-59.392-48.128-107.52-107.52-107.52zM458.24 727.04c0 14.848-12.288 26.624-26.624 26.624S404.48 741.888 404.48 727.04v-69.632L289.28 773.12c-10.752 10.24-27.648 10.24-37.888 0-10.24-10.752-10.24-27.648 0-37.888L366.592 619.52H296.96c-14.848 0-26.624-12.288-26.624-26.624s12.288-26.624 26.624-26.624h134.144c14.848 0 26.624 12.288 26.624 26.624V727.04z m0-295.936c0 14.848-12.288 26.624-26.624 26.624H296.96c-14.848 0-26.624-12.288-26.624-26.624S282.112 404.48 296.96 404.48h69.632L251.392 289.28c-10.24-10.752-10.24-27.648 0-37.888 5.12-5.12 12.288-7.68 18.944-7.68 6.656 0 13.824 2.56 18.944 7.68L404.48 366.592V296.96c0-14.848 12.288-26.624 26.624-26.624s26.624 12.288 26.624 26.624v134.144zM773.12 773.12c-10.752 10.24-27.648 10.24-37.888 0L619.52 657.408V727.04c0 14.848-12.288 26.624-26.624 26.624s-26.624-11.776-26.624-26.624v-134.144c0-14.848 12.288-26.624 26.624-26.624H727.04c14.848 0 26.624 12.288 26.624 26.624s-12.288 26.624-26.624 26.624h-69.632l115.2 115.2c10.752 10.752 10.752 27.648 0.512 38.4z m0-483.84L657.408 404.48H727.04c14.848 0 26.624 12.288 26.624 26.624 0 14.848-12.288 26.624-26.624 26.624h-134.144c-14.848 0-26.624-12.288-26.624-26.624V296.96c0-14.848 12.288-26.624 26.624-26.624s26.624 12.288 26.624 26.624v69.632L734.72 250.88c5.12-5.12 12.288-7.68 18.944-7.68s13.824 2.56 18.944 7.68c10.752 10.752 10.752 27.648 0.512 38.4z"></path>\n</svg>\n'
  3371. }, function (e, t, n) {
  3372. "use strict";
  3373. var r = l(n(0)), a = l(n(74)), i = l(n(75)), o = l(n(76));
  3374. function l(e) {
  3375. return e && e.__esModule ? e : {default: e}
  3376. }
  3377. r.default.install("s_volume", function () {
  3378. var e = this,
  3379. t = r.default.util.createDom("xg-volume", '<xg-icon class="xgplayer-icon">\n <div class="xgplayer-icon-large">' + o.default + '</div>\n <div class="xgplayer-icon-small">' + i.default + '</div>\n <div class="xgplayer-icon-muted">' + a.default + '</div>\n </xg-icon>\n <xg-slider class="xgplayer-slider" tabindex="2">\n <xg-bar class="xgplayer-bar">\n <xg-drag class="xgplayer-drag"></xg-drag>\n </xg-bar>\n </xg-slider>', {}, "xgplayer-volume");
  3380. e.once("ready", function () {
  3381. e.controls.appendChild(t)
  3382. });
  3383. var n = t.querySelector(".xgplayer-slider"), l = t.querySelector(".xgplayer-bar"),
  3384. s = t.querySelector(".xgplayer-drag"), u = t.querySelector(".xgplayer-icon");
  3385. s.style.height = 100 * e.config.volume + "%", n.volume = e.config.volume, ["mousedown", "touchstart"].forEach(function (t) {
  3386. l.addEventListener(t, function (t) {
  3387. t.preventDefault(), t.stopPropagation(), e.emit("volumeBarClick", t)
  3388. })
  3389. }), ["click", "touchend"].forEach(function (t) {
  3390. u.addEventListener(t, function (t) {
  3391. t.preventDefault(), t.stopPropagation(), e.emit("volumeIconClick")
  3392. })
  3393. }), u.addEventListener("mouseenter", function (t) {
  3394. t.preventDefault(), t.stopPropagation(), e.emit("volumeIconEnter")
  3395. }), ["blur", "mouseleave"].forEach(function (n) {
  3396. t.addEventListener(n, function (t) {
  3397. t.preventDefault(), t.stopPropagation(), e.emit("volumeIconLeave")
  3398. })
  3399. })
  3400. })
  3401. }, function (e, t, n) {
  3402. "use strict";
  3403. n.r(t), t.default = '<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0 0 40 40">\n <path transform="scale(0.0220625 0.0220625)" d="M358.4 358.4h-204.8v307.2h204.8l256 256v-819.2l-256 256z"></path>\n <path transform="scale(0.0220625 0.0220625)" d="M920.4 439.808l-108.544-109.056-72.704 72.704 109.568 108.544-109.056 108.544 72.704 72.704 108.032-109.568 108.544 109.056 72.704-72.704-109.568-108.032 109.056-108.544-72.704-72.704-108.032 109.568z"></path>\n</svg>\n'
  3404. }, function (e, t, n) {
  3405. "use strict";
  3406. n.r(t), t.default = '<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0 0 40 40">\n <path transform="scale(0.0220625 0.0220625)" d="M358.4 358.4h-204.8v307.2h204.8l256 256v-819.2l-256 256z"></path>\n <path transform="scale(0.0220625 0.0220625)" d="M795.648 693.248l-72.704-72.704c27.756-27.789 44.921-66.162 44.921-108.544s-17.165-80.755-44.922-108.546l0.002 0.002 72.704-72.704c46.713 46.235 75.639 110.363 75.639 181.248s-28.926 135.013-75.617 181.227l-0.021 0.021zM795.648 693.248l-72.704-72.704c27.756-27.789 44.921-66.162 44.921-108.544s-17.165-80.755-44.922-108.546l0.002 0.002 72.704-72.704c46.713 46.235 75.639 110.363 75.639 181.248s-28.926 135.013-75.617 181.227l-0.021 0.021z"></path>\n</svg>\n'
  3407. }, function (e, t, n) {
  3408. "use strict";
  3409. n.r(t), t.default = '<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0 0 40 40">\n <path transform="scale(0.0220625 0.0220625)" d="M358.4 358.4h-204.8v307.2h204.8l256 256v-819.2l-256 256z"></path>\n <path transform="scale(0.0220625 0.0220625)" d="M940.632 837.632l-72.192-72.192c65.114-64.745 105.412-154.386 105.412-253.44s-40.299-188.695-105.396-253.424l-0.016-0.016 72.192-72.192c83.639 83.197 135.401 198.37 135.401 325.632s-51.762 242.434-135.381 325.612l-0.020 0.020zM795.648 693.248l-72.704-72.704c27.756-27.789 44.921-66.162 44.921-108.544s-17.165-80.755-44.922-108.546l0.002 0.002 72.704-72.704c46.713 46.235 75.639 110.363 75.639 181.248s-28.926 135.013-75.617 181.227l-0.021 0.021z"></path>\n</svg>\n'
  3410. }, function (e, t, n) {
  3411. "use strict";
  3412. var r, a = n(0), i = (r = a) && r.__esModule ? r : {default: r};
  3413. i.default.install("s_definition", function () {
  3414. var e = this, t = e.root, n = i.default.util, r = i.default.sniffer, a = void 0,
  3415. o = n.createDom("xg-definition", "", {tabindex: 3}, "xgplayer-definition");
  3416. function l() {
  3417. var r = e.definitionList, a = ["<ul>"], i = e.config.url, l = document.createElement("a");
  3418. e.switchURL ? ["mp4", "hls", "__flv__", "dash"].every(function (t) {
  3419. return !e[t] || (e[t].url && (l.href = e[t].url), "__flv__" === t && (e[t]._options ? l.href = e[t]._options.url : l.href = e[t]._mediaDataSource.url), i = l.href, !1)
  3420. }) : i = e.currentSrc || e.src, e.hls && (l.href = e.hls.url, i = l.href), r.forEach(function (t) {
  3421. l.href = t.url, e.dash ? a.push("<li url='" + t.url + "' cname='" + t.name + "' class='" + (t.selected ? "selected" : "") + "'>" + t.name + "</li>") : a.push("<li url='" + t.url + "' cname='" + t.name + "' class='" + (l.href === i ? "selected" : "") + "'>" + t.name + "</li>")
  3422. });
  3423. var s = r.filter(function (t) {
  3424. return l.href = t.url, e.dash ? !0 === t.selected : l.href === i
  3425. });
  3426. a.push("</ul><p class='name'>" + (s[0] || {name: ""}).name + "</p>");
  3427. var u = t.querySelector(".xgplayer-definition");
  3428. if (u) {
  3429. u.innerHTML = a.join("");
  3430. var c = u.querySelector(".name");
  3431. e.config.definitionActive && "hover" !== e.config.definitionActive || c.addEventListener("mouseenter", function (t) {
  3432. t.preventDefault(), t.stopPropagation(), n.addClass(e.root, "xgplayer-definition-active"), u.focus()
  3433. })
  3434. } else {
  3435. o.innerHTML = a.join("");
  3436. var p = o.querySelector(".name");
  3437. e.config.definitionActive && "hover" !== e.config.definitionActive || p.addEventListener("mouseenter", function (t) {
  3438. t.preventDefault(), t.stopPropagation(), n.addClass(e.root, "xgplayer-definition-active"), o.focus()
  3439. }), e.controls.appendChild(o)
  3440. }
  3441. }
  3442. function s(r) {
  3443. e.definitionList = r, r && r instanceof Array && r.length > 1 && (n.addClass(t, "xgplayer-is-definition"), e.on("canplay", l))
  3444. }
  3445. function u() {
  3446. e.currentTime = e.curTime, a || e.play()
  3447. }
  3448. "mobile" === r.device && (e.config.definitionActive = "click"), e.on("resourceReady", s), ["touchend", "click"].forEach(function (t) {
  3449. o.addEventListener(t, function (t) {
  3450. t.preventDefault(), t.stopPropagation();
  3451. var i = e.definitionList, l = t.target || t.srcElement, s = document.createElement("a");
  3452. if (l && "li" === l.tagName.toLocaleLowerCase()) {
  3453. e.emit("beforeDefinitionChange", s.href);
  3454. var c, p = void 0;
  3455. if (Array.prototype.forEach.call(l.parentNode.childNodes, function (e) {
  3456. n.hasClass(e, "selected") && (p = e.getAttribute("cname"), n.removeClass(e, "selected"))
  3457. }), e.dash && i.forEach(function (e) {
  3458. e.selected = !1, e.name === l.innerHTML && (e.selected = !0)
  3459. }), n.addClass(l, "selected"), c = l.getAttribute("cname"), l.parentNode.nextSibling.innerHTML = "" + l.getAttribute("cname"), s.href = l.getAttribute("url"), e.switchURL) {
  3460. var d = document.createElement("a");
  3461. ["mp4", "hls", "__flv__", "dash"].every(function (t) {
  3462. return !e[t] || (e[t].url && (d.href = e[t].url), "__flv__" === t && (e[t]._options ? d.href = e[t]._options.url : d.href = e[t]._mediaDataSource.url), !1)
  3463. }), d.href === s.href || e.ended || e.switchURL(s.href)
  3464. } else e.hls && (document.createElement("a"), e.hls.url), s.href !== e.currentSrc && (e.curTime = e.currentTime, a = e.paused, e.ended || (e.src = s.href, e.once("canplay", u)));
  3465. e.emit("definitionChange", {
  3466. from: p,
  3467. to: c
  3468. }), "mobile" === r.device && n.removeClass(e.root, "xgplayer-definition-active")
  3469. } else "click" !== e.config.definitionActive || !l || "p" !== l.tagName.toLocaleLowerCase() && "em" !== l.tagName.toLocaleLowerCase() || (n.addClass(e.root, "xgplayer-definition-active"), o.focus());
  3470. e.emit("focus")
  3471. }, !1)
  3472. }), o.addEventListener("mouseleave", function (e) {
  3473. e.preventDefault(), e.stopPropagation(), n.removeClass(t, "xgplayer-definition-active")
  3474. }), e.once("destroy", function t() {
  3475. e.off("resourceReady", s), e.off("canplay", l), e.off("canplay", u), e.off("destroy", t)
  3476. })
  3477. })
  3478. }, function (e, t, n) {
  3479. "use strict";
  3480. var r = i(n(0)), a = i(n(79));
  3481. function i(e) {
  3482. return e && e.__esModule ? e : {default: e}
  3483. }
  3484. r.default.install("s_loading", function () {
  3485. var e = this.root, t = r.default.util.createDom("xg-loading", "" + a.default, {}, "xgplayer-loading");
  3486. this.once("ready", function () {
  3487. e.appendChild(t)
  3488. })
  3489. })
  3490. }, function (e, t, n) {
  3491. "use strict";
  3492. n.r(t), t.default = '<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewbox="0 0 100 100">\n <path d="M100,50A50,50,0,1,1,50,0"></path>\n</svg>\n'
  3493. }, function (e, t, n) {
  3494. "use strict";
  3495. var r, a = n(0), i = (r = a) && r.__esModule ? r : {default: r};
  3496. i.default.install("s_progress", function () {
  3497. var e = this, t = i.default.util,
  3498. n = t.createDom("xg-progress", '<xg-outer class="xgplayer-progress-outer">\n <xg-cache class="xgplayer-progress-cache"></xg-cache>\n <xg-played class="xgplayer-progress-played"></xgplayer-played>\n <xg-progress-btn class="xgplayer-progress-btn"></xg-progress-btn>\n <xg-point class="xgplayer-progress-point xgplayer-tips"></xg-point>\n <xg-thumbnail class="xgplayer-progress-thumbnail xgplayer-tips"></xg-thumbnail>\n </xg-outer>', {tabindex: 1}, "xgplayer-progress"),
  3499. r = void 0;
  3500. e.controls.appendChild(n);
  3501. var a = n.querySelector(".xgplayer-progress-played"), o = n.querySelector(".xgplayer-progress-btn"),
  3502. l = n.querySelector(".xgplayer-progress-outer"), s = n.querySelector(".xgplayer-progress-cache"),
  3503. u = n.querySelector(".xgplayer-progress-point"), c = n.querySelector(".xgplayer-progress-thumbnail");
  3504. function p(r, a) {
  3505. r.addEventListener("mouseenter", function (e) {
  3506. a && (t.addClass(r, "xgplayer-progress-dot-show"), t.addClass(n, "xgplayer-progress-dot-active"))
  3507. }), r.addEventListener("mouseleave", function (e) {
  3508. a && (t.removeClass(r, "xgplayer-progress-dot-show"), t.removeClass(n, "xgplayer-progress-dot-active"))
  3509. }), r.addEventListener("touchend", function (i) {
  3510. i.preventDefault(), i.stopPropagation(), a && (t.hasClass(r, "xgplayer-progress-dot-show") || Object.keys(e.dotArr).forEach(function (n) {
  3511. e.dotArr[n] && t.removeClass(e.dotArr[n], "xgplayer-progress-dot-show")
  3512. }), t.toggleClass(r, "xgplayer-progress-dot-show"), t.toggleClass(n, "xgplayer-progress-dot-active"))
  3513. })
  3514. }
  3515. function d() {
  3516. e.config.progressDot && "Array" === t.typeOf(e.config.progressDot) && e.config.progressDot.forEach(function (n) {
  3517. if (n.time >= 0 && n.time <= e.duration) {
  3518. var r = t.createDom("xg-progress-dot", n.text ? '<span class="xgplayer-progress-tip">' + n.text + "</span>" : "", {}, "xgplayer-progress-dot");
  3519. r.style.left = n.time / e.duration * 100 + "%", l.appendChild(r), e.dotArr[n.time] = r, p(r, n.text)
  3520. }
  3521. })
  3522. }
  3523. e.dotArr = {}, e.once("canplay", d), e.addProgressDot = function (n, r) {
  3524. if (!e.dotArr[n] && n >= 0 && n <= e.duration) {
  3525. var a = t.createDom("xg-progress-dot", "", {}, "xgplayer-progress-dot");
  3526. a.style.left = n / e.duration * 100 + "%", l.appendChild(a), e.dotArr[n] = a, p(a, r)
  3527. }
  3528. }, e.removeProgressDot = function (t) {
  3529. if (t >= 0 && t <= e.duration && e.dotArr[t]) {
  3530. var n = e.dotArr[t];
  3531. n.parentNode.removeChild(n), n = null, e.dotArr[t] = null
  3532. }
  3533. }, e.removeAllProgressDot = function () {
  3534. Object.keys(e.dotArr).forEach(function (t) {
  3535. if (e.dotArr[t]) {
  3536. var n = e.dotArr[t];
  3537. n.parentNode.removeChild(n), n = null, e.dotArr[t] = null
  3538. }
  3539. })
  3540. };
  3541. var f = 0, g = 0, h = 0, y = 0, x = 0, m = 0, v = [];
  3542. e.config.thumbnail && (f = e.config.thumbnail.pic_num, g = e.config.thumbnail.width, h = e.config.thumbnail.height, y = e.config.thumbnail.col, x = e.config.thumbnail.row, v = e.config.thumbnail.urls, c.style.width = g + "px", c.style.height = h + "px"), ["touchstart", "mousedown"].forEach(function (i) {
  3543. n.addEventListener(i, function (i) {
  3544. if (i.preventDefault(), i.stopPropagation(), t.event(i), i._target === u || !e.config.allowSeekAfterEnded && e.ended) return !1;
  3545. n.focus(), r = n.getBoundingClientRect().width;
  3546. var l = a.getBoundingClientRect().left, s = function (n) {
  3547. n.preventDefault(), n.stopPropagation(), t.event(n), e.isProgressMoving = !0;
  3548. var i = n.clientX - l > r ? r : n.clientX - l, s = i / r * e.duration;
  3549. if (a.style.width = 100 * i / r + "%", i - 7 < 0 ? (o.style.left = "0px", o.style.transform = "") : i + 7 > r ? (o.style.left = r - 14 + "px", o.style.transform = "") : (o.style.left = "100%", o.style.transform = "translate(-50%, 0)"), "video" !== e.videoConfig.mediaType || e.dash || e.config.closeMoveSeek) {
  3550. var u = t.findDom(e.controls, ".xgplayer-time");
  3551. u && (u.innerHTML = "<span>" + t.format(s || 0) + "</span><em>" + t.format(e.duration))
  3552. } else e.currentTime = Number(s).toFixed(1);
  3553. e.emit("focus")
  3554. }, c = function i(u) {
  3555. if (u.preventDefault(), u.stopPropagation(), t.event(u), window.removeEventListener("mousemove", s), window.removeEventListener("touchmove", s, {passive: !1}), window.removeEventListener("mouseup", i), window.removeEventListener("touchend", i), n.blur(), !e.isProgressMoving || "audio" === e.videoConfig.mediaType || e.dash || e.config.closeMoveSeek) {
  3556. var c = u.clientX - l, p = c / r * e.duration;
  3557. a.style.width = 100 * c / r + "%", c - 7 < 0 ? (o.style.left = "0px", o.style.transform = "") : c + 7 > r ? (o.style.left = r - 14 + "px", o.style.transform = "") : (o.style.left = "100%", o.style.transform = "translate(-50%, 0)"), e.currentTime = Number(p).toFixed(1)
  3558. }
  3559. e.emit("focus"), e.isProgressMoving = !1
  3560. };
  3561. return window.addEventListener("mousemove", s), window.addEventListener("touchmove", s, {passive: !1}), window.addEventListener("mouseup", c), window.addEventListener("touchend", c), !1
  3562. })
  3563. }), n.addEventListener("mouseenter", function (r) {
  3564. if (!e.config.allowSeekAfterEnded && e.ended) return !1;
  3565. var a = n.getBoundingClientRect().left, i = n.getBoundingClientRect().width, o = function (r) {
  3566. var o = (r.clientX - a) / i * e.duration;
  3567. o = o < 0 ? 0 : o, u.textContent = t.format(o);
  3568. var l = u.getBoundingClientRect().width;
  3569. if (e.config.thumbnail) {
  3570. m = e.duration / f;
  3571. var s = Math.floor(o / m);
  3572. c.style.backgroundImage = "url(" + v[Math.ceil((s + 1) / (y * x)) - 1] + ")";
  3573. var p = s + 1 - y * x * (Math.ceil((s + 1) / (y * x)) - 1), d = Math.ceil(p / x) - 1,
  3574. b = p - d * x - 1;
  3575. c.style["background-position"] = "-" + b * g + "px -" + d * h + "px";
  3576. var k = r.clientX - a - g / 2;
  3577. k = (k = k > 0 ? k : 0) < i - g ? k : i - g, c.style.left = k + "px", c.style.top = -10 - h + "px", c.style.display = "block", u.style.left = k + g / 2 - l / 2 + "px"
  3578. } else {
  3579. var w = r.clientX - a - l / 2;
  3580. w = (w = w > 0 ? w : 0) > i - l ? i - l : w, u.style.left = w + "px"
  3581. }
  3582. t.hasClass(n, "xgplayer-progress-dot-active") ? u.style.display = "none" : u.style.display = "block"
  3583. }, l = function (e) {
  3584. o(e)
  3585. };
  3586. n.addEventListener("mousemove", l, !1), n.addEventListener("mouseleave", function e(t) {
  3587. n.removeEventListener("mousemove", l, !1), n.removeEventListener("mouseleave", e, !1), o(t), u.style.display = "none", c.style.display = "none"
  3588. }, !1), o(r)
  3589. }, !1);
  3590. var b = !1, k = function () {
  3591. if (!r && n && (r = n.getBoundingClientRect().width), "audio" !== e.videoConfig.mediaType || !e.isProgressMoving || !e.dash) {
  3592. a.style.width = 100 * e.currentTime / e.duration + "%";
  3593. var t = e.currentTime / e.duration * r - 7;
  3594. if (t < 0) o.style.left = "0px", o.style.transform = "", b = !1; else if (t + 14 > r) o.style.left = r - 14 + "px", o.style.transform = "", b = !1; else {
  3595. if (b) return;
  3596. o.style.left = "100%", o.style.transform = "translate(-50%, 0)", b = !0
  3597. }
  3598. }
  3599. };
  3600. e.on("timeupdate", k);
  3601. var w = function () {
  3602. var t = e.buffered;
  3603. if (t && t.length > 0) {
  3604. for (var n = t.end(t.length - 1), r = 0, a = t.length; r < a; r++) if (e.currentTime >= t.start(r) && e.currentTime <= t.end(r)) {
  3605. n = t.end(r);
  3606. for (var i = r + 1; i < t.length; i++) if (t.start(i) - t.end(i - 1) >= 2) {
  3607. n = t.end(i - 1);
  3608. break
  3609. }
  3610. break
  3611. }
  3612. s.style.width = n / e.duration * 100 + "%"
  3613. }
  3614. }, _ = ["bufferedChange", "cacheupdate", "ended", "timeupdate"];
  3615. _.forEach(function (t) {
  3616. e.on(t, w)
  3617. }), e.once("destroy", function t() {
  3618. e.removeAllProgressDot(), e.off("canplay", d), e.off("timeupdate", k), _.forEach(function (t) {
  3619. e.off(t, w)
  3620. }), e.off("destroy", t)
  3621. })
  3622. })
  3623. }, function (e, t, n) {
  3624. "use strict";
  3625. var r, a = n(0), i = (r = a) && r.__esModule ? r : {default: r};
  3626. i.default.install("s_time", function () {
  3627. var e = this, t = (e.root, i.default.util),
  3628. n = t.createDom("xg-time", "<span>" + (e.currentTime || t.format(0)) + "</span>\n <em>" + (e.duration || t.format(0)) + "</em>", {}, "xgplayer-time");
  3629. e.once("ready", function () {
  3630. e.controls.appendChild(n)
  3631. });
  3632. var r = function () {
  3633. "audio" === e.videoConfig.mediaType && e.isProgressMoving && e.dash || (n.innerHTML = "<span>" + t.format(e.currentTime || 0) + "</span><em>" + t.format(e.duration) + "</em>")
  3634. };
  3635. e.on("durationchange", r), e.on("timeupdate", r), e.once("destroy", function t() {
  3636. e.off("durationchange", r), e.off("timeupdate", r), e.off("destroy", t)
  3637. })
  3638. })
  3639. }, function (e, t, n) {
  3640. "use strict";
  3641. var r = i(n(0)), a = i(n(83));
  3642. function i(e) {
  3643. return e && e.__esModule ? e : {default: e}
  3644. }
  3645. r.default.install("s_replay", function () {
  3646. var e = this, t = r.default.util, n = e.root;
  3647. if (!(navigator.userAgent.indexOf("iPhone OS 9") > -1)) {
  3648. var i = e.lang.REPLAY,
  3649. o = t.createDom("xg-replay", a.default + '\n <xg-replay-txt class="xgplayer-replay-txt">' + i + "</xg-replay-txt>\n ", {}, "xgplayer-replay");
  3650. e.once("ready", function () {
  3651. n.appendChild(o)
  3652. });
  3653. var l = o.querySelector("svg");
  3654. ["click", "touchend"].forEach(function (t) {
  3655. l.addEventListener(t, function (t) {
  3656. t.preventDefault(), t.stopPropagation(), e.emit("replayBtnClick")
  3657. })
  3658. })
  3659. }
  3660. })
  3661. }, function (e, t, n) {
  3662. "use strict";
  3663. n.r(t), t.default = '<svg class="xgplayer-replay-svg" xmlns="http://www.w3.org/2000/svg" width="78" height="78" viewbox="0 0 78 78">\n <path d="M8.22708362,13.8757234 L11.2677371,12.6472196 C11.7798067,12.4403301 12.3626381,12.6877273 12.5695276,13.1997969 L12.9441342,14.1269807 C13.1510237,14.6390502 12.9036264,15.2218816 12.3915569,15.4287712 L6.8284538,17.6764107 L5.90126995,18.0510173 C5.38920044,18.2579068 4.80636901,18.0105096 4.5994795,17.49844 L1.97723335,11.0081531 C1.77034384,10.4960836 2.0177411,9.91325213 2.52981061,9.70636262 L3.45699446,9.33175602 C3.96906396,9.12486652 4.5518954,9.37226378 4.75878491,9.88433329 L5.67885163,12.1615783 C7.99551726,6.6766934 13.3983951,3 19.5,3 C27.7842712,3 34.5,9.71572875 34.5,18 C34.5,26.2842712 27.7842712,33 19.5,33 C15.4573596,33 11.6658607,31.3912946 8.87004692,28.5831991 C8.28554571,27.9961303 8.28762719,27.0463851 8.87469603,26.4618839 C9.46176488,25.8773827 10.4115101,25.8794641 10.9960113,26.466533 C13.2344327,28.7147875 16.263503,30 19.5,30 C26.127417,30 31.5,24.627417 31.5,18 C31.5,11.372583 26.127417,6 19.5,6 C14.4183772,6 9.94214483,9.18783811 8.22708362,13.8757234 Z"></path>\n</svg>\n'
  3664. }, function (e, t, n) {
  3665. "use strict";
  3666. var r, a = n(0), i = (r = a) && r.__esModule ? r : {default: r};
  3667. i.default.install("s_playbackRate", function () {
  3668. var e = this, t = i.default.util;
  3669. if (!e.config.playbackRate) return !1;
  3670. e.config.playbackRate.sort(function (e, t) {
  3671. return t - e
  3672. });
  3673. var n = t.createDom("xg-playbackrate", " ", {}, "xgplayer-playbackrate"), r = [];
  3674. e.config.playbackRate.forEach(function (e) {
  3675. r.push({name: "" + e, rate: e + "x", selected: !1})
  3676. });
  3677. var a = 1, o = ["<ul>"];
  3678. r.forEach(function (t) {
  3679. e.config.defaultPlaybackRate && e.config.defaultPlaybackRate.toString() === t.name ? (t.selected = !0, a = e.config.defaultPlaybackRate, e.once("playing", function () {
  3680. e.video.playbackRate = e.config.defaultPlaybackRate
  3681. })) : "1.0" !== t.name && "1" !== t.name || e.config.defaultPlaybackRate && 1 !== e.config.defaultPlaybackRate || (t.selected = !0), o.push("<li cname='" + t.name + "' class='" + (t.selected ? "selected" : "") + "'>" + t.rate + "</li>")
  3682. }), o.push("</ul><p class='name'>" + a + "x</p>");
  3683. var l = e.root.querySelector(".xgplayer-playbackrate");
  3684. if (l) {
  3685. if (l.innerHTML = o.join(""), !l) return;
  3686. l.querySelector(".name").addEventListener("mouseenter", function (n) {
  3687. n.preventDefault(), n.stopPropagation(), t.addClass(e.root, "xgplayer-playbackrate-active"), l.focus()
  3688. })
  3689. } else {
  3690. if (n.innerHTML = o.join(""), !n) return;
  3691. n.querySelector(".name").addEventListener("mouseenter", function (r) {
  3692. r.preventDefault(), r.stopPropagation(), t.addClass(e.root, "xgplayer-playbackrate-active"), n.focus()
  3693. }), e.once("ready", function () {
  3694. e.controls.appendChild(n)
  3695. })
  3696. }
  3697. ["touchend", "click"].forEach(function (i) {
  3698. n.addEventListener(i, function (i) {
  3699. i.stopPropagation(), i.preventDefault();
  3700. var o = i.target;
  3701. if (o && "li" === o.tagName.toLocaleLowerCase()) {
  3702. var l, s = void 0;
  3703. r.forEach(function (n) {
  3704. n.selected = !1, o.textContent.replace(/\s+/g, "") === n.rate && (Array.prototype.forEach.call(o.parentNode.childNodes, function (e) {
  3705. t.hasClass(e, "selected") && (s = parseFloat(e.getAttribute("cname")), t.removeClass(e, "selected"))
  3706. }), n.selected = !0, e.video.playbackRate = 1 * n.name, a = 1 * n.name)
  3707. }), t.addClass(o, "selected"), l = parseFloat(o.getAttribute("cname")), o.parentNode.nextSibling.innerHTML = o.getAttribute("cname") + "x", e.emit("playbackrateChange", {
  3708. from: s,
  3709. to: l
  3710. })
  3711. } else !o || "p" !== o.tagName.toLocaleLowerCase() && "span" !== o.tagName.toLocaleLowerCase() || (t.addClass(e.root, "xgplayer-playbackrate-active"), n.focus());
  3712. e.emit("focus")
  3713. }, !1)
  3714. }), n.addEventListener("mouseleave", function (n) {
  3715. n.preventDefault(), n.stopPropagation(), t.removeClass(e.root, "xgplayer-playbackrate-active")
  3716. }), e.on("play", function () {
  3717. e.video.playbackRate.toFixed(1) !== a.toFixed(1) && (e.video.playbackRate = a)
  3718. })
  3719. })
  3720. }, function (e, t, n) {
  3721. "use strict";
  3722. var r, a = n(0), i = (r = a) && r.__esModule ? r : {default: r};
  3723. i.default.install("s_localPreview", function () {
  3724. var e = this, t = (e.root, i.default.util);
  3725. if (e.config.preview && e.config.preview.uploadEl) {
  3726. var n = t.createDom("xg-preview", '<input type="file">', {}, "xgplayer-preview"),
  3727. r = n.querySelector("input");
  3728. e.config.preview.uploadEl.appendChild(n), r.onchange = function () {
  3729. e.emit("upload", r)
  3730. }
  3731. }
  3732. })
  3733. }, function (e, t, n) {
  3734. "use strict";
  3735. var r = i(n(0)), a = i(n(87));
  3736. function i(e) {
  3737. return e && e.__esModule ? e : {default: e}
  3738. }
  3739. r.default.install("s_download", function () {
  3740. var e = this, t = r.default.util;
  3741. if (e.config.download) {
  3742. var n = t.createDom("xg-download", '<xg-icon class="xgplayer-icon">' + a.default + "</xg-icon>", {}, "xgplayer-download"),
  3743. i = e.lang.DOWNLOAD_TIPS,
  3744. o = t.createDom("xg-tips", '<span class="xgplayer-tip-download">' + i + "</span>", {}, "xgplayer-tips");
  3745. n.appendChild(o), e.once("ready", function () {
  3746. e.controls.appendChild(n)
  3747. }), ["click", "touchend"].forEach(function (t) {
  3748. n.addEventListener(t, function (t) {
  3749. t.preventDefault(), t.stopPropagation(), e.emit("downloadBtnClick")
  3750. })
  3751. })
  3752. }
  3753. })
  3754. }, function (e, t, n) {
  3755. "use strict";
  3756. n.r(t), t.default = '<svg xmlns="http://www.w3.org/2000/svg" width="24px" height="24px" viewBox="0 0 24 24">\n <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <g transform="translate(-488.000000, -340.000000)" fill="#FFFFFF">\n <g id="Group-2">\n <g id="volme_big-copy" transform="translate(488.000000, 340.000000)">\n <rect id="Rectangle-18" x="11" y="4" width="2" height="12" rx="1"></rect>\n <rect id="Rectangle-2" x="3" y="18" width="18" height="2" rx="1"></rect>\n <rect id="Rectangle-2" transform="translate(4.000000, 17.500000) rotate(90.000000) translate(-4.000000, -17.500000) " x="1.5" y="16.5" width="5" height="2" rx="1"></rect><rect id="Rectangle-2-Copy-3" transform="translate(20.000000, 17.500000) rotate(90.000000) translate(-20.000000, -17.500000) " x="17.5" y="16.5" width="5" height="2" rx="1"></rect>\n <path d="M9.48791171,8.26502656 L9.48791171,14.2650266 C9.48791171,14.8173113 9.04019646,15.2650266 8.48791171,15.2650266 C7.93562696,15.2650266 7.48791171,14.8173113 7.48791171,14.2650266 L7.48791171,7.26502656 C7.48791171,6.71274181 7.93562696,6.26502656 8.48791171,6.26502656 L15.4879117,6.26502656 C16.0401965,6.26502656 16.4879117,6.71274181 16.4879117,7.26502656 C16.4879117,7.81731131 16.0401965,8.26502656 15.4879117,8.26502656 L9.48791171,8.26502656 Z" id="Combined-Shape" transform="translate(11.987912, 10.765027) scale(1, -1) rotate(45.000000) translate(-11.987912, -10.765027) "></path>\n </g>\n </g>\n </g>\n </g>\n</svg>\n'
  3757. }, function (e, t, n) {
  3758. "use strict";
  3759. var r = o(n(0)), a = o(n(89)), i = o(n(91));
  3760. function o(e) {
  3761. return e && e.__esModule ? e : {default: e}
  3762. }
  3763. r.default.install("s_danmu", function () {
  3764. var e = this, t = e.root, n = r.default.util;
  3765. if (e.config.danmu) {
  3766. var o = n.createDom("xg-danmu", "", {}, "xgplayer-danmu");
  3767. e.once("ready", function () {
  3768. t.appendChild(o)
  3769. });
  3770. var l = n.deepCopy({
  3771. container: o,
  3772. player: e.video,
  3773. comments: [],
  3774. area: {start: 0, end: 1}
  3775. }, e.config.danmu),
  3776. s = void 0;
  3777. e.config.danmu.panel && (s = r.default.util.createDom("xg-panel", '<xg-panel-icon class="xgplayer-panel-icon">\n ' + i.default + '\n </xg-panel-icon>\n <xg-panel-slider class="xgplayer-panel-slider">\n <xg-hidemode class="xgplayer-hidemode">\n <p class="xgplayer-hidemode-font">屏蔽类型</p>\n <ul class="xgplayer-hidemode-radio">\n <li class="xgplayer-hidemode-scroll" id="false">滚动</li><li class="xgplayer-hidemode-top" id="false">顶部</li><li class="xgplayer-hidemode-bottom" id="false">底部</li><li class="xgplayer-hidemode-color" id="false">色彩</li>\n </ul>\n </xg-hidemode>\n <xg-transparency class="xgplayer-transparency">\n <span>不透明度</span>\n <input class="xgplayer-transparency-line xgplayer-transparency-color xgplayer-transparency-bar xgplayer-transparency-gradient" type="range" min="0" max="100" step="0.1" value="50"></input>\n </xg-transparency>\n <xg-showarea class="xgplayer-showarea">\n <div class="xgplayer-showarea-name">显示区域</div>\n <div class="xgplayer-showarea-control">\n <div class="xgplayer-showarea-control-up">\n <span class="xgplayer-showarea-control-up-item xgplayer-showarea-onequarters">1/4</span>\n <span class="xgplayer-showarea-control-up-item xgplayer-showarea-twoquarters selected-color">1/2</span>\n <span class="xgplayer-showarea-control-up-item xgplayer-showarea-threequarters">3/4</span>\n <span class="xgplayer-showarea-control-up-item xgplayer-showarea-full">1</span>\n </div>\n <div class="xgplayer-showarea-control-down">\n <div class="xgplayer-showarea-control-down-dots">\n <span class="xgplayer-showarea-onequarters-dot"></span>\n <span class="xgplayer-showarea-twoquarters-dot"></span>\n <span class="xgplayer-showarea-threequarters-dot"></span>\n <span class="xgplayer-showarea-full-dot"></span>\n </div>\n <input class="xgplayer-showarea-line xgplayer-showarea-color xgplayer-showarea-bar xgplayer-gradient" type="range" min="1" max="4" step="1" value="1">\n </div>\n </div>\n </xg-showarea>\n <xg-danmuspeed class="xgplayer-danmuspeed">\n <div class="xgplayer-danmuspeed-name">弹幕速度</div>\n <div class="xgplayer-danmuspeed-control">\n <div class="xgplayer-danmuspeed-control-up">\n <span class="xgplayer-danmuspeed-control-up-item xgplayer-danmuspeed-small">慢</span>\n <span class="xgplayer-danmuspeed-control-up-item xgplayer-danmuspeed-middle selected-color">中</span>\n <span class="xgplayer-danmuspeed-control-up-item xgplayer-danmuspeed-large">快</span>\n </div>\n <div class="xgplayer-danmuspeed-control-down">\n <div class="xgplayer-danmuspeed-control-down-dots">\n <span class="xgplayer-danmuspeed-small-dot"></span>\n <span class="xgplayer-danmuspeed-middle-dot"></span>\n <span class="xgplayer-danmuspeed-large-dot"></span>\n </div>\n <input class="xgplayer-danmuspeed-line xgplayer-danmuspeed-color xgplayer-danmuspeed-bar xgplayer-gradient" type="range" min="50" max="150" step="50" value="100">\n </div>\n </div>\n </xg-danmuspeed>\n <xg-danmufont class="xgplayer-danmufont">\n <div class="xgplayer-danmufont-name">字体大小</div>\n <div class="xgplayer-danmufont-control">\n <div class="xgplayer-danmufont-control-up">\n <span class="xgplayer-danmufont-control-up-item xgplayer-danmufont-small">小</span>\n <span class="xgplayer-danmufont-control-up-item xgplayer-danmufont-middle">中</span>\n <span class="xgplayer-danmufont-control-up-item xgplayer-danmufont-large selected-color">大</span>\n </div>\n <div class="xgplayer-danmufont-control-down">\n <div class="xgplayer-danmufont-control-down-dots">\n <span class="xgplayer-danmufont-small-dot"></span>\n <span class="xgplayer-danmufont-middle-dot"></span>\n <span class="xgplayer-danmufont-large-dot"></span>\n </div>\n <input class="xgplayer-danmufont-line xgplayer-danmufont-color xgplayer-danmufont-bar xgplayer-gradient" type="range" min="20" max="30" step="5" value="25">\n </div>\n </div>\n </xg-danmufont>\n </xg-panel-slider>', {tabindex: 7}, "xgplayer-panel"), e.once("ready", function () {
  3778. e.controls.appendChild(s)
  3779. })), e.once("complete", function () {
  3780. var t = new a.default(l);
  3781. if (e.emit("initDefaultDanmu", t), e.danmu = t, e.config.danmu.panel) {
  3782. var n = s.querySelector(".xgplayer-panel-slider"), i = void 0;
  3783. ["mouseenter", "touchend", "click"].forEach(function (e) {
  3784. s.addEventListener(e, function (e) {
  3785. e.preventDefault(), e.stopPropagation(), r.default.util.addClass(n, "xgplayer-panel-active"), s.focus(), i = !0
  3786. })
  3787. }), s.addEventListener("mouseleave", function (e) {
  3788. e.preventDefault(), e.stopPropagation(), r.default.util.removeClass(n, "xgplayer-panel-active"), i = !1
  3789. }), n.addEventListener("mouseleave", function (e) {
  3790. e.preventDefault(), e.stopPropagation(), !1 === i && r.default.util.removeClass(n, "xgplayer-panel-active")
  3791. });
  3792. var o = e.config.danmu, u = {
  3793. scroll: s.querySelector(".xgplayer-hidemode-scroll"),
  3794. top: s.querySelector(".xgplayer-hidemode-top"),
  3795. bottom: s.querySelector(".xgplayer-hidemode-bottom"),
  3796. color: s.querySelector(".xgplayer-hidemode-color")
  3797. }, c = function (t) {
  3798. var n = t;
  3799. ["touchend", "click"].forEach(function (t) {
  3800. u[n].addEventListener(t, function (t) {
  3801. "true" !== u[n].getAttribute("id") ? (u[n].style.color = "#f85959", u[n].setAttribute("id", "true"), e.danmu.hide(n)) : (u[n].style.color = "#aaa", u[n].setAttribute("id", "false"), e.danmu.show(n))
  3802. })
  3803. })
  3804. };
  3805. for (var p in u) c(p);
  3806. var d = s.querySelector(".xgplayer-transparency-line"),
  3807. f = s.querySelector(".xgplayer-transparency-gradient"), g = 50;
  3808. if (f.style.background = "linear-gradient(to right, #f85959 0%, #f85959 " + g + "%, #aaa " + g + "%, #aaa)", d.addEventListener("input", function (e) {
  3809. e.preventDefault(), e.stopPropagation(), g = e.target.value, f.style.background = "linear-gradient(to right, #f85959 0%, #f85959 " + g + "%, #aaa " + g + "%, #aaa)", o.comments.forEach(function (e) {
  3810. e.style.opacity = g / 100
  3811. })
  3812. }), s.querySelector(".xgplayer-showarea-line").addEventListener("input", function (t) {
  3813. t.preventDefault(), t.stopPropagation();
  3814. var n = t.target.value;
  3815. e.danmu.config.area.end = n / 100, e.config.danmu.area.end = n / 100, e.danmu.bulletBtn.main.channel.resize()
  3816. }), s.querySelector(".xgplayer-danmuspeed-line").addEventListener("input", function (e) {
  3817. e.preventDefault(), e.stopPropagation();
  3818. var t = e.target.value;
  3819. o.comments.forEach(function (e) {
  3820. e.duration = 100 * (200 - t)
  3821. })
  3822. }), s.querySelector(".xgplayer-danmufont-line").addEventListener("input", function (e) {
  3823. e.preventDefault(), e.stopPropagation();
  3824. var t = e.target.value;
  3825. o.comments.forEach(function (e) {
  3826. e.style.fontSize = t + "px"
  3827. })
  3828. }), navigator.userAgent.indexOf("Firefox") > -1) for (var h = 0; h < n.querySelectorAll("input").length; h++) n.querySelectorAll("input")[h].style.marginTop = "10px"
  3829. }
  3830. })
  3831. }
  3832. })
  3833. }, function (e, t, n) {
  3834. "use strict";
  3835. (function (e) {
  3836. var n, r, a, i, o = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (e) {
  3837. return typeof e
  3838. } : function (e) {
  3839. return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e
  3840. };
  3841. window, i = function () {
  3842. return function (e) {
  3843. var t = {};
  3844. function n(r) {
  3845. if (t[r]) return t[r].exports;
  3846. var a = t[r] = {i: r, l: !1, exports: {}};
  3847. return e[r].call(a.exports, a, a.exports, n), a.l = !0, a.exports
  3848. }
  3849. return n.m = e, n.c = t, n.d = function (e, t, r) {
  3850. n.o(e, t) || Object.defineProperty(e, t, {enumerable: !0, get: r})
  3851. }, n.r = function (e) {
  3852. "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, {value: "Module"}), Object.defineProperty(e, "__esModule", {value: !0})
  3853. }, n.t = function (e, t) {
  3854. if (1 & t && (e = n(e)), 8 & t) return e;
  3855. if (4 & t && "object" == (void 0 === e ? "undefined" : o(e)) && e && e.__esModule) return e;
  3856. var r = Object.create(null);
  3857. if (n.r(r), Object.defineProperty(r, "default", {
  3858. enumerable: !0,
  3859. value: e
  3860. }), 2 & t && "string" != typeof e) for (var a in e) n.d(r, a, function (t) {
  3861. return e[t]
  3862. }.bind(null, a));
  3863. return r
  3864. }, n.n = function (e) {
  3865. var t = e && e.__esModule ? function () {
  3866. return e.default
  3867. } : function () {
  3868. return e
  3869. };
  3870. return n.d(t, "a", t), t
  3871. }, n.o = function (e, t) {
  3872. return Object.prototype.hasOwnProperty.call(e, t)
  3873. }, n.p = "", n(n.s = 2)
  3874. }([function (e, t, n) {
  3875. Object.defineProperty(t, "__esModule", {value: !0});
  3876. var r, a = (r = n(22)) && r.__esModule ? r : {default: r}, i = {};
  3877. i.domObj = new a.default, i.createDom = function () {
  3878. var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "div",
  3879. t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "",
  3880. n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {},
  3881. r = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : "",
  3882. a = document.createElement(e);
  3883. return a.className = r, a.innerHTML = t, Object.keys(n).forEach(function (t) {
  3884. var r = t, i = n[t];
  3885. "video" === e || "audio" === e ? i && a.setAttribute(r, i) : a.setAttribute(r, i)
  3886. }), a
  3887. }, i.hasClass = function (e, t) {
  3888. return e.classList ? Array.prototype.some.call(e.classList, function (e) {
  3889. return e === t
  3890. }) : !!e.className.match(new RegExp("(\\s|^)" + t + "(\\s|$)"))
  3891. }, i.addClass = function (e, t) {
  3892. e.classList ? t.replace(/(^\s+|\s+$)/g, "").split(/\s+/g).forEach(function (t) {
  3893. t && e.classList.add(t)
  3894. }) : i.hasClass(e, t) || (e.className += " " + t)
  3895. }, i.removeClass = function (e, t) {
  3896. e.classList ? t.split(/\s+/g).forEach(function (t) {
  3897. e.classList.remove(t)
  3898. }) : i.hasClass(e, t) && t.split(/\s+/g).forEach(function (t) {
  3899. var n = new RegExp("(\\s|^)" + t + "(\\s|$)");
  3900. e.className = e.className.replace(n, " ")
  3901. })
  3902. }, i.toggleClass = function (e, t) {
  3903. t.split(/\s+/g).forEach(function (t) {
  3904. i.hasClass(e, t) ? i.removeClass(e, t) : i.addClass(e, t)
  3905. })
  3906. }, i.findDom = function () {
  3907. var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : document,
  3908. t = arguments[1],
  3909. n = void 0;
  3910. try {
  3911. n = e.querySelector(t)
  3912. } catch (r) {
  3913. t.startsWith("#") && (n = e.getElementById(t.slice(1)))
  3914. }
  3915. return n
  3916. }, i.deepCopy = function (e, t) {
  3917. if ("Object" === i.typeOf(t) && "Object" === i.typeOf(e)) return Object.keys(t).forEach(function (n) {
  3918. "Object" !== i.typeOf(t[n]) || t[n] instanceof Node ? "Array" === i.typeOf(t[n]) ? e[n] = "Array" === i.typeOf(e[n]) ? e[n].concat(t[n]) : t[n] : e[n] = t[n] : e[n] ? i.deepCopy(e[n], t[n]) : e[n] = t[n]
  3919. }), e
  3920. }, i.typeOf = function (e) {
  3921. return Object.prototype.toString.call(e).match(/([^\s.*]+)(?=]$)/g)[0]
  3922. }, i.copyDom = function (e) {
  3923. if (e && 1 === e.nodeType) {
  3924. var t = document.createElement(e.tagName);
  3925. return Array.prototype.forEach.call(e.attributes, function (e) {
  3926. t.setAttribute(e.name, e.value)
  3927. }), e.innerHTML && (t.innerHTML = e.innerHTML), t
  3928. }
  3929. return ""
  3930. }, i.formatTime = function (e) {
  3931. var t = Math.floor(e);
  3932. return 1e3 * t + (e - t)
  3933. }, t.default = i, e.exports = t.default
  3934. }, function (e, t, n) {
  3935. var r = n(13)();
  3936. e.exports = function (e) {
  3937. return e !== r && null !== e
  3938. }
  3939. }, function (e, t, n) {
  3940. e.exports = n(3)
  3941. }, function (e, t, n) {
  3942. Object.defineProperty(t, "__esModule", {value: !0});
  3943. var r, a = (r = n(4)) && r.__esModule ? r : {default: r};
  3944. n(26), t.default = a.default, e.exports = t.default
  3945. }, function (e, t, n) {
  3946. Object.defineProperty(t, "__esModule", {value: !0});
  3947. var r = function () {
  3948. function e(e, t) {
  3949. for (var n = 0; n < t.length; n++) {
  3950. var r = t[n];
  3951. r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r)
  3952. }
  3953. }
  3954. return function (t, n, r) {
  3955. return n && e(t.prototype, n), r && e(t, r), t
  3956. }
  3957. }(), a = l(n(5)), i = l(n(21)), o = l(n(0));
  3958. function l(e) {
  3959. return e && e.__esModule ? e : {default: e}
  3960. }
  3961. var s = function () {
  3962. function e(t) {
  3963. !function (e, t) {
  3964. if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function")
  3965. }(this, e), this.config = o.default.deepCopy({
  3966. overlap: !1,
  3967. area: {start: 0, end: 1},
  3968. live: !1,
  3969. comments: [],
  3970. direction: "r2l"
  3971. }, t), this.hideArr = [], (0, a.default)(this);
  3972. var n = this;
  3973. if (this.config.comments.forEach(function (e) {
  3974. e.duration = e.duration < 5e3 ? 5e3 : e.duration, e.mode || (e.mode = "scroll")
  3975. }), !this.config.container || 1 !== this.config.container.nodeType) return this.emit("error", "container id can't be empty"), !1;
  3976. if (this.container = this.config.container, this.config.containerStyle) {
  3977. var r = this.config.containerStyle;
  3978. Object.keys(r).forEach(function (e) {
  3979. n.container.style[e] = r[e]
  3980. })
  3981. }
  3982. this.live = this.config.live, this.player = this.config.player, this.direction = this.config.direction, o.default.addClass(this.container, "danmu"), this.bulletBtn = new i.default(this), this.emit("ready")
  3983. }
  3984. return r(e, [{
  3985. key: "start", value: function () {
  3986. this.bulletBtn.main.start()
  3987. }
  3988. }, {
  3989. key: "pause", value: function () {
  3990. this.bulletBtn.main.pause()
  3991. }
  3992. }, {
  3993. key: "play", value: function () {
  3994. this.bulletBtn.main.play()
  3995. }
  3996. }, {
  3997. key: "stop", value: function () {
  3998. this.bulletBtn.main.stop()
  3999. }
  4000. }, {
  4001. key: "sendComment", value: function (e) {
  4002. e && e.id && e.duration && (e.el || e.txt) && (e.duration = e.duration < 5e3 ? 5e3 : e.duration, this.bulletBtn.main.data.push(e))
  4003. }
  4004. }, {
  4005. key: "setCommentID", value: function (e, t) {
  4006. var n = this.container.getBoundingClientRect();
  4007. e && t && (this.bulletBtn.main.data.some(function (n) {
  4008. return n.id === e && (n.id = t, !0)
  4009. }), this.bulletBtn.main.queue.some(function (r) {
  4010. return r.id === e && (r.id = t, r.pauseMove(n), r.startMove(n), !0)
  4011. }))
  4012. }
  4013. }, {
  4014. key: "setCommentDuration", value: function (e, t) {
  4015. var n = this.container.getBoundingClientRect();
  4016. e && t && (t = t < 5e3 ? 5e3 : t, this.bulletBtn.main.data.some(function (n) {
  4017. return n.id === e && (n.duration = t, !0)
  4018. }), this.bulletBtn.main.queue.some(function (r) {
  4019. return r.id === e && (r.duration = t, r.pauseMove(n), r.startMove(n), !0)
  4020. }))
  4021. }
  4022. }, {
  4023. key: "setAllDuration", value: function () {
  4024. var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "scroll",
  4025. t = arguments[1], n = this.container.getBoundingClientRect();
  4026. t && (t = t < 5e3 ? 5e3 : t, this.bulletBtn.main.data.forEach(function (n) {
  4027. e === n.mode && (n.duration = t)
  4028. }), this.bulletBtn.main.queue.forEach(function (r) {
  4029. e === r.mode && (r.duration = t, r.pauseMove(n), r.startMove(n))
  4030. }))
  4031. }
  4032. }, {
  4033. key: "hide", value: function () {
  4034. var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "scroll";
  4035. this.hideArr.indexOf(e) < 0 && this.hideArr.push(e), this.bulletBtn.main.queue.filter(function (t) {
  4036. return e === t.mode || "color" === e && t.color
  4037. }).forEach(function (e) {
  4038. return e.remove()
  4039. })
  4040. }
  4041. }, {
  4042. key: "show", value: function () {
  4043. var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "scroll",
  4044. t = this.hideArr.indexOf(e);
  4045. t > -1 && this.hideArr.splice(t, 1)
  4046. }
  4047. }, {
  4048. key: "setDirection", value: function () {
  4049. var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "r2l";
  4050. this.emit("changeDirection", e)
  4051. }
  4052. }]), e
  4053. }();
  4054. t.default = s, e.exports = t.default
  4055. }, function (e, t, n) {
  4056. var r, a, i, l, s, u, c, p = n(6), d = n(20), f = Function.prototype.apply,
  4057. g = Function.prototype.call,
  4058. h = Object.create, y = Object.defineProperty, x = Object.defineProperties,
  4059. m = Object.prototype.hasOwnProperty, v = {configurable: !0, enumerable: !1, writable: !0};
  4060. a = function (e, t) {
  4061. var n, a;
  4062. return d(t), a = this, r.call(this, e, n = function () {
  4063. i.call(a, e, n), f.call(t, this, arguments)
  4064. }), n.__eeOnceListener__ = t, this
  4065. }, s = {
  4066. on: r = function (e, t) {
  4067. var n;
  4068. return d(t), m.call(this, "__ee__") ? n = this.__ee__ : (n = v.value = h(null), y(this, "__ee__", v), v.value = null), n[e] ? "object" == o(n[e]) ? n[e].push(t) : n[e] = [n[e], t] : n[e] = t, this
  4069. }, once: a, off: i = function (e, t) {
  4070. var n, r, a, i;
  4071. if (d(t), !m.call(this, "__ee__")) return this;
  4072. if (!(n = this.__ee__)[e]) return this;
  4073. if ("object" == o(r = n[e])) for (i = 0; a = r[i]; ++i) a !== t && a.__eeOnceListener__ !== t || (2 === r.length ? n[e] = r[i ? 0 : 1] : r.splice(i, 1)); else r !== t && r.__eeOnceListener__ !== t || delete n[e];
  4074. return this
  4075. }, emit: l = function (e) {
  4076. var t, n, r, a, i;
  4077. if (m.call(this, "__ee__") && (a = this.__ee__[e])) if ("object" == (void 0 === a ? "undefined" : o(a))) {
  4078. for (n = arguments.length, i = new Array(n - 1), t = 1; t < n; ++t) i[t - 1] = arguments[t];
  4079. for (a = a.slice(), t = 0; r = a[t]; ++t) f.call(r, this, i)
  4080. } else switch (arguments.length) {
  4081. case 1:
  4082. g.call(a, this);
  4083. break;
  4084. case 2:
  4085. g.call(a, this, arguments[1]);
  4086. break;
  4087. case 3:
  4088. g.call(a, this, arguments[1], arguments[2]);
  4089. break;
  4090. default:
  4091. for (n = arguments.length, i = new Array(n - 1), t = 1; t < n; ++t) i[t - 1] = arguments[t];
  4092. f.call(a, this, i)
  4093. }
  4094. }
  4095. }, u = {on: p(r), once: p(a), off: p(i), emit: p(l)}, c = x({}, u), e.exports = t = function (e) {
  4096. return null == e ? h(c) : x(Object(e), u)
  4097. }, t.methods = s
  4098. }, function (e, t, n) {
  4099. var r = n(7), a = n(15), i = n(16), o = n(17);
  4100. (e.exports = function (e, t) {
  4101. var n, i, l, s, u;
  4102. return arguments.length < 2 || "string" != typeof e ? (s = t, t = e, e = null) : s = arguments[2], null == e ? (n = l = !0, i = !1) : (n = o.call(e, "c"), i = o.call(e, "e"), l = o.call(e, "w")), u = {
  4103. value: t,
  4104. configurable: n,
  4105. enumerable: i,
  4106. writable: l
  4107. }, s ? r(a(s), u) : u
  4108. }).gs = function (e, t, n) {
  4109. var l, s, u, c;
  4110. return "string" != typeof e ? (u = n, n = t, t = e, e = null) : u = arguments[3], null == t ? t = void 0 : i(t) ? null == n ? n = void 0 : i(n) || (u = n, n = void 0) : (u = t, t = n = void 0), null == e ? (l = !0, s = !1) : (l = o.call(e, "c"), s = o.call(e, "e")), c = {
  4111. get: t,
  4112. set: n,
  4113. configurable: l,
  4114. enumerable: s
  4115. }, u ? r(a(u), c) : c
  4116. }
  4117. }, function (e, t, n) {
  4118. e.exports = n(8)() ? Object.assign : n(9)
  4119. }, function (e, t, n) {
  4120. e.exports = function () {
  4121. var e, t = Object.assign;
  4122. return "function" == typeof t && (t(e = {foo: "raz"}, {bar: "dwa"}, {trzy: "trzy"}), e.foo + e.bar + e.trzy === "razdwatrzy")
  4123. }
  4124. }, function (e, t, n) {
  4125. var r = n(10), a = n(14), i = Math.max;
  4126. e.exports = function (e, t) {
  4127. var n, o, l, s = i(arguments.length, 2);
  4128. for (e = Object(a(e)), l = function (r) {
  4129. try {
  4130. e[r] = t[r]
  4131. } catch (e) {
  4132. n || (n = e)
  4133. }
  4134. }, o = 1; o < s; ++o) t = arguments[o], r(t).forEach(l);
  4135. if (void 0 !== n) throw n;
  4136. return e
  4137. }
  4138. }, function (e, t, n) {
  4139. e.exports = n(11)() ? Object.keys : n(12)
  4140. }, function (e, t, n) {
  4141. e.exports = function () {
  4142. try {
  4143. return Object.keys("primitive"), !0
  4144. } catch (e) {
  4145. return !1
  4146. }
  4147. }
  4148. }, function (e, t, n) {
  4149. var r = n(1), a = Object.keys;
  4150. e.exports = function (e) {
  4151. return a(r(e) ? Object(e) : e)
  4152. }
  4153. }, function (e, t, n) {
  4154. e.exports = function () {
  4155. }
  4156. }, function (e, t, n) {
  4157. var r = n(1);
  4158. e.exports = function (e) {
  4159. if (!r(e)) throw new TypeError("Cannot use null or undefined");
  4160. return e
  4161. }
  4162. }, function (e, t, n) {
  4163. var r = n(1), a = Array.prototype.forEach, i = Object.create;
  4164. e.exports = function (e) {
  4165. var t = i(null);
  4166. return a.call(arguments, function (e) {
  4167. r(e) && function (e, t) {
  4168. var n;
  4169. for (n in e) t[n] = e[n]
  4170. }(Object(e), t)
  4171. }), t
  4172. }
  4173. }, function (e, t, n) {
  4174. e.exports = function (e) {
  4175. return "function" == typeof e
  4176. }
  4177. }, function (e, t, n) {
  4178. e.exports = n(18)() ? String.prototype.contains : n(19)
  4179. }, function (e, t, n) {
  4180. var r = "razdwatrzy";
  4181. e.exports = function () {
  4182. return "function" == typeof r.contains && !0 === r.contains("dwa") && !1 === r.contains("foo")
  4183. }
  4184. }, function (e, t, n) {
  4185. var r = String.prototype.indexOf;
  4186. e.exports = function (e) {
  4187. return r.call(this, e, arguments[1]) > -1
  4188. }
  4189. }, function (e, t, n) {
  4190. e.exports = function (e) {
  4191. if ("function" != typeof e) throw new TypeError(e + " is not a function");
  4192. return e
  4193. }
  4194. }, function (e, t, n) {
  4195. Object.defineProperty(t, "__esModule", {value: !0});
  4196. var r = function () {
  4197. function e(e, t) {
  4198. for (var n = 0; n < t.length; n++) {
  4199. var r = t[n];
  4200. r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r)
  4201. }
  4202. }
  4203. return function (t, n, r) {
  4204. return n && e(t.prototype, n), r && e(t, r), t
  4205. }
  4206. }(), a = o(n(0)), i = o(n(23));
  4207. function o(e) {
  4208. return e && e.__esModule ? e : {default: e}
  4209. }
  4210. var l = function () {
  4211. function e(t) {
  4212. !function (e, t) {
  4213. if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function")
  4214. }(this, e), this.danmu = t, this.main = new i.default(t), t.config.defaultOff || this.main.start()
  4215. }
  4216. return r(e, [{
  4217. key: "createSwitch", value: function () {
  4218. var e = !(arguments.length > 0 && void 0 !== arguments[0]) || arguments[0];
  4219. return this.switchBtn = a.default.createDom("dk-switch", '<span class="txt">弹</span>', {}, "danmu-switch " + (e ? "danmu-switch-active" : "")), this.switchBtn
  4220. }
  4221. }]), e
  4222. }();
  4223. t.default = l, e.exports = t.default
  4224. }, function (e, t, n) {
  4225. Object.defineProperty(t, "__esModule", {value: !0});
  4226. var r = function () {
  4227. function e(e, t) {
  4228. for (var n = 0; n < t.length; n++) {
  4229. var r = t[n];
  4230. r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r)
  4231. }
  4232. }
  4233. return function (t, n, r) {
  4234. return n && e(t.prototype, n), r && e(t, r), t
  4235. }
  4236. }(), a = function () {
  4237. function e(t) {
  4238. !function (e, t) {
  4239. if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function")
  4240. }(this, e), t = {
  4241. initDOM: function () {
  4242. return document.createElement("div")
  4243. }, initSize: 10
  4244. }, this.init(t)
  4245. }
  4246. return r(e, [{
  4247. key: "init", value: function (e) {
  4248. this.idleList = [], this.usingList = [], this._id = 0, this.options = e, this._expand(e.initSize)
  4249. }
  4250. }, {
  4251. key: "use", value: function () {
  4252. this.idleList.length || this._expand(1);
  4253. var e = this.idleList.shift();
  4254. return this.usingList.push(e), e
  4255. }
  4256. }, {
  4257. key: "unuse", value: function (e) {
  4258. var t = this.usingList.indexOf(e);
  4259. t < 0 || (this.usingList.splice(t, 1), e.innerHTML = "", e.textcontent = "", e.style = "", this.idleList.push(e))
  4260. }
  4261. }, {
  4262. key: "_expand", value: function (e) {
  4263. for (var t = 0; t < e; t++) this.idleList.push(this.options.initDOM(this._id++))
  4264. }
  4265. }]), e
  4266. }();
  4267. t.default = a, e.exports = t.default
  4268. }, function (e, t, n) {
  4269. Object.defineProperty(t, "__esModule", {value: !0});
  4270. var r = function () {
  4271. function e(e, t) {
  4272. for (var n = 0; n < t.length; n++) {
  4273. var r = t[n];
  4274. r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r)
  4275. }
  4276. }
  4277. return function (t, n, r) {
  4278. return n && e(t.prototype, n), r && e(t, r), t
  4279. }
  4280. }(), a = l(n(24)), i = l(n(25)), o = l(n(0));
  4281. function l(e) {
  4282. return e && e.__esModule ? e : {default: e}
  4283. }
  4284. var s = function () {
  4285. function e(t) {
  4286. !function (e, t) {
  4287. if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function")
  4288. }(this, e), this.danmu = t, this.container = t.container, this.channel = new a.default(t), this.data = [].concat(t.config.comments), this.queue = [], this.timer = null, this.retryTimer = null, this.interval = 2e3, this.status = "idle", t.on("bullet_remove", this.updateQueue.bind(this));
  4289. var n = this;
  4290. this.danmu.on("changeDirection", function (e) {
  4291. n.danmu.direction = e
  4292. })
  4293. }
  4294. return r(e, [{
  4295. key: "updateQueue", value: function (e) {
  4296. var t = this;
  4297. t.queue.some(function (n, r) {
  4298. return n.id === e.bullet.id && (t.queue.splice(r, 1), !0)
  4299. })
  4300. }
  4301. }, {
  4302. key: "init", value: function (e, t) {
  4303. t || (t = this), t.data.sort(function (e, t) {
  4304. return e.start - t.start
  4305. }), t.retryTimer || (t.retryTimer = setInterval(function () {
  4306. t.readData(), t.dataHandle()
  4307. }, t.interval - 1e3))
  4308. }
  4309. }, {
  4310. key: "start", value: function () {
  4311. this.status = "playing", this.queue = [], this.container.innerHTML = "", this.channel.resetWithCb(this.init, this)
  4312. }
  4313. }, {
  4314. key: "stop", value: function () {
  4315. this.status = "closed", clearInterval(this.retryTimer), this.retryTimer = null, this.channel.reset(), this.queue = [], this.container.innerHTML = ""
  4316. }
  4317. }, {
  4318. key: "play", value: function () {
  4319. this.status = "playing";
  4320. var e = this.channel.channels, t = this.danmu.container.getBoundingClientRect();
  4321. e && e.length > 0 && ["scroll", "top", "bottom"].forEach(function (n) {
  4322. for (var r = 0; r < e.length; r++) e[r].queue[n].forEach(function (e) {
  4323. e.resized || (e.startMove(t), e.resized = !0)
  4324. });
  4325. for (var a = 0; a < e.length; a++) e[a].queue[n].forEach(function (e) {
  4326. e.resized = !1
  4327. })
  4328. })
  4329. }
  4330. }, {
  4331. key: "pause", value: function () {
  4332. this.status = "paused";
  4333. var e = this.channel.channels, t = this.danmu.container.getBoundingClientRect();
  4334. e && e.length > 0 && ["scroll", "top", "bottom"].forEach(function (n) {
  4335. for (var r = 0; r < e.length; r++) e[r].queue[n].forEach(function (e) {
  4336. e.pauseMove(t)
  4337. })
  4338. })
  4339. }
  4340. }, {
  4341. key: "dataHandle", value: function () {
  4342. var e = this;
  4343. "paused" !== this.status && "closed" !== this.status && e.queue.length && e.queue.forEach(function (t) {
  4344. "waiting" !== t.status && "paused" !== t.status || t.startMove(e.channel.containerPos)
  4345. })
  4346. }
  4347. }, {
  4348. key: "readData", value: function () {
  4349. var e = this, t = this.danmu, n = 0;
  4350. t.player && t.player.currentTime && (n = o.default.formatTime(t.player.currentTime));
  4351. var r = void 0, a = e.interval, l = e.channel, s = void 0;
  4352. t.player ? (s = e.data.filter(function (t) {
  4353. return !t.start && e.danmu.hideArr.indexOf(t.mode) < 0 && (!t.color || e.danmu.hideArr.indexOf("color") < 0) && (t.start = n), e.danmu.hideArr.indexOf(t.mode) < 0 && (!t.color || e.danmu.hideArr.indexOf("color") < 0) && t.start - a <= n && n <= t.start + a
  4354. }), t.live && (e.data = e.data.filter(function (e) {
  4355. return e.start || (e.start = n), e.start > n - 3 * a
  4356. }))) : s = e.data.filter(function (t) {
  4357. return e.danmu.hideArr.indexOf(t.mode) < 0 && (!t.color || e.danmu.hideArr.indexOf("color") < 0)
  4358. }), s.length > 0 && s.forEach(function (n) {
  4359. (r = new i.default(t, n)).attach(), l.addBullet(r).result ? (e.queue.push(r), r.topInit()) : r.detach()
  4360. })
  4361. }
  4362. }]), e
  4363. }();
  4364. t.default = s, e.exports = t.default
  4365. }, function (e, t, n) {
  4366. Object.defineProperty(t, "__esModule", {value: !0});
  4367. var r = function () {
  4368. function e(e, t) {
  4369. for (var n = 0; n < t.length; n++) {
  4370. var r = t[n];
  4371. r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r)
  4372. }
  4373. }
  4374. return function (t, n, r) {
  4375. return n && e(t.prototype, n), r && e(t, r), t
  4376. }
  4377. }(), a = function () {
  4378. function e(t) {
  4379. !function (e, t) {
  4380. if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function")
  4381. }(this, e), this.danmu = t, this.reset();
  4382. var n = this;
  4383. this.danmu.on("bullet_remove", function (e) {
  4384. n.removeBullet(e.bullet)
  4385. }), this.direction = t.direction, this.danmu.on("changeDirection", function (e) {
  4386. n.direction = e
  4387. }), this.containerPos = this.danmu.container.getBoundingClientRect(), this.containerWidth = this.containerPos.width, this.containerHeight = this.containerPos.height, this.containerLeft = this.containerPos.left, this.containerRight = this.containerPos.right, this.danmu.bulletResizeTimer = setInterval(function () {
  4388. n.containerPos = n.danmu.container.getBoundingClientRect(), (Math.abs(n.containerPos.width - n.containerWidth) >= 2 || Math.abs(n.containerPos.height - n.containerHeight) >= 2 || Math.abs(n.containerPos.left - n.containerLeft) >= 2 || Math.abs(n.containerPos.right - n.containerRight) >= 2) && (n.containerWidth = n.containerPos.width, n.containerHeight = n.containerPos.height, n.containerLeft = n.containerPos.left, n.containerRight = n.containerPos.right, n.resize(!0))
  4389. }, 50)
  4390. }
  4391. return r(e, [{
  4392. key: "resize", value: function () {
  4393. var e = arguments.length > 0 && void 0 !== arguments[0] && arguments[0],
  4394. t = this.danmu.container, n = this;
  4395. setTimeout(function () {
  4396. n.danmu.bulletBtn.main.data && n.danmu.bulletBtn.main.data.forEach(function (e) {
  4397. e.bookChannelId && delete e.bookChannelId
  4398. });
  4399. var r = t.getBoundingClientRect();
  4400. n.width = r.width, n.height = r.height, n.danmu.config.area && n.danmu.config.area.start >= 0 && n.danmu.config.area.end >= n.danmu.config.area.start && ("b2t" === n.direction ? n.width = n.width * (n.danmu.config.area.end - n.danmu.config.area.start) : n.height = n.height * (n.danmu.config.area.end - n.danmu.config.area.start)), n.container = t;
  4401. var a, i = /mobile/gi.test(navigator.userAgent) ? 10 : 12;
  4402. a = "b2t" === n.direction ? Math.floor(n.width / i) : Math.floor(n.height / i);
  4403. for (var o = [], l = 0; l < a; l++) o[l] = {
  4404. id: l,
  4405. queue: {scroll: [], top: [], bottom: []},
  4406. operating: {scroll: !1, top: !1, bottom: !1},
  4407. bookId: {}
  4408. };
  4409. if (n.channels && n.channels.length <= o.length) {
  4410. for (var s = function (t) {
  4411. o[t] = {
  4412. id: t,
  4413. queue: {scroll: [], top: [], bottom: []},
  4414. operating: {scroll: !1, top: !1, bottom: !1},
  4415. bookId: {}
  4416. }, ["scroll", "top"].forEach(function (r) {
  4417. n.channels[t].queue[r].forEach(function (a) {
  4418. a.el && (o[t].queue[r].push(a), a.resized || (a.pauseMove(n.containerPos, e), a.startMove(n.containerPos), a.resized = !0))
  4419. })
  4420. }), n.channels[t].queue.bottom.forEach(function (r) {
  4421. if (r.el) {
  4422. if (o[t + o.length - n.channels.length].queue.bottom.push(r), r.channel_id[0] + r.channel_id[1] - 1 === t) {
  4423. var a = [].concat(r.channel_id);
  4424. r.channel_id = [a[0] - n.channels.length + o.length, a[1]], r.top = r.channel_id[0] * i, n.danmu.config.area && n.danmu.config.area.start && (r.top += n.containerHeight * n.danmu.config.area.start), r.topInit()
  4425. }
  4426. r.resized || (r.pauseMove(n.containerPos, e), r.startMove(n.containerPos), r.resized = !0)
  4427. }
  4428. })
  4429. }, u = 0; u < n.channels.length; u++) s(u);
  4430. for (var c = function (e) {
  4431. ["scroll", "top", "bottom"].forEach(function (t) {
  4432. o[e].queue[t].forEach(function (e) {
  4433. e.resized = !1
  4434. })
  4435. })
  4436. }, p = 0; p < o.length; p++) c(p);
  4437. n.channels = o, "b2t" === n.direction ? n.channelWidth = i : n.channelHeight = i
  4438. } else if (n.channels && n.channels.length > o.length) {
  4439. for (var d = function (t) {
  4440. o[t] = {
  4441. id: t,
  4442. queue: {scroll: [], top: [], bottom: []},
  4443. operating: {scroll: !1, top: !1, bottom: !1},
  4444. bookId: {}
  4445. }, ["scroll", "top", "bottom"].forEach(function (r) {
  4446. if ("top" === r && t > Math.floor(o.length / 2)) ; else if ("bottom" === r && t <= Math.floor(o.length / 2)) ; else {
  4447. var a = "bottom" === r ? t - o.length + n.channels.length : t;
  4448. n.channels[a].queue[r].forEach(function (l, s) {
  4449. if (l.el) {
  4450. if (o[t].queue[r].push(l), "bottom" === r && l.channel_id[0] + l.channel_id[1] - 1 === a) {
  4451. var u = [].concat(l.channel_id);
  4452. l.channel_id = [u[0] - n.channels.length + o.length, u[1]], l.top = l.channel_id[0] * i, n.danmu.config.area && n.danmu.config.area.start && (l.top += n.containerHeight * n.danmu.config.area.start), l.topInit()
  4453. }
  4454. l.resized || (l.pauseMove(n.containerPos, e), l.startMove(n.containerPos), l.resized = !0)
  4455. }
  4456. n.channels[a].queue[r].splice(s, 1)
  4457. })
  4458. }
  4459. })
  4460. }, f = 0; f < o.length; f++) d(f);
  4461. for (var g = function (e) {
  4462. ["scroll", "top", "bottom"].forEach(function (t) {
  4463. n.channels[e].queue[t].forEach(function (e) {
  4464. e.pauseMove(n.containerPos), e.remove()
  4465. })
  4466. })
  4467. }, h = o.length; h < n.channels.length; h++) g(h);
  4468. for (var y = function (e) {
  4469. ["scroll", "top", "bottom"].forEach(function (t) {
  4470. o[e].queue[t].forEach(function (e) {
  4471. e.resized = !1
  4472. })
  4473. })
  4474. }, x = 0; x < o.length; x++) y(x);
  4475. n.channels = o, "b2t" === n.direction ? n.channelWidth = i : n.channelHeight = i
  4476. }
  4477. }, 10)
  4478. }
  4479. }, {
  4480. key: "addBullet", value: function (e) {
  4481. var t = this.danmu, n = this.channels, r = void 0, a = void 0, i = void 0;
  4482. if ("b2t" === this.direction ? (a = this.channelWidth, i = Math.ceil(e.width / a)) : (r = this.channelHeight, i = Math.ceil(e.height / r)), i > n.length) return {
  4483. result: !1,
  4484. message: "exceed channels.length, occupy=" + i + ",channelsSize=" + n.length
  4485. };
  4486. for (var o = !0, l = void 0, s = -1, u = 0, c = n.length; u < c; u++) if (n[u].queue[e.mode].some(function (t) {
  4487. return t.id === e.id
  4488. })) return {result: !1, message: "exsited, channelOrder=" + u + ",danmu_id=" + e.id};
  4489. if ("scroll" === e.mode) for (var p = 0, d = n.length - i; p <= d; p++) {
  4490. o = !0;
  4491. for (var f = p; f < p + i; f++) {
  4492. if ((l = n[f]).operating.scroll) {
  4493. o = !1;
  4494. break
  4495. }
  4496. if ((l.bookId.scroll || e.prior) && l.bookId.scroll !== e.id) {
  4497. o = !1;
  4498. break
  4499. }
  4500. l.operating.scroll = !0;
  4501. var g = l.queue.scroll[0];
  4502. if (g) {
  4503. var h = g.el.getBoundingClientRect();
  4504. if ("b2t" === this.direction) {
  4505. if (h.bottom > this.containerPos.bottom) {
  4506. o = !1, l.operating.scroll = !1;
  4507. break
  4508. }
  4509. } else if (h.right > this.containerPos.right) {
  4510. o = !1, l.operating.scroll = !1;
  4511. break
  4512. }
  4513. var y, x = void 0, m = void 0, v = void 0, b = void 0;
  4514. if ("b2t" === this.direction ? (m = (h.top - this.containerPos.top + h.height) / (x = (this.containerPos.height + h.height) / g.duration), v = this.containerPos.height, b = (this.containerPos.height + e.height) / e.duration) : (m = (h.left - this.containerPos.left + h.width) / (x = (this.containerPos.width + h.width) / g.duration), v = this.containerPos.width, b = (this.containerPos.width + e.width) / e.duration), y = v / b, t.config.bOffset || (t.config.bOffset = 0), x < b && m + t.config.bOffset > y) {
  4515. o = !1, l.operating.scroll = !1;
  4516. break
  4517. }
  4518. }
  4519. l.operating.scroll = !1
  4520. }
  4521. if (o) {
  4522. s = p;
  4523. break
  4524. }
  4525. } else if ("top" === e.mode) for (var k = 0, w = n.length - i; k <= w; k++) {
  4526. o = !0;
  4527. for (var _ = k; _ < k + i; _++) {
  4528. if (_ > Math.floor(n.length / 2)) {
  4529. o = !1;
  4530. break
  4531. }
  4532. if ((l = n[_]).operating[e.mode]) {
  4533. o = !1;
  4534. break
  4535. }
  4536. if ((l.bookId[e.mode] || e.prior) && l.bookId[e.mode] !== e.id) {
  4537. o = !1;
  4538. break
  4539. }
  4540. if (l.operating[e.mode] = !0, l.queue[e.mode].length > 0) {
  4541. o = !1, l.operating[e.mode] = !1;
  4542. break
  4543. }
  4544. l.operating[e.mode] = !1
  4545. }
  4546. if (o) {
  4547. s = k;
  4548. break
  4549. }
  4550. } else if ("bottom" === e.mode) for (var E = n.length - i; E >= 0; E--) {
  4551. o = !0;
  4552. for (var C = E; C < E + i; C++) {
  4553. if (C <= Math.floor(n.length / 2)) {
  4554. o = !1;
  4555. break
  4556. }
  4557. if ((l = n[C]).operating[e.mode]) {
  4558. o = !1;
  4559. break
  4560. }
  4561. if ((l.bookId[e.mode] || e.prior) && l.bookId[e.mode] !== e.id) {
  4562. o = !1;
  4563. break
  4564. }
  4565. if (l.operating[e.mode] = !0, l.queue[e.mode].length > 0) {
  4566. o = !1, l.operating[e.mode] = !1;
  4567. break
  4568. }
  4569. l.operating[e.mode] = !1
  4570. }
  4571. if (o) {
  4572. s = E;
  4573. break
  4574. }
  4575. }
  4576. if (-1 !== s) {
  4577. for (var S = s, P = s + i; S < P; S++) (l = n[S]).operating[e.mode] = !0, l.queue[e.mode].unshift(e), e.prior && delete l.bookId[e.mode], l.operating[e.mode] = !1;
  4578. return e.prior && (delete e.bookChannelId, t.bulletBtn.main.data.some(function (t) {
  4579. return t.id === e.id && (delete t.bookChannelId, !0)
  4580. })), e.channel_id = [s, i], "b2t" === this.direction ? (e.top = s * a, this.danmu.config.area && this.danmu.config.area.start && (e.top += this.containerWidth * this.danmu.config.area.start)) : (e.top = s * r, this.danmu.config.area && this.danmu.config.area.start && (e.top += this.containerHeight * this.danmu.config.area.start)), {
  4581. result: e,
  4582. message: "success"
  4583. }
  4584. }
  4585. if (e.prior) if (e.bookChannelId) t.bulletBtn.main.data.some(function (t) {
  4586. return t.id === e.id && (t.start += 2e3, !0)
  4587. }); else {
  4588. s = -1;
  4589. for (var T = 0, O = n.length - i; T <= O; T++) {
  4590. o = !0;
  4591. for (var L = T; L < T + i; L++) if (n[L].bookId[e.mode]) {
  4592. o = !1;
  4593. break
  4594. }
  4595. if (o) {
  4596. s = T;
  4597. break
  4598. }
  4599. }
  4600. if (-1 !== s) {
  4601. for (var D = s; D < s + i; D++) n[D].bookId[e.mode] = e.id;
  4602. t.bulletBtn.main.data.some(function (t) {
  4603. return t.id === e.id && (t.start += 2e3, t.bookChannelId = [s, i], !0)
  4604. })
  4605. }
  4606. }
  4607. return {result: !1, message: "no surplus will right"}
  4608. }
  4609. }, {
  4610. key: "removeBullet", value: function (e) {
  4611. for (var t = this.channels, n = e.channel_id, r = void 0, a = n[0], i = n[0] + n[1]; a < i; a++) if (r = t[a]) {
  4612. r.operating[e.mode] = !0;
  4613. var o = -1;
  4614. r.queue[e.mode].some(function (t, n) {
  4615. return t.id === e.id && (o = n, !0)
  4616. }), o > -1 && r.queue[e.mode].splice(o, 1), r.operating[e.mode] = !1
  4617. }
  4618. }
  4619. }, {
  4620. key: "resetArea", value: function () {
  4621. var e = this.danmu.container, t = this, n = e.getBoundingClientRect();
  4622. t.width = n.width, t.height = n.height, t.danmu.config.area && t.danmu.config.area.start >= 0 && t.danmu.config.area.end >= t.danmu.config.area.start && ("b2t" === t.direction ? t.width = t.width * (t.danmu.config.area.end - t.danmu.config.area.start) : t.height = t.height * (t.danmu.config.area.end - t.danmu.config.area.start)), t.container = e;
  4623. var r, a = /mobile/gi.test(navigator.userAgent) ? 10 : 12;
  4624. r = "b2t" === t.direction ? Math.floor(t.width / a) : Math.floor(t.height / a);
  4625. for (var i = [], o = 0; o < r; o++) i[o] = {
  4626. id: o,
  4627. queue: {scroll: [], top: [], bottom: []},
  4628. operating: {scroll: !1, top: !1, bottom: !1},
  4629. bookId: {}
  4630. };
  4631. if (t.channels && t.channels.length <= i.length) {
  4632. for (var l = function (e) {
  4633. i[e] = {
  4634. id: e,
  4635. queue: {scroll: [], top: [], bottom: []},
  4636. operating: {scroll: !1, top: !1, bottom: !1},
  4637. bookId: {}
  4638. }, ["scroll", "top"].forEach(function (n) {
  4639. t.channels[e].queue[n].forEach(function (r) {
  4640. r.el && (i[e].queue[n].push(r), r.resized || (r.pauseMove(t.containerPos, !1), r.startMove(t.containerPos), r.resized = !0))
  4641. })
  4642. }), t.channels[e].queue.bottom.forEach(function (n) {
  4643. if (n.el) {
  4644. if (i[e + i.length - t.channels.length].queue.bottom.push(n), n.channel_id[0] + n.channel_id[1] - 1 === e) {
  4645. var r = [].concat(n.channel_id);
  4646. n.channel_id = [r[0] - t.channels.length + i.length, r[1]], n.top = n.channel_id[0] * a, t.danmu.config.area && t.danmu.config.area.start && (n.top += t.containerHeight * t.danmu.config.area.start), n.topInit()
  4647. }
  4648. n.resized || (n.pauseMove(t.containerPos, !1), n.startMove(t.containerPos), n.resized = !0)
  4649. }
  4650. })
  4651. }, s = 0; s < t.channels.length; s++) l(s);
  4652. for (var u = function (e) {
  4653. ["scroll", "top", "bottom"].forEach(function (t) {
  4654. i[e].queue[t].forEach(function (e) {
  4655. e.resized = !1
  4656. })
  4657. })
  4658. }, c = 0; c < i.length; c++) u(c);
  4659. t.channels = i, "b2t" === t.direction ? t.channelWidth = a : t.channelHeight = a
  4660. } else if (t.channels && t.channels.length > i.length) {
  4661. for (var p = function (e) {
  4662. i[e] = {
  4663. id: e,
  4664. queue: {scroll: [], top: [], bottom: []},
  4665. operating: {scroll: !1, top: !1, bottom: !1},
  4666. bookId: {}
  4667. }, ["scroll", "top", "bottom"].forEach(function (n) {
  4668. if ("top" === n && e > Math.floor(i.length / 2)) ; else if ("bottom" === n && e <= Math.floor(i.length / 2)) ; else {
  4669. var r = "bottom" === n ? e - i.length + t.channels.length : e;
  4670. t.channels[r].queue[n].forEach(function (o, l) {
  4671. if (o.el) {
  4672. if (i[e].queue[n].push(o), "bottom" === n && o.channel_id[0] + o.channel_id[1] - 1 === r) {
  4673. var s = [].concat(o.channel_id);
  4674. o.channel_id = [s[0] - t.channels.length + i.length, s[1]], o.top = o.channel_id[0] * a, t.danmu.config.area && t.danmu.config.area.start && (o.top += t.containerHeight * t.danmu.config.area.start), o.topInit()
  4675. }
  4676. o.resized || (o.pauseMove(t.containerPos, !1), o.startMove(t.containerPos), o.resized = !0)
  4677. }
  4678. t.channels[r].queue[n].splice(l, 1)
  4679. })
  4680. }
  4681. })
  4682. }, d = 0; d < i.length; d++) p(d);
  4683. for (var f = function (e) {
  4684. ["scroll", "top", "bottom"].forEach(function (t) {
  4685. i[e].queue[t].forEach(function (e) {
  4686. e.resized = !1
  4687. })
  4688. })
  4689. }, g = 0; g < i.length; g++) f(g);
  4690. t.channels = i, "b2t" === t.direction ? t.channelWidth = a : t.channelHeight = a
  4691. }
  4692. }
  4693. }, {
  4694. key: "reset", value: function () {
  4695. var e = this.danmu.container, t = this;
  4696. t.channels && t.channels.length > 0 && ["scroll", "top", "bottom"].forEach(function (e) {
  4697. for (var n = 0; n < t.channels.length; n++) t.channels[n].queue[e].forEach(function (e) {
  4698. e.pauseMove(t.containerPos), e.remove()
  4699. })
  4700. }), setTimeout(function () {
  4701. var n = e.getBoundingClientRect();
  4702. t.width = n.width, t.height = n.height, t.danmu.config.area && t.danmu.config.area.start >= 0 && t.danmu.config.area.end >= t.danmu.config.area.start && ("b2t" === t.direction ? t.width = t.width * (t.danmu.config.area.end - t.danmu.config.area.start) : t.height = t.height * (t.danmu.config.area.end - t.danmu.config.area.start)), t.container = e;
  4703. var r, a = /mobile/gi.test(navigator.userAgent) ? 10 : 12;
  4704. r = "b2t" === t.direction ? Math.floor(t.width / a) : Math.floor(t.height / a);
  4705. for (var i = [], o = 0; o < r; o++) i[o] = {
  4706. id: o,
  4707. queue: {scroll: [], top: [], bottom: []},
  4708. operating: {scroll: !1, top: !1, bottom: !1},
  4709. bookId: {}
  4710. };
  4711. t.channels = i, "b2t" === t.direction ? t.channelWidth = a : t.channelHeight = a
  4712. }, 200)
  4713. }
  4714. }, {
  4715. key: "resetWithCb", value: function (e, t) {
  4716. var n = this.danmu.container, r = this;
  4717. r.channels && r.channels.length > 0 && ["scroll", "top", "bottom"].forEach(function (e) {
  4718. for (var t = 0; t < r.channels.length; t++) r.channels[t].queue[e].forEach(function (e) {
  4719. e.pauseMove(r.containerPos), e.remove()
  4720. })
  4721. });
  4722. var a = n.getBoundingClientRect();
  4723. r.width = a.width, r.height = a.height, r.danmu.config.area && r.danmu.config.area.start >= 0 && r.danmu.config.area.end >= r.danmu.config.area.start && ("b2t" === r.direction ? r.width = r.width * (r.danmu.config.area.end - r.danmu.config.area.start) : r.height = r.height * (r.danmu.config.area.end - r.danmu.config.area.start)), r.container = n;
  4724. var i, o = /mobile/gi.test(navigator.userAgent) ? 10 : 12;
  4725. i = "b2t" === r.direction ? Math.floor(r.width / o) : Math.floor(r.height / o);
  4726. for (var l = [], s = 0; s < i; s++) l[s] = {
  4727. id: s,
  4728. queue: {scroll: [], top: [], bottom: []},
  4729. operating: {scroll: !1, top: !1, bottom: !1},
  4730. bookId: {}
  4731. };
  4732. r.channels = l, r.channelHeight = o, e && e(!0, t)
  4733. }
  4734. }]), e
  4735. }();
  4736. t.default = a, e.exports = t.default
  4737. }, function (e, t, n) {
  4738. Object.defineProperty(t, "__esModule", {value: !0});
  4739. var r, a = function () {
  4740. function e(e, t) {
  4741. for (var n = 0; n < t.length; n++) {
  4742. var r = t[n];
  4743. r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r)
  4744. }
  4745. }
  4746. return function (t, n, r) {
  4747. return n && e(t.prototype, n), r && e(t, r), t
  4748. }
  4749. }(), i = (r = n(0)) && r.__esModule ? r : {default: r}, o = function () {
  4750. function e(t, n) {
  4751. !function (e, t) {
  4752. if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function")
  4753. }(this, e), this.danmu = t, this.duration = n.duration, this.id = n.id, this.container = t.container, this.start = n.start, this.prior = n.prior, this.color = n.color, this.bookChannelId = n.bookChannelId, this.direction = t.direction;
  4754. var r = this;
  4755. this.danmu.on("changeDirection", function (e) {
  4756. r.direction = e
  4757. });
  4758. var a = void 0;
  4759. if (this.domObj = i.default.domObj, n.el && 1 === n.el.nodeType) (a = this.domObj.use()).appendChild(i.default.copyDom(n.el)); else if ((a = this.domObj.use()).textContent = n.txt, n.style) {
  4760. var o = n.style;
  4761. Object.keys(o).forEach(function (e) {
  4762. a.style[e] = o[e]
  4763. })
  4764. }
  4765. "top" === n.mode || "bottom" === n.mode ? this.mode = n.mode : this.mode = "scroll", this.el = a, this.status = "waiting";
  4766. var l = this.container.getBoundingClientRect();
  4767. this.el.style.left = l.width + "px"
  4768. }
  4769. return a(e, [{
  4770. key: "attach", value: function () {
  4771. this.container.appendChild(this.el), this.elPos = this.el.getBoundingClientRect(), "b2t" === this.direction ? (this.width = this.elPos.height, this.height = this.elPos.width) : (this.width = this.elPos.width, this.height = this.elPos.height)
  4772. }
  4773. }, {
  4774. key: "detach", value: function () {
  4775. this.container && this.el && (this.domObj.unuse(this.el), this.container.removeChild(this.el));
  4776. var e = this;
  4777. this.danmu.off("changeDirection", function (t) {
  4778. e.direction = t
  4779. }), this.el = null
  4780. }
  4781. }, {
  4782. key: "topInit", value: function () {
  4783. if ("b2t" === this.direction) {
  4784. var e = this.container.getBoundingClientRect();
  4785. this.el.style.transformOrigin = "left top", this.el.style.transform = "translateX(-" + this.top + "px) translateY(" + e.height + "px) translateZ(0px) rotate(90deg)", this.el.style.transition = "transform 0s linear 0s"
  4786. } else this.el.style.top = this.top + "px"
  4787. }
  4788. }, {
  4789. key: "pauseMove", value: function (e) {
  4790. var t = arguments.length > 1 && void 0 !== arguments[1] && arguments[1];
  4791. if ("paused" !== this.status && (this.status = "paused", clearTimeout(this.removeTimer), this.el)) if (this.el.style.willChange = "auto", "scroll" === this.mode) {
  4792. if (t) {
  4793. var n, r = ((new Date).getTime() - this.moveTime) / 1e3 * this.moveV;
  4794. n = this.moveMoreS - r >= 0 ? "b2t" === this.direction ? (this.moveMoreS - r) / this.moveContainerHeight * e.height : (this.moveMoreS - r) / this.moveContainerWidth * e.width : this.moveMoreS - r, "b2t" === this.direction ? this.el.style.transform = "translateX(-" + this.top + "px) translateY(" + n + "px) translateZ(0px) rotate(90deg)" : this.el.style.left = n + "px"
  4795. } else "b2t" === this.direction ? this.el.style.transform = "translateX(-" + this.top + "px) translateY(" + (this.el.getBoundingClientRect().top - e.top) + "px) translateZ(0px) rotate(90deg)" : this.el.style.left = this.el.getBoundingClientRect().left - e.left + "px";
  4796. "b2t" === this.direction ? this.el.style.transition = "transform 0s linear 0s" : (this.el.style.transform = "translateX(0px) translateY(0px) translateZ(0px)", this.el.style.transition = "transform 0s linear 0s")
  4797. } else this.pastDuration && this.startTime ? this.pastDuration = this.pastDuration + (new Date).getTime() - this.startTime : this.pastDuration = 1
  4798. }
  4799. }, {
  4800. key: "startMove", value: function (e) {
  4801. var t = this;
  4802. if (this.el && "start" !== this.status) if (this.status = "start", this.el.style.willChange = "transform", "scroll" === this.mode) if ("b2t" === this.direction) {
  4803. this.moveV = (e.height + this.height) / this.duration * 1e3;
  4804. var n = (t.el.getBoundingClientRect().bottom - e.top) / this.moveV;
  4805. this.el.style.transition = "transform " + n + "s linear 0s", setTimeout(function () {
  4806. t.el && (t.el.style.transform = "translateX(-" + t.top + "px) translateY(-" + t.height + "px) translateZ(0px) rotate(90deg)", t.moveTime = (new Date).getTime(), t.moveMoreS = t.el.getBoundingClientRect().top - e.top, t.moveContainerHeight = e.height, t.removeTimer = setTimeout(i, 1e3 * n))
  4807. }, 20)
  4808. } else {
  4809. this.moveV = (e.width + this.width) / this.duration * 1e3;
  4810. var r = (t.el.getBoundingClientRect().right - e.left) / this.moveV;
  4811. this.el.style.transition = "transform " + r + "s linear 0s", setTimeout(function () {
  4812. t.el && (t.el.style.transform = "translateX(-" + (t.el.getBoundingClientRect().right - e.left) + "px) translateY(0px) translateZ(0px)", t.moveTime = (new Date).getTime(), t.moveMoreS = t.el.getBoundingClientRect().left - e.left, t.moveContainerWidth = e.width, t.removeTimer = setTimeout(i, 1e3 * r))
  4813. }, 20)
  4814. } else {
  4815. this.el.style.left = "50%", this.el.style.margin = "0 0 0 -" + this.width / 2 + "px", this.pastDuration || (this.pastDuration = 1);
  4816. var a = this.duration >= this.pastDuration ? this.duration - this.pastDuration : 0;
  4817. this.removeTimer = setTimeout(i, a), this.startTime = (new Date).getTime()
  4818. }
  4819. function i() {
  4820. if (t.el) if ("scroll" === t.mode) {
  4821. var e = t.danmu.container.getBoundingClientRect(),
  4822. n = t.el.getBoundingClientRect();
  4823. "b2t" === t.direction ? n && n.bottom <= e.top + 100 ? (t.status = "end", t.remove()) : (t.pauseMove(e), t.startMove(e)) : n && n.right <= e.left + 100 ? (t.status = "end", t.remove()) : (t.pauseMove(e), t.startMove(e))
  4824. } else t.status = "end", t.remove()
  4825. }
  4826. }
  4827. }, {
  4828. key: "remove", value: function () {
  4829. var e = this;
  4830. this.removeTimer && clearTimeout(this.removeTimer), e.el && e.el.parentNode && (e.el.style.willChange = "auto", this.danmu.off("changeDirection", function (t) {
  4831. e.direction = t
  4832. }), this.domObj.unuse(e.el), e.el.parentNode.removeChild(e.el), e.el = null, e.danmu.emit("bullet_remove", {bullet: e}))
  4833. }
  4834. }]), e
  4835. }();
  4836. t.default = o, e.exports = t.default
  4837. }, function (e, t, n) {
  4838. var r = n(27);
  4839. "string" == typeof r && (r = [[e.i, r, ""]]);
  4840. n(29)(r, {hmr: !0, transform: void 0, insertInto: void 0}), r.locals && (e.exports = r.locals)
  4841. }, function (e, t, n) {
  4842. (e.exports = n(28)(!1)).push([e.i, ".danmu{overflow:hidden;-webkit-user-select:none;-moz-user-select:none;user-select:none;-ms-user-select:none}.danmu>*{position:absolute;white-space:nowrap}.danmu-switch{width:32px;height:20px;border-radius:100px;background-color:#ccc;-webkit-box-sizing:border-box;box-sizing:border-box;outline:none;cursor:pointer;position:relative;text-align:center;margin:10px auto}.danmu-switch.danmu-switch-active{padding-left:12px;background-color:#f85959}.danmu-switch span.txt{width:20px;height:20px;line-height:20px;text-align:center;display:block;border-radius:100px;background-color:#ffffff;-webkit-box-shadow:-2px 0 0 0 rgba(0, 0, 0, .04);box-shadow:-2px 0 0 0 rgba(0, 0, 0, .04);font-family:PingFangSC;font-size:10px;font-weight:500;color:#f44336}\n", ""])
  4843. }, function (e, t) {
  4844. e.exports = function (e) {
  4845. var t = [];
  4846. return t.toString = function () {
  4847. return this.map(function (t) {
  4848. var n = function (e, t) {
  4849. var n, r = e[1] || "", a = e[3];
  4850. if (!a) return r;
  4851. if (t && "function" == typeof btoa) {
  4852. var i = (n = a, "/*# sourceMappingURL=data:application/json;charset=utf-8;base64," + btoa(unescape(encodeURIComponent(JSON.stringify(n)))) + " */"),
  4853. o = a.sources.map(function (e) {
  4854. return "/*# sourceURL=" + a.sourceRoot + e + " */"
  4855. });
  4856. return [r].concat(o).concat([i]).join("\n")
  4857. }
  4858. return [r].join("\n")
  4859. }(t, e);
  4860. return t[2] ? "@media " + t[2] + "{" + n + "}" : n
  4861. }).join("")
  4862. }, t.i = function (e, n) {
  4863. "string" == typeof e && (e = [[null, e, ""]]);
  4864. for (var r = {}, a = 0; a < this.length; a++) {
  4865. var i = this[a][0];
  4866. "number" == typeof i && (r[i] = !0)
  4867. }
  4868. for (a = 0; a < e.length; a++) {
  4869. var o = e[a];
  4870. "number" == typeof o[0] && r[o[0]] || (n && !o[2] ? o[2] = n : n && (o[2] = "(" + o[2] + ") and (" + n + ")"), t.push(o))
  4871. }
  4872. }, t
  4873. }
  4874. }, function (e, t, n) {
  4875. var r, a, i = {}, l = (r = function () {
  4876. return window && document && document.all && !window.atob
  4877. }, function () {
  4878. return void 0 === a && (a = r.apply(this, arguments)), a
  4879. }), s = function (e) {
  4880. var t = {};
  4881. return function (e) {
  4882. if ("function" == typeof e) return e();
  4883. if (void 0 === t[e]) {
  4884. var n = function (e) {
  4885. return document.querySelector(e)
  4886. }.call(this, e);
  4887. if (window.HTMLIFrameElement && n instanceof window.HTMLIFrameElement) try {
  4888. n = n.contentDocument.head
  4889. } catch (e) {
  4890. n = null
  4891. }
  4892. t[e] = n
  4893. }
  4894. return t[e]
  4895. }
  4896. }(), u = null, c = 0, p = [], d = n(30);
  4897. function f(e, t) {
  4898. for (var n = 0; n < e.length; n++) {
  4899. var r = e[n], a = i[r.id];
  4900. if (a) {
  4901. a.refs++;
  4902. for (var o = 0; o < a.parts.length; o++) a.parts[o](r.parts[o]);
  4903. for (; o < r.parts.length; o++) a.parts.push(v(r.parts[o], t))
  4904. } else {
  4905. var l = [];
  4906. for (o = 0; o < r.parts.length; o++) l.push(v(r.parts[o], t));
  4907. i[r.id] = {id: r.id, refs: 1, parts: l}
  4908. }
  4909. }
  4910. }
  4911. function g(e, t) {
  4912. for (var n = [], r = {}, a = 0; a < e.length; a++) {
  4913. var i = e[a], o = t.base ? i[0] + t.base : i[0],
  4914. l = {css: i[1], media: i[2], sourceMap: i[3]};
  4915. r[o] ? r[o].parts.push(l) : n.push(r[o] = {id: o, parts: [l]})
  4916. }
  4917. return n
  4918. }
  4919. function h(e, t) {
  4920. var n = s(e.insertInto);
  4921. if (!n) throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");
  4922. var r = p[p.length - 1];
  4923. if ("top" === e.insertAt) r ? r.nextSibling ? n.insertBefore(t, r.nextSibling) : n.appendChild(t) : n.insertBefore(t, n.firstChild), p.push(t); else if ("bottom" === e.insertAt) n.appendChild(t); else {
  4924. if ("object" != o(e.insertAt) || !e.insertAt.before) throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");
  4925. var a = s(e.insertInto + " " + e.insertAt.before);
  4926. n.insertBefore(t, a)
  4927. }
  4928. }
  4929. function y(e) {
  4930. if (null === e.parentNode) return !1;
  4931. e.parentNode.removeChild(e);
  4932. var t = p.indexOf(e);
  4933. t >= 0 && p.splice(t, 1)
  4934. }
  4935. function x(e) {
  4936. var t = document.createElement("style");
  4937. return void 0 === e.attrs.type && (e.attrs.type = "text/css"), m(t, e.attrs), h(e, t), t
  4938. }
  4939. function m(e, t) {
  4940. Object.keys(t).forEach(function (n) {
  4941. e.setAttribute(n, t[n])
  4942. })
  4943. }
  4944. function v(e, t) {
  4945. var n, r, a, i;
  4946. if (t.transform && e.css) {
  4947. if (!(i = t.transform(e.css))) return function () {
  4948. };
  4949. e.css = i
  4950. }
  4951. if (t.singleton) {
  4952. var o = c++;
  4953. n = u || (u = x(t)), r = w.bind(null, n, o, !1), a = w.bind(null, n, o, !0)
  4954. } else e.sourceMap && "function" == typeof URL && "function" == typeof URL.createObjectURL && "function" == typeof URL.revokeObjectURL && "function" == typeof Blob && "function" == typeof btoa ? (n = function (e) {
  4955. var t = document.createElement("link");
  4956. return void 0 === e.attrs.type && (e.attrs.type = "text/css"), e.attrs.rel = "stylesheet", m(t, e.attrs), h(e, t), t
  4957. }(t), r = function (e, t, n) {
  4958. var r = n.css, a = n.sourceMap, i = void 0 === t.convertToAbsoluteUrls && a;
  4959. (t.convertToAbsoluteUrls || i) && (r = d(r)), a && (r += "\n/*# sourceMappingURL=data:application/json;base64," + btoa(unescape(encodeURIComponent(JSON.stringify(a)))) + " */");
  4960. var o = new Blob([r], {type: "text/css"}), l = e.href;
  4961. e.href = URL.createObjectURL(o), l && URL.revokeObjectURL(l)
  4962. }.bind(null, n, t), a = function () {
  4963. y(n), n.href && URL.revokeObjectURL(n.href)
  4964. }) : (n = x(t), r = function (e, t) {
  4965. var n = t.css, r = t.media;
  4966. if (r && e.setAttribute("media", r), e.styleSheet) e.styleSheet.cssText = n; else {
  4967. for (; e.firstChild;) e.removeChild(e.firstChild);
  4968. e.appendChild(document.createTextNode(n))
  4969. }
  4970. }.bind(null, n), a = function () {
  4971. y(n)
  4972. });
  4973. return r(e), function (t) {
  4974. if (t) {
  4975. if (t.css === e.css && t.media === e.media && t.sourceMap === e.sourceMap) return;
  4976. r(e = t)
  4977. } else a()
  4978. }
  4979. }
  4980. e.exports = function (e, t) {
  4981. if ("undefined" != typeof DEBUG && DEBUG && "object" != ("undefined" == typeof document ? "undefined" : o(document))) throw new Error("The style-loader cannot be used in a non-browser environment");
  4982. (t = t || {}).attrs = "object" == o(t.attrs) ? t.attrs : {}, t.singleton || "boolean" == typeof t.singleton || (t.singleton = l()), t.insertInto || (t.insertInto = "head"), t.insertAt || (t.insertAt = "bottom");
  4983. var n = g(e, t);
  4984. return f(n, t), function (e) {
  4985. for (var r = [], a = 0; a < n.length; a++) {
  4986. var o = n[a];
  4987. (l = i[o.id]).refs--, r.push(l)
  4988. }
  4989. for (e && f(g(e, t), t), a = 0; a < r.length; a++) {
  4990. var l;
  4991. if (0 === (l = r[a]).refs) {
  4992. for (var s = 0; s < l.parts.length; s++) l.parts[s]();
  4993. delete i[l.id]
  4994. }
  4995. }
  4996. }
  4997. };
  4998. var b, k = (b = [], function (e, t) {
  4999. return b[e] = t, b.filter(Boolean).join("\n")
  5000. });
  5001. function w(e, t, n, r) {
  5002. var a = n ? "" : r.css;
  5003. if (e.styleSheet) e.styleSheet.cssText = k(t, a); else {
  5004. var i = document.createTextNode(a), o = e.childNodes;
  5005. o[t] && e.removeChild(o[t]), o.length ? e.insertBefore(i, o[t]) : e.appendChild(i)
  5006. }
  5007. }
  5008. }, function (e, t) {
  5009. e.exports = function (e) {
  5010. var t = "undefined" != typeof window && window.location;
  5011. if (!t) throw new Error("fixUrls requires window.location");
  5012. if (!e || "string" != typeof e) return e;
  5013. var n = t.protocol + "//" + t.host, r = n + t.pathname.replace(/\/[^\/]*$/, "/");
  5014. return e.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi, function (e, t) {
  5015. var a, i = t.trim().replace(/^"(.*)"$/, function (e, t) {
  5016. return t
  5017. }).replace(/^'(.*)'$/, function (e, t) {
  5018. return t
  5019. });
  5020. return /^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(i) ? e : (a = 0 === i.indexOf("//") ? i : 0 === i.indexOf("/") ? n + i : r + i.replace(/^\.\//, ""), "url(" + JSON.stringify(a) + ")")
  5021. })
  5022. }
  5023. }])
  5024. }, "object" == o(t) && "object" == o(e) ? e.exports = i() : (r = [], void 0 === (a = "function" == typeof(n = i) ? n.apply(t, r) : n) || (e.exports = a))
  5025. }).call(this, n(90)(e))
  5026. }, function (e, t, n) {
  5027. "use strict";
  5028. e.exports = function (e) {
  5029. return e.webpackPolyfill || (e.deprecate = function () {
  5030. }, e.paths = [], e.children || (e.children = []), Object.defineProperty(e, "loaded", {
  5031. enumerable: !0,
  5032. get: function () {
  5033. return e.l
  5034. }
  5035. }), Object.defineProperty(e, "id", {
  5036. enumerable: !0, get: function () {
  5037. return e.i
  5038. }
  5039. }), e.webpackPolyfill = 1), e
  5040. }
  5041. }, function (e, t, n) {
  5042. "use strict";
  5043. n.r(t), t.default = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 40" width="40" height="40">\n <path fill="#f85959" transform="scale(0.8 0.8)" d="M36.5,18.73a1.19,1.19,0,0,0,1-1.14V16.33a1.2,1.2,0,0,0-1-1.13l-.61-.08a1.75,1.75,0,0,1-1.3-.86l-.21-.36-.2-.36A1.72,1.72,0,0,1,34,12l.23-.58a1.18,1.18,0,0,0-.5-1.42l-1.1-.62a1.18,1.18,0,0,0-1.47.3l-.39.51a1.82,1.82,0,0,1-1.41.72c-.44,0-1.88-.27-2.22-.7l-.39-.49a1.18,1.18,0,0,0-1.48-.28l-1.09.64a1.19,1.19,0,0,0-.47,1.43l.25.59a1.87,1.87,0,0,1-.08,1.58c-.26.37-1.17,1.5-1.71,1.58l-.63.09a1.19,1.19,0,0,0-1,1.14l0,1.27a1.17,1.17,0,0,0,1,1.12l.61.08a1.74,1.74,0,0,1,1.3.87l.21.36.2.35A1.69,1.69,0,0,1,24,22.08l-.23.59a1.19,1.19,0,0,0,.5,1.42l1.1.62a1.19,1.19,0,0,0,1.48-.31l.38-.5a1.83,1.83,0,0,1,1.41-.72c.44,0,1.88.25,2.22.69l.39.49a1.18,1.18,0,0,0,1.48.28L33.86,24a1.19,1.19,0,0,0,.47-1.43L34.09,22a1.84,1.84,0,0,1,.07-1.58c.26-.37,1.17-1.5,1.72-1.58ZM31,18.94a2.76,2.76,0,0,1-4.65-1.2A2.71,2.71,0,0,1,27,15.13a2.76,2.76,0,0,1,4.64,1.2A2.7,2.7,0,0,1,31,18.94Z"/>\n <path fill="#f85959" transform="scale(0.8 0.8)" d="M32,0H3.59A3.59,3.59,0,0,0,0,3.59v17A3.59,3.59,0,0,0,3.59,24.2H19.72a12.59,12.59,0,0,1-.81-1.2A11.73,11.73,0,0,1,35.54,7.28V3.59A3.59,3.59,0,0,0,32,0ZM13,14.18H4.29a1.52,1.52,0,0,1,0-3H13a1.52,1.52,0,0,1,0,3ZM16.45,8H4.29a1.51,1.51,0,0,1,0-3H16.45a1.51,1.51,0,1,1,0,3Z"/>\n</svg>\n'
  5044. }, function (e, t, n) {
  5045. "use strict";
  5046. var r, a = n(0), i = (r = a) && r.__esModule ? r : {default: r};
  5047. i.default.install("s_pip", function () {
  5048. var e = this, t = i.default.util;
  5049. if (e.config.pip) {
  5050. var n = e.lang.PIP,
  5051. r = t.createDom("xg-pip", '<p class="name"><span>' + n + "</span></p>", {tabindex: 9}, "xgplayer-pip");
  5052. e.once("ready", function () {
  5053. e.controls.appendChild(r)
  5054. }), ["click", "touchend"].forEach(function (t) {
  5055. r.addEventListener(t, function (t) {
  5056. t.preventDefault(), t.stopPropagation(), e.emit("pipBtnClick")
  5057. })
  5058. })
  5059. }
  5060. })
  5061. }, function (e, t, n) {
  5062. "use strict";
  5063. var r = i(n(0)), a = i(n(94));
  5064. function i(e) {
  5065. return e && e.__esModule ? e : {default: e}
  5066. }
  5067. r.default.install("s_playNext", function () {
  5068. var e = this, t = r.default.util, n = e.config.playNext;
  5069. if (n && n.urlList) {
  5070. var i = t.createDom("xg-playnext", '<xg-icon class="xgplayer-icon">' + a.default + "</xg-icon>", {}, "xgplayer-playnext"),
  5071. o = e.lang.PLAYNEXT_TIPS,
  5072. l = t.createDom("xg-tips", '<span class="xgplayer-tip-playnext">' + o + "</span>", {}, "xgplayer-tips");
  5073. i.appendChild(l), e.once("ready", function () {
  5074. e.controls.appendChild(i)
  5075. }), ["click", "touchend"].forEach(function (t) {
  5076. i.addEventListener(t, function (t) {
  5077. t.preventDefault(), t.stopPropagation(), e.emit("playNextBtnClick")
  5078. })
  5079. })
  5080. }
  5081. })
  5082. }, function (e, t, n) {
  5083. "use strict";
  5084. n.r(t), t.default = '<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0 0 40 40">\n <path transform="scale(0.038 0.028)" d="M800 380v768h-128v-352l-320 320v-704l320 320v-352z"></path>\n</svg>\n'
  5085. }, function (e, t, n) {
  5086. "use strict";
  5087. var r = i(n(0)), a = i(n(96));
  5088. function i(e) {
  5089. return e && e.__esModule ? e : {default: e}
  5090. }
  5091. r.default.install("s_rotate", function () {
  5092. var e = this, t = r.default.util;
  5093. if (e.config.rotate) {
  5094. var n = t.createDom("xg-rotate", '<xg-icon class="xgplayer-icon">' + a.default + "</xg-icon>", {}, "xgplayer-rotate"),
  5095. i = e.lang.ROTATE_TIPS,
  5096. o = t.createDom("xg-tips", '<span class="xgplayer-tip-rotate">' + i + "</span>", {}, "xgplayer-tips");
  5097. n.appendChild(o), e.once("ready", function () {
  5098. e.controls.appendChild(n)
  5099. }), ["click", "touchend"].forEach(function (t) {
  5100. n.addEventListener(t, function (t) {
  5101. t.preventDefault(), t.stopPropagation(), e.emit("rotateBtnClick")
  5102. })
  5103. })
  5104. }
  5105. })
  5106. }, function (e, t, n) {
  5107. "use strict";
  5108. n.r(t), t.default = '<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 40 40" fill="none">\n <g clip-path="url(#clip0)">\n <path transform="scale(1.5 1.5)" d="M11.6665 9.16663H4.1665C2.78579 9.16663 1.6665 10.2859 1.6665 11.6666V15.8333C1.6665 17.214 2.78579 18.3333 4.1665 18.3333H11.6665C13.0472 18.3333 14.1665 17.214 14.1665 15.8333V11.6666C14.1665 10.2859 13.0472 9.16663 11.6665 9.16663Z" fill="white"/>\n <path transform="scale(1.5 1.5)" fill-rule="evenodd" clip-rule="evenodd" d="M3.88148 4.06298C3.75371 4.21005 3.67667 4.40231 3.67749 4.61242C3.67847 4.87253 3.79852 5.10435 3.98581 5.25646L6.99111 8.05895C7.32771 8.37283 7.85502 8.35443 8.16891 8.01782C8.48279 7.68122 8.46437 7.15391 8.12778 6.84003L6.62061 5.43457L9.8198 5.4224C9.82848 5.42239 9.8372 5.42221 9.84591 5.4219C10.9714 5.38233 12.0885 5.6285 13.0931 6.13744C14.0976 6.64635 14.957 7.40148 15.5908 8.33234C16.2246 9.2632 16.6122 10.3394 16.7177 11.4606C16.823 12.5819 16.6427 13.7115 16.1934 14.7442C16.0098 15.1661 16.203 15.6571 16.6251 15.8408C17.0471 16.0243 17.5381 15.8311 17.7216 15.4091C18.2833 14.1183 18.5087 12.7063 18.3771 11.3047C18.2453 9.90318 17.7607 8.55792 16.9684 7.39433C16.1761 6.23073 15.1021 5.28683 13.8463 4.65065C12.5946 4.01651 11.203 3.70872 9.80072 3.75583L6.43415 3.76862L7.96326 2.12885C8.27715 1.79225 8.25872 1.26494 7.92213 0.951061C7.58553 0.63718 7.05822 0.655585 6.74433 0.99219L3.90268 4.0395C3.89545 4.04724 3.88841 4.05509 3.88154 4.06303L3.88148 4.06298Z" fill="white"/>\n </g>\n <defs>\n <clipPath id="clip0">\n <rect width="40" height="40" fill="white"/>\n </clipPath>\n </defs>\n</svg>\n'
  5109. }, function (e, t, n) {
  5110. "use strict";
  5111. var r, a = n(0), i = (r = a) && r.__esModule ? r : {default: r};
  5112. i.default.install("s_screenShot", function () {
  5113. var e = this, t = i.default.util;
  5114. if (e.config.screenShot) {
  5115. var n = e.lang.SCREENSHOT,
  5116. r = t.createDom("xg-screenshot", '<p class="name"><span>' + n + "</span></p>", {tabindex: 11}, "xgplayer-screenshot");
  5117. e.once("ready", function () {
  5118. e.controls.appendChild(r)
  5119. }), ["click", "touchend"].forEach(function (t) {
  5120. r.addEventListener(t, function (t) {
  5121. t.preventDefault(), t.stopPropagation(), e.emit("screenShotBtnClick")
  5122. })
  5123. })
  5124. }
  5125. })
  5126. }, function (e, t, n) {
  5127. "use strict";
  5128. var r, a = n(0), i = (r = a) && r.__esModule ? r : {default: r};
  5129. i.default.install("s_textTrack", function () {
  5130. if (!(navigator.userAgent.indexOf("Chrome") < 0)) {
  5131. var e = this, t = e.root, n = i.default.util,
  5132. r = (i.default.sniffer, e.controls, n.createDom("xg-texttrack", "", {tabindex: 7}, "xgplayer-texttrack")),
  5133. a = e.config.textTrack;
  5134. a && Array.isArray(a) && a.length > 1 && (n.addClass(e.root, "xgplayer-is-texttrack"), e.on("canplay", function () {
  5135. var i = ["<ul>"];
  5136. i.push("<li class=''}'>关闭</li>"), a.forEach(function (e) {
  5137. i.push("<li class='" + (e.default ? "selected" : "") + "'>" + e.label + "</li>")
  5138. });
  5139. var o = e.lang.TEXTTRACK;
  5140. i.push('</ul><p class="name"><em>' + o + "</em></p>");
  5141. var l = t.querySelector(".xgplayer-texttrack");
  5142. if (l) {
  5143. l.innerHTML = i.join("");
  5144. var s = l.querySelector(".name");
  5145. e.config.textTrackActive && "hover" !== e.config.textTrackActive || s.addEventListener("mouseenter", function (e) {
  5146. e.preventDefault(), e.stopPropagation(), n.addClass(t, "xgplayer-texttrack-active"), l.focus()
  5147. })
  5148. } else {
  5149. r.innerHTML = i.join("");
  5150. var u = r.querySelector(".name");
  5151. e.config.textTrackActive && "hover" !== e.config.textTrackActive || u.addEventListener("mouseenter", function (t) {
  5152. t.preventDefault(), t.stopPropagation(), n.addClass(e.root, "xgplayer-texttrack-active"), r.focus()
  5153. }), e.controls.appendChild(r)
  5154. }
  5155. })), ["touchend", "click"].forEach(function (t) {
  5156. r.addEventListener(t, function (t) {
  5157. t.preventDefault(), t.stopPropagation();
  5158. var i = t.target || t.srcElement;
  5159. if (i && "li" === i.tagName.toLocaleLowerCase()) {
  5160. Array.prototype.forEach.call(i.parentNode.childNodes, function (e) {
  5161. n.removeClass(e, "selected")
  5162. }), n.addClass(i, "selected");
  5163. var o = e.root.getElementsByTagName("Track");
  5164. "关闭" === i.innerHTML ? (o[0].track.mode = "hidden", n.removeClass(e.root, "xgplayer-texttrack-active")) : (n.hasClass(e.root, "xgplayer-texttrack-active") || n.addClass(e.root, "xgplayer-texttrack-active"), o[0].track.mode = "showing", a.some(function (e) {
  5165. if (e.label === i.innerHTML) return o[0].src = e.src, e.kind && (o[0].kind = e.kind), o[0].label = e.label, e.srclang && (o[0].srclang = e.srclang), !0
  5166. }), e.emit("textTrackChange", i.innerHTML))
  5167. } else "click" !== e.config.textTrackActive || !i || "p" !== i.tagName.toLocaleLowerCase() && "em" !== i.tagName.toLocaleLowerCase() || (n.addClass(e.root, "xgplayer-texttrack-active"), r.focus())
  5168. }, !1)
  5169. }), r.addEventListener("mouseleave", function (t) {
  5170. t.preventDefault(), t.stopPropagation(), n.removeClass(e.root, "xgplayer-texttrack-active")
  5171. })
  5172. }
  5173. })
  5174. }, function (e, t, n) {
  5175. "use strict";
  5176. var r, a = n(0), i = (r = a) && r.__esModule ? r : {default: r};
  5177. i.default.install("s_error", function () {
  5178. var e = this, t = e.root, n = i.default.util,
  5179. r = n.createDom("xg-error", '<em class="xgplayer-error-text">请<span class="xgplayer-error-refresh">刷新</span>试试</em>', {}, "xgplayer-error");
  5180. t.appendChild(r);
  5181. var a = r.querySelector(".xgplayer-error-text"), o = null;
  5182. function l() {
  5183. e.error ? a.innerHTML = e.error : e.config.lang && "zh-cn" === e.config.lang ? a.innerHTML = e.lang.ERROR + ',请<span class="xgplayer-error-refresh">刷新</span>试试' : a.innerHTML = e.lang.ERROR + ',please try to <span class="xgplayer-error-refresh">refresh</span>', n.addClass(e.root, "xgplayer-is-error"), (o = r.querySelector(".xgplayer-error-refresh")) && ["touchend", "click"].forEach(function (t) {
  5184. o.addEventListener(t, function (t) {
  5185. t.preventDefault(), t.stopPropagation();
  5186. var n = t.target || t.srcElement;
  5187. n && "span" === n.tagName.toLocaleLowerCase() && (e.controls.style.display = "flex", e.reload())
  5188. })
  5189. })
  5190. }
  5191. e.on("error", l), e.once("destroy", function t() {
  5192. e.off("error", l), e.off("destroy", t)
  5193. })
  5194. })
  5195. }]);
  5196. //# sourceMappingURL=index.js.map
  5197. exports('Player', Player);
  5198. });