@sebbo2002/node-pyatv 7.0.0 → 7.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "url": "http://github.com/sebbo2002/node-pyatv/issues"
6
6
  },
7
7
  "dependencies": {
8
- "semver": "^7.5.1"
8
+ "semver": "^7.5.3"
9
9
  },
10
10
  "description": "A lightweight wrapper around pyatv…",
11
11
  "devDependencies": {
@@ -13,26 +13,26 @@
13
13
  "@semantic-release/changelog": "^6.0.3",
14
14
  "@semantic-release/exec": "^6.0.3",
15
15
  "@semantic-release/git": "^10.0.1",
16
- "@semantic-release/npm": "^10.0.3",
16
+ "@semantic-release/npm": "^10.0.4",
17
17
  "@types/mocha": "^10.0.1",
18
- "@types/node": "^20.2.5",
18
+ "@types/node": "^20.3.2",
19
19
  "@types/semver": "^7.5.0",
20
- "@typescript-eslint/eslint-plugin": "^5.59.8",
21
- "@typescript-eslint/parser": "^5.59.8",
22
- "c8": "^7.14.0",
23
- "eslint": "^8.41.0",
24
- "eslint-plugin-jsonc": "^2.8.0",
20
+ "@typescript-eslint/eslint-plugin": "^5.60.1",
21
+ "@typescript-eslint/parser": "^5.60.1",
22
+ "c8": "^8.0.0",
23
+ "eslint": "^8.43.0",
24
+ "eslint-plugin-jsonc": "^2.9.0",
25
25
  "esm": "^3.2.25",
26
26
  "license-checker": "^25.0.1",
27
27
  "mocha": "^10.2.0",
28
28
  "mochawesome": "^7.1.3",
29
- "semantic-release": "^21.0.2",
29
+ "semantic-release": "^21.0.7",
30
30
  "semantic-release-license": "^1.0.3",
31
31
  "source-map-support": "^0.5.21",
32
32
  "ts-node": "^10.9.1",
33
- "tsup": "^6.7.0",
34
- "typedoc": "^0.24.7",
35
- "typescript": "^5.0.4"
33
+ "tsup": "^7.1.0",
34
+ "typedoc": "^0.24.8",
35
+ "typescript": "^5.1.5"
36
36
  },
37
37
  "engines": {
38
38
  "node": "^16.0.0 || >=18.0.0"
@@ -68,5 +68,5 @@
68
68
  "test": "mocha"
69
69
  },
70
70
  "type": "module",
71
- "version": "7.0.0"
71
+ "version": "7.0.1"
72
72
  }
@@ -1,7 +0,0 @@
1
- var o=(i,e,t)=>new Promise((s,n)=>{var a=c=>{try{d(t.next(c))}catch(u){n(u)}},r=c=>{try{d(t.throw(c))}catch(u){n(u)}},d=c=>c.done?s(c.value):Promise.resolve(c.value).then(a,r);d((t=t.apply(i,e)).next())});var A=(t=>(t.atvremote="atvremote",t.atvscript="atvscript",t))(A||{}),I=(n=>(n.dmap="dmap",n.mrp="mrp",n.airplay="airplay",n.mdns="mdns",n))(I||{}),x=(n=>(n.music="music",n.tv="tv",n.video="video",n.unknown="unknown",n))(x||{}),E=(r=>(r.idle="idle",r.loading="loading",r.paused="paused",r.playing="playing",r.seeking="seeking",r.stopped="stopped",r))(E||{}),_=(s=>(s.all="all",s.track="track",s.off="off",s))(_||{}),D=(s=>(s.albums="albums",s.songs="songs",s.off="off",s))(D||{}),$=(t=>(t.on="on",t.off="off",t))($||{}),L=(t=>(t.focued="focused",t.unfocused="unfocused",t))(L||{}),U=(p=>(p.down="down",p.home="home",p.homeHold="homeHold",p.left="left",p.menu="menu",p.next="next",p.pause="pause",p.play="play",p.playPause="playPause",p.previous="previous",p.right="right",p.select="select",p.skipBackward="skipBackward",p.skipForward="skipForward",p.stop="stop",p.suspend="suspend",p.topMenu="topMenu",p.up="up",p.volumeDown="volumeDown",p.volumeUp="volumeUp",p.wakeup="wakeup",p.turnOff="turnOff",p.turnOn="turnOn",p))(U||{}),j=(p=>(p.down="down",p.home="home",p.homeHold="home_hold",p.left="left",p.menu="menu",p.next="next",p.pause="pause",p.play="play",p.playPause="play_pause",p.previous="previous",p.right="right",p.select="select",p.skipBackward="skip_backward",p.skipForward="skip_forward",p.stop="stop",p.suspend="suspend",p.topMenu="top_menu",p.up="up",p.volumeDown="volume_down",p.volumeUp="volume_up",p.wakeup="wakeup",p.turnOff="turn_off",p.turnOn="turn_on",p))(j||{}),F=(n=>(n[n.stopped=0]="stopped",n[n.starting=1]="starting",n[n.started=2]="started",n[n.stopping=3]="stopping",n))(F||{});var V=class{constructor(e){this.values=Object.assign({},e,{key:e.key})}get key(){return this.values.key}get oldValue(){return this.values.old}get newValue(){return this.values.new}get value(){return this.values.new}get device(){return this.values.device}};import{EventEmitter as B}from"events";import{spawn as J}from"child_process";var C=[];function y(){let i="?";for(let e=0;e<1e3;e+=1)if(i=Math.round(Math.random()*(e+6)*36).toString(36).toUpperCase(),!C.includes(i)){C.push(i);break}return i}function v(i){i&&C.includes(i)&&C.splice(C.indexOf(i),1)}function l(i,e,t){if(t.debug){let s=typeof t.debug=="function"?t.debug:console.log,n=!process.env.NO_COLOR&&!t.noColors,a=[n?"\x1B[0m":"",n?"\x1B[90m":"","[node-pyatv][",n?"\x1B[37m":"",i,n?"\x1B[90m":"","] ",n?"\x1B[0m":"",e];s.apply(null,[a.join("")])}}function M(i,e){return i==="atvremote"&&typeof e.atvremotePath=="string"?e.atvremotePath:i==="atvscript"&&typeof e.atvscriptPath=="string"?e.atvscriptPath:i}function G(i,e,t,s){let n=M(e,s),a=typeof s.spawn=="function"?s.spawn:J;l(i,`${n} ${t.join(" ")}`,s);let r=a(n,t,{env:process.env}),d=h=>l(i,`stdout: ${String(h).trim()}`,s),c=h=>l(i,`stderr: ${String(h).trim()}`,s),u=h=>l(i,`error: ${String(h).trim()}`,s),m=h=>{l(i,`${n} exited with code: ${h}`,s),r.stdout&&r.stdout.off("data",d),r.stderr&&r.stderr.off("data",c),r.off("error",u),r.off("close",m)};return r.stdout&&r.stdout.on("data",d),r.stderr&&r.stderr.on("data",c),r.on("error",u),r.on("close",m),r}function T(i,e,t,s){return o(this,null,function*(){let n={stdout:"",stderr:"",code:0};if(yield new Promise((a,r)=>{let d=G(i,e,t,s),c=g=>n.stdout+=String(g).trim(),u=g=>n.stderr+=String(g).trim(),m=g=>r(g instanceof Error?g:new Error(String(g))),h=g=>{n.code=g,d.stdout&&d.stdout.off("data",c),d.stderr&&d.stderr.off("data",u),d.off("error",m),d.off("close",h),a(void 0)};d.stdout&&d.stdout.on("data",c),d.stderr&&d.stderr.on("data",u),d.on("error",m),d.on("close",h)}),n.stderr.length>0){let a=`Unable to execute request ${i}: ${n.stderr}`;throw l(i,a,s),new Error(a)}if(e==="atvscript")try{return JSON.parse(n.stdout)}catch(a){let r=`Unable to parse result ${i} json: ${a}`;throw l(i,r,s),new Error(r)}return n.stdout})}function P(i={}){let e=[];return i.hosts?e.push("-s",i.hosts.join(",")):i.host&&e.push("-s",i.host),i.id&&e.push("-i",i.id),i.protocol&&e.push("--protocol",i.protocol),i.dmapCredentials&&e.push("--dmap-credentials",i.dmapCredentials),i.mrpCredentials&&e.push("--mrp-credentials",i.mrpCredentials),i.airplayCredentials&&e.push("--airplay-credentials",i.airplayCredentials),i.companionCredentials&&e.push("--companion-credentials",i.companionCredentials),i.raopCredentials&&e.push("--raop-credentials",i.raopCredentials),e}function S(i,e,t,s,n){if(typeof i[t]=="string"){e[s]=i[t];return}n(`No ${s} value found in input (${JSON.stringify(i)})`)}function b(i,e,t){let s=a=>l(e,a,t),n={dateTime:null,hash:null,mediaType:null,deviceState:null,title:null,artist:null,album:null,genre:null,totalTime:null,position:null,shuffle:null,repeat:null,app:null,appId:null,powerState:null,volume:null,focusState:null};if(!i||typeof i!="object")return n;if(i.exception){let a="Got pyatv Error: "+i.exception;throw i.stacktrace&&(a+=`
2
-
3
- pyatv Stacktrace:
4
- `+i.stacktrace),new Error(a)}if(typeof i.datetime=="string"){let a=new Date(i.datetime);isNaN(a.getTime())?s(`Invalid datetime value ${i.datetime}, ignore attribute`):n.dateTime=a}else s(`No datetime value found in input (${JSON.stringify(i)})`);return S(i,n,"hash","hash",s),typeof i.media_type=="string"?Object.keys(x).map(r=>String(r)).includes(i.media_type)?n.mediaType=x[i.media_type]:s(`Unsupported mediaType value ${i.media_type}, ignore attribute`):s(`No mediaType value found in input (${JSON.stringify(i)})`),typeof i.device_state=="string"?Object.keys(E).map(r=>String(r)).includes(i.device_state)?n.deviceState=E[i.device_state]:s(`Unsupported deviceState value ${i.device_state}, ignore attribute`):s(`No deviceState value found in input (${JSON.stringify(i)})`),S(i,n,"title","title",s),S(i,n,"artist","artist",s),S(i,n,"album","album",s),S(i,n,"genre","genre",s),typeof i.total_time=="number"?n.totalTime=i.total_time:s(`No totalTime value found in input (${JSON.stringify(i)})`),typeof i.position=="number"?n.position=i.position:s(`No position value found in input (${JSON.stringify(i)})`),typeof i.shuffle=="string"?Object.keys(D).map(r=>String(r)).includes(i.shuffle)?n.shuffle=D[i.shuffle]:s(`Unsupported shuffle value ${i.shuffle}, ignore attribute`):s(`No shuffle value found in input (${JSON.stringify(i)})`),typeof i.repeat=="string"?Object.keys(_).map(r=>String(r)).includes(i.repeat)?n.repeat=_[i.repeat]:s(`Unsupported repeat value ${i.repeat}, ignore attribute`):s(`No repeat value found in input (${JSON.stringify(i)})`),S(i,n,"app","app",s),S(i,n,"app_id","appId",s),typeof i.power_state=="string"?Object.keys($).map(r=>String(r)).includes(i.power_state)?n.powerState=$[i.power_state]:s(`Unsupported powerState value ${i.power_state}, ignore attribute`):s(`No powerState value found in input (${JSON.stringify(i)})`),typeof i.volume=="number"&&(n.volume=i.volume),typeof i.focus_state=="string"?Object.keys(L).map(r=>String(r)).includes(i.focus_state)?n.focusState=L[i.power_state]:s(`Unsupported focusState value ${i.focus_state}, ignore attribute`):s(`No focusState value found in input (${JSON.stringify(i)})`),n}var O=class extends B{constructor(t,s,n){super();this.state=t,this.device=s,this.options=Object.assign({},n),this.listenerState=0}applyStateAndEmitEvents(t){Object.keys(this.state).forEach(s=>{let n=this.state[s],a=t[s];if(n===void 0||a===void 0||n===a)return;let r=new V({key:s,old:n,new:a,device:this.device});this.state[s]=t[s];try{this.emit("update:"+s,r),this.emit("update",r)}catch(d){this.emit("error",d)}})}parsePushUpdate(t,s){let n;try{n=JSON.parse(s)}catch(a){let r=`Unable to parse stdout json: ${a}`;l(t,r,this.options),this.emit("error",new Error(r));return}this.applyPushUpdate(n,t),this.listenerState===1&&(this.listenerState=2,this.checkListener())}applyPushUpdate(t,s){try{let n=b(t,s,this.options);this.applyStateAndEmitEvents(n)}catch(n){this.emit("error",n)}}checkListener(){if(this.listenerState===0&&this.listenerCount()===0&&this.timeout)clearTimeout(this.timeout),this.timeout=void 0;else if(this.listenerState===0&&this.listenerCount()>0){let t=y();l(t,`Start listeing to events from device ${this.options.name}`,this.options),this.startListening(t),v(t)}else if([1,2].includes(this.listenerState)&&this.listenerCount()===0){let t=y();l(t,`Stop listening to events from device ${this.options.name}`,this.options),this.stopListening(t).catch(s=>l(t,`Unable to stop listeing: ${s}`,this.options)).finally(()=>v(t))}}startListening(t){if(this.listenerState!==0)return;this.listenerState=1;let s=new Date().getTime(),n=P(this.options);if(this.pyatv=G(t,"atvscript",[...n,"push_updates"],this.options),!this.pyatv)throw new Error("Unable to start listener: Unable to start atvscript");let a=u=>{l(t,`Got error from child process: ${u}`,this.options),this.emit("error",u)},r=u=>{let m=new Error(`Got stderr output from pyatv: ${u}`);l(t,u.toString(),this.options),this.emit("error",m)},d=u=>{String(u).split(`
5
- `).map(m=>m.trim()).filter(Boolean).forEach(m=>this.parsePushUpdate(t,m))},c=u=>{this.pyatv!==void 0&&(this.listenerState=0,l(t,`Listening with atvscript exited with code ${u}`,this.options),this.timeout!==void 0&&(clearTimeout(this.timeout),this.timeout=void 0),this.pyatv.stdout&&this.pyatv.stdout.off("data",d),this.pyatv.stderr&&this.pyatv.stderr.off("data",r),this.pyatv.off("error",a),this.pyatv.off("close",c),this.listenerCount()>0&&new Date().getTime()-s<3e4?(l(t,`Wait 15s and restart listeing to events from device ${this.options.name}`,this.options),this.timeout=setTimeout(()=>{this.checkListener()},15e3)):this.listenerCount()>0&&(l(t,`Restart listeing to events from device ${this.options.name}`,this.options),this.checkListener()),v(t))};this.pyatv.on("error",a),this.pyatv.on("close",c),this.pyatv.stdout&&this.pyatv.stdout.on("data",d),this.pyatv.stderr&&this.pyatv.stderr.on("data",r)}stopListening(t){return o(this,null,function*(){if(!(this.listenerState!==1&&this.listenerState!==2)){if(this.listenerState=3,this.pyatv===void 0)throw new Error("Unable to stop listening due to internal error: state is stopping, but there's no child process. This should never happen, please report this.");this.pyatv.stdin&&(l(t,"Pressing enter to close atvscript\u2026",this.options),this.pyatv.stdin.write(`
6
- `),yield new Promise(s=>this.timeout=setTimeout(s,250))),this.listenerState===3&&this.pyatv&&this.pyatv.kill(),this.listenerState=0}})}addListener(t,s){return super.addListener(t,s),this.checkListener(),this}on(t,s){return super.on(t,s),this.checkListener(),this}once(t,s){return super.once(t,n=>{s(n),setTimeout(()=>this.checkListener(),0)}),this.checkListener(),this}prependListener(t,s){return super.prependListener(t,s),this.checkListener(),this}off(t,s){return super.off(t,s),this.checkListener(),this}removeAllListeners(t){return super.removeAllListeners(t),this.checkListener(),this}removeListener(t,s){return super.removeListener(t,s),this.checkListener(),this}listenerCount(t){return t!==void 0?super.listenerCount(t):this.eventNames().map(s=>this.listenerCount(s)).reduce((s,n)=>s+n,0)}};var k=class{constructor(e){this.options=Object.assign({},e),this.state=b({},"",{}),this.events=new O(this.state,this,this.options)}get name(){return this.options.name}get host(){return this.options.host}get id(){return this.options.id}get protocol(){return this.options.protocol}get model(){return this.options.model}get modelName(){return this.options.modelName}get os(){return this.options.os}get version(){return this.options.version}get services(){return this.options.services}get debug(){return this.options.debug}set debug(e){typeof e=="function"?this.options.debug=e:this.options.debug=!!e||void 0}toJSON(){return{name:this.name,host:this.host,id:this.id,protocol:this.protocol}}toString(){return`NodePyATVDevice(${this.name}, ${this.host})`}getState(){return o(this,arguments,function*(e={}){var s;if((s=this.state)!=null&&s.dateTime&&new Date().getTime()-this.state.dateTime.getTime()<(e.maxAge||5e3)){let n=null;return this.state.position&&this.state.dateTime&&(n=Math.round(this.state.position+(new Date().getTime()-this.state.dateTime.getTime())/1e3)),Object.assign({},this.state,{position:n})}let t=y();try{let n=P(this.options),a=yield T(t,"atvscript",[...n,"playing"],this.options),r=b(a,t,this.options);return this.applyState(r),r}finally{v(t)}})}clearState(){this.applyState(b({},"",{}))}applyState(e){this.events.applyStateAndEmitEvents(e)}getDateTime(){return o(this,arguments,function*(e={}){return(yield this.getState(e)).dateTime})}getHash(){return o(this,arguments,function*(e={}){return(yield this.getState(e)).hash})}getMediaType(){return o(this,arguments,function*(e={}){return(yield this.getState(e)).mediaType})}getDeviceState(){return o(this,arguments,function*(e={}){return(yield this.getState(e)).deviceState})}getTitle(){return o(this,arguments,function*(e={}){return(yield this.getState(e)).title})}getArtist(){return o(this,arguments,function*(e={}){return(yield this.getState(e)).artist})}getAlbum(){return o(this,arguments,function*(e={}){return(yield this.getState(e)).album})}getGenre(){return o(this,arguments,function*(e={}){return(yield this.getState(e)).genre})}getTotalTime(){return o(this,arguments,function*(e={}){return(yield this.getState(e)).totalTime})}getPosition(){return o(this,arguments,function*(e={}){return(yield this.getState(e)).position})}getShuffle(){return o(this,arguments,function*(e={}){return(yield this.getState(e)).shuffle})}getRepeat(){return o(this,arguments,function*(e={}){return(yield this.getState(e)).repeat})}getApp(){return o(this,arguments,function*(e={}){return(yield this.getState(e)).app})}getAppId(){return o(this,arguments,function*(e={}){return(yield this.getState(e)).appId})}listApps(){return o(this,null,function*(){let e=y(),t=P(this.options),s=yield T(e,"atvremote",[...t,"app_list"],this.options);if(typeof s!="string"||!s.startsWith("App: "))throw new Error("Unexpected atvremote response: "+s);v(e);let n=/(.+) \(([^\)]+)\)$/i;return s.substring(5).split(", App: ").map(r=>{let d=r.match(n);if(d!==null)return{id:d[2],name:d[1],launch:()=>this.launchApp(d[2])}}).filter(Boolean)})}_pressKey(e,t){return o(this,null,function*(){let s=y(),n=P(this.options),a=yield T(s,t,[...n,e],this.options);if(t==="atvscript"&&(typeof a!="object"||a.result!=="success"))throw new Error(`Unable to parse pyatv response: ${JSON.stringify(a,null," ")}`);v(s)})}pressKey(e){return o(this,null,function*(){let t=Object.entries(j).find(([a])=>e===a);if(!t)throw new Error(`Unsupported key value ${e}!`);let s=t[1],n=["turnOn","turnOff"].includes(e)?"atvremote":"atvscript";yield this._pressKey(s,n)})}down(){return o(this,null,function*(){yield this._pressKey("down","atvscript")})}home(){return o(this,null,function*(){yield this._pressKey("home","atvscript")})}homeHold(){return o(this,null,function*(){yield this._pressKey("home_hold","atvscript")})}left(){return o(this,null,function*(){yield this._pressKey("left","atvscript")})}menu(){return o(this,null,function*(){yield this._pressKey("menu","atvscript")})}next(){return o(this,null,function*(){yield this._pressKey("next","atvscript")})}pause(){return o(this,null,function*(){yield this._pressKey("pause","atvscript")})}play(){return o(this,null,function*(){yield this._pressKey("play","atvscript")})}playPause(){return o(this,null,function*(){yield this._pressKey("play_pause","atvscript")})}previous(){return o(this,null,function*(){yield this._pressKey("previous","atvscript")})}right(){return o(this,null,function*(){yield this._pressKey("right","atvscript")})}select(){return o(this,null,function*(){yield this._pressKey("select","atvscript")})}skipBackward(){return o(this,null,function*(){yield this._pressKey("skip_backward","atvscript")})}skipForward(){return o(this,null,function*(){yield this._pressKey("skip_forward","atvscript")})}stop(){return o(this,null,function*(){yield this._pressKey("stop","atvscript")})}suspend(){return o(this,null,function*(){yield this._pressKey("suspend","atvscript")})}topMenu(){return o(this,null,function*(){yield this._pressKey("top_menu","atvscript")})}up(){return o(this,null,function*(){yield this._pressKey("up","atvscript")})}volumeDown(){return o(this,null,function*(){yield this._pressKey("volume_down","atvscript")})}volumeUp(){return o(this,null,function*(){yield this._pressKey("volume_up","atvscript")})}wakeup(){return o(this,null,function*(){yield this._pressKey("wakeup","atvscript")})}turnOff(){return o(this,null,function*(){yield this._pressKey("turn_off","atvremote")})}turnOn(){return o(this,null,function*(){yield this._pressKey("turn_on","atvremote")})}launchApp(e){return o(this,null,function*(){yield this._pressKey("launch_app="+e,"atvremote")})}addListener(e,t){return this.events.addListener(e,t),this}emit(e,t){return this.events.emit(e,t)}eventNames(){return this.events.eventNames()}getMaxListeners(){return this.events.getMaxListeners()}listenerCount(e){return this.events.listenerCount(e)}listeners(e){return this.events.listeners(e)}off(e,t){return this.events.off(e,t),this}on(e,t){return this.events.on(e,t),this}once(e,t){return this.events.once(e,t),this}prependListener(e,t){return this.events.prependListener(e,t),this}prependOnceListener(e,t){return this.events.prependOnceListener(e,t),this}rawListeners(e){return this.events.rawListeners(e)}removeAllListeners(e){return this.events.removeAllListeners(e),this}removeListener(e,t){return this.events.removeListener(e,t),this}setMaxListeners(e){return this.events.setMaxListeners(e),this}};import R from"semver";import{join as H,dirname as W}from"path";import{fileURLToPath as z}from"url";import{promises as Q}from"fs";var X={};var f=class{constructor(e={}){this.options={};this.options=Object.assign({},e)}static check(){return o(this,arguments,function*(e={}){let t=yield this.version(e);if(!t.pyatv)throw new Error("Unable to find pyatv. Is it installed?");if(R.lt(t.pyatv,"0.6.0"))throw new Error("Found pyatv, but unforunately it's too old. Please update pyatv.");try{yield this.find(e)}catch(s){throw new Error(`Unable to scan for devices: ${String(s).replace("Error: ","")}`)}})}static version(){return o(this,arguments,function*(e={}){let t=y(),s=null,n=null;try{s=yield T(t,"atvremote",["--version"],e)}catch(a){l(t,`Unable to get pyatv version due to ${a}`,e)}s&&s.substr(0,10)==="atvremote "&&(s=s.substr(10)),R.valid(s)||(l(t,`String "${s}" is not a valid pyatv version, set it to null`,e),s=null);try{let a=H(W(z(X.url)),"..","..","package.json"),r=JSON.parse(yield Q.readFile(a,"utf8"));n=(r==null?void 0:r.version)||null}catch(a){l(t,`Unable to get module version due to ${a}`,e)}return n&&!R.valid(n)&&(l(t,`String "${n}" is not a valid module version, set it to null`,e),n=null),v(t),{pyatv:s,module:n}})}static find(){return o(this,arguments,function*(e={}){let t=y(),s=P(e),n=yield T(t,"atvscript",[...s,"scan"],e);if(typeof n!="object"||n.result!=="success"||!Array.isArray(n.devices))throw new Error(`Unable to parse pyatv response: ${JSON.stringify(n,null," ")}`);let a=n.devices.map(r=>{var d,c,u,m;return this.device(Object.assign({},e,{host:r.address,id:r.identifier,name:r.name,model:(d=r.device_info)==null?void 0:d.model,modelName:(c=r.device_info)==null?void 0:c.model_str,os:(u=r.device_info)==null?void 0:u.operating_system,version:(m=r.device_info)==null?void 0:m.version,services:r.services}))});return v(t),a})}static device(e){return new k(e)}check(){return o(this,arguments,function*(e={}){return f.check(Object.assign({},this.options,e))})}version(){return o(this,arguments,function*(e={}){return f.version(Object.assign({},this.options,e))})}find(){return o(this,arguments,function*(e={}){return f.find(Object.assign({},this.options,e))})}device(e){return f.device(Object.assign({},this.options,e))}};export{o as a,A as b,I as c,x as d,E as e,_ as f,D as g,$ as h,U as i,F as j,V as k,O as l,k as m,f as n};
7
- //# sourceMappingURL=chunk-JSK3CKPP.js.map