Switched from mouse event clientX and clientY to screenX and screenY (will it make any difference on high DPI screens? I don't know...)

This commit is contained in:
Jeff Parsons 2017-07-05 23:01:50 -07:00 committed by Jeff Parsons
commit e33adffbf4
11 changed files with 50 additions and 46 deletions

View file

@ -19,8 +19,8 @@ Microsoft Windows 1.01
----------------------
Microsoft Windows 1.01, the first public version of Windows, was released on November 20, 1985.
It is shown here running on an IBM PC XT (Model 5160) with an EGA Display. You can also run
[Windows 1.01 with a CGA Display](cga/).
It is shown here running on an IBM PC XT (Model 5160) with an EGA Display. You can also run Windows 1.01
with a [Debugger](debugger/) or a [CGA Display](cga/).
A demo of an earlier pre-release version, [Windows 1.0 ("Premiere Edition")](../1.00/), is also available.

View file

@ -24,7 +24,7 @@ Microsoft Windows 1.01 with CGA Display
[Microsoft Windows 1.01](/disks/pcx86/windows/1.01/), the first public version of Windows, was released on
November 20, 1985. It is shown here running on an IBM PC XT (Model 5160) with a CGA Display. You can also run
[Windows 1.01 with an EGA Display](/disks/pcx86/windows/1.01/).
Windows 1.01 with a [Debugger](debugger/), [Soft Keyboard](softkbd/), or [EGA Display](/disks/pcx86/windows/1.01/).
{% include machine.html id="ibm5160-cga-win101" %}
@ -40,4 +40,4 @@ NOTE: The Windows 1.01 mouse pointer can be controlled with your mouse, but only
within the "CGA Display" window. This is a restriction imposed by your web browser, not PCjs.
For more control over this machine, try the [Control Panel](debugger/) or [Soft Keyboard](softkbd/) configurations,
featuring the built-in PCjs Debugger, with save/restore enabled.
both of which feature the built-in PCjs Debugger, with save/restore enabled.

View file

@ -0,0 +1,16 @@
---
layout: page
title: Microsoft Windows 1.01 with Debugger
permalink: /disks/pcx86/windows/1.01/debugger/
machines:
- id: ibm5160-ega-win101
type: pcx86
state: /disks/pcx86/windows/1.01/state.json
config: /devices/pcx86/machine/5160/ega/640kb/debugger/machine.xml
drives: '[{name:"10Mb Hard Disk",type:3,path:"/disks/pcx86/fixed/10mb/PCDOS200-WIN101-EGA.json"}]'
---
Microsoft Windows 1.01 with Debugger
------------------------------------
{% include machine.html id="ibm5160-ega-win101" %}

View file

@ -623,8 +623,8 @@ function Wu(a){rb.call(this,"Mouse",a,16777216);if(this.P=a.serial)this.W="Seria
l.Xb=function(a,b){if(!b){if(!a||!this.restore)this.reset();else if(!this.restore(a))return!1;if(this.W&&!this.D){for(a=null;(a=bc(this.pa,this.W,a))&&(!a.Zi||!(this.D=a.Zi(this.P,this,this.tl))););if(this.D)for(this.B=[],a=0;a<this.C.length;a++)b=this.C[a],b.G=this,(b=b.D)&&this.B.push(b);else mb(this.id+": "+this.W+" "+this.P+" unavailable")}this.rc?Xu(this):Yu(this)}return!0};l.Wb=function(a){return a?this.save():!0};l.reset=function(){Zu(this)};
l.save=function(){var a=new cg(this),b=0,c=[];c[b++]=this.rc;c[b++]=this.F;c[b++]=this.G;c[b++]=this.I;c[b++]=this.J;c[b++]=this.K;c[b++]=this.L;c[b]=this.A;a.set(0,c);return a.data()};l.restore=function(a){return Zu(this,a[0])};function Zu(a,b){var c=0;b||(b=[!1,-1,-1,0,0,!1,!1,0]);var d=b[c++];a.rc=d;a.F=b[c++];a.G=b[c++];a.I=b[c++];a.J=b[c++];a.K=b[c++];a.L=b[c++];a.A=b[c];a.A&(Pu|Qu)&&(a.A=(a.A&Pu?1048576:0)|(a.A&Qu?16:0));return!0}l.Jf=function(a){this.M=a};
function Xu(a){if(!a.N)for(var b=0;b<a.B.length;b++)$u(a,a.B[b])&&(a.N=!0)}function Yu(a){if(a.N)for(var b=0;b<a.B.length;b++){var c=a.B[b];c&&(c.style.cursor="auto")}}function $u(a,b){return b?(b.addEventListener("mousemove",function(b){av(a,b)},!1),b.addEventListener("mousedown",function(b){av(a,b,!0)},!1),b.addEventListener("mouseup",function(b){av(a,b,!1)},!1),b.style.cursor="none",!0):!1}
function av(a,b,c){if(void 0!==c){var d;!(d=!1!==a.M)&&(d=a.C.length)&&(d=a.C[0],d=d.Fd?d.ne(!0):!1);d||(a.M=null);a.Wd(b.button,c)}else{if(0>a.F||0>a.G)a.F=b.clientX,a.G=b.clientY;a.M?(c=b.movementX||b.mozMovementX||b.webkitMovementX||0,d=b.movementY||b.mozMovementY||b.webkitMovementY||0):(c=b.clientX-a.F,d=b.clientY-a.G);a.F=b.clientX;a.G=b.clientY;a.uf(c,d,a.F,a.G)}}
l.Wd=function(a,b){if(this.rc&&this.H&&this.H.ba.jb){var c="mouse button"+a+" "+(b?"dn":"up");switch(a){case Ls:if(this.K!=b){this.K=b;bv(this,c);return}break;case cv:if(this.L!=b){this.L=b;bv(this,c);return}}Rb(this,c+": ignored")}};l.uf=function(a,b,c,d){this.rc&&this.H&&this.H.ba.jb&&(a||b)&&(this.I=a,this.J=b,bv(this,null,c,d))};
function av(a,b,c){if(void 0!==c){var d;!(d=!1!==a.M)&&(d=a.C.length)&&(d=a.C[0],d=d.Fd?d.ne(!0):!1);d||(a.M=null);a.Wd(b.button,c)}else{if(0>a.F||0>a.G)a.F=b.screenX,a.G=b.screenY;a.M?(c=b.movementX||b.mozMovementX||b.webkitMovementX||0,d=b.movementY||b.mozMovementY||b.webkitMovementY||0):(c=b.screenX-a.F,d=b.screenY-a.G);a.F=b.screenX;a.G=b.screenY;a.uf(c,d,a.F,a.G)}}
l.Wd=function(a,b){if(this.rc&&this.H&&this.H.ba.jb){var c="mouse button"+a+" "+(b?"dn":"up");switch(a){case Ls:if(this.K!=b){this.K=b;bv(this,c);return}break;case cv:if(this.L!=b){this.L=b;bv(this,c);return}}Rb(this,c+": ignored")}};l.uf=function(a,b,c,d){this.rc&&this.H&&this.H.ba.jb&&(a||b)&&(t(this,16777216)&&Rb(this,"moveMouse("+a+","+b+")"),this.I=a,this.J=b,bv(this,null,c,d))};
function bv(a,b,c,d){var e=64|(a.K?32:0)|(a.L?16:0)|(a.J&192)>>4|(a.I&192)>>6,f=a.I&63,g=a.J&63;t(a,8388608)&&Rb(a,(b?b+": ":"")+(void 0!==d?"mouse ("+c+","+d+"): ":"")+"serial packet ["+r(e)+","+r(f)+","+r(g)+"]",0,!0);a.D.Pf([e,f,g]);a.I=a.J=0}
l.tl=function(a){var b=1048592==(a&1048592);if(b){if(!this.rc){var c=!1;this.A&16||(this.reset(),Rb(this,"serial mouse reset"),c=!0);this.A&1048576||(Rb(this,"serial mouse ID requested"),c=!0);c&&(this.D.Pf([dv,dv]),Rb(this,"serial mouse ID sent"));Xu(this);this.rc=b}}else this.rc&&(Rb(this,"serial mouse inactive"),Yu(this),this.rc=b);this.A=a};var dv=77,Ls=0,cv=2;eb(function(){for(var a=Bb(document,"pcx86","mouse"),b=0;b<a.length;b++){var c=a[b],d=Cb(c),d=new Wu(d);Ab(d,c)}});
function ev(a,b,c){rb.call(this,"Disk",{id:a.ze+".disk"+q(++fv,4)},2097152);this.controller=a;this.Ca=a.Ca;this.O=a.O;this.pa=a.pa;this.ca=a.ca;this.B=b;this.ld=b.name;this.Qe=b.Qe;this.qg=this.D=!1;gv(this,c,b.rb,b.cb,b.Va,b.Na);this.I=[];this.L=[];this.F=null;this.N=0;this.M=!1;Ob(this)}ca(ev,rb);l=ev.prototype;l.uc=function(a,b,c,d){this.ca=d};l.Xb=function(a,b){b||!this.qg||this.D||(Ob(this,!1),this.load(this.ld,this.G,null,this.Kl,this));return!0};l.Kl=function(){Ob(this,!0)};

View file

@ -583,7 +583,7 @@ Ra(function(){for(var a=hb(document,"pcx86","serial"),b=0;b<a.length;b++){var c=
l.Pb=function(a,b){if(!b){if(!a||!this.restore)this.reset();else if(!this.restore(a))return!1;if(this.V&&!this.D){for(a=null;(a=Cb(this.oa,this.V,a))&&(!a.bi||!(this.D=a.bi(this.O,this,this.ik))););if(this.D)for(this.B=[],a=0;a<this.C.length;a++)b=this.C[a],b.K=this,(b=b.D)&&this.B.push(b);else r(this.id+": "+this.V+" "+this.O+" unavailable")}this.Ub?cs(this):ds(this)}return!0};l.Ob=function(a){return a?this.save():!0};l.reset=function(){es(this)};
l.save=function(){var a=new Ye(this),b=0,c=[];c[b++]=this.Ub;c[b++]=this.F;c[b++]=this.G;c[b++]=this.H;c[b++]=this.I;c[b++]=this.J;c[b++]=this.K;c[b]=this.A;a.set(0,c);return a.data()};l.restore=function(a){return es(this,a[0])};function es(a,b){var c=0;b||(b=[!1,-1,-1,0,0,!1,!1,0]);var d=b[c++];a.Ub=d;a.F=b[c++];a.G=b[c++];a.H=b[c++];a.I=b[c++];a.J=b[c++];a.K=b[c++];a.A=b[c];a.A&(Vr|Wr)&&(a.A=(a.A&Vr?1048576:0)|(a.A&Wr?16:0));return!0}l.$e=function(a){this.L=a};
function cs(a){if(!a.M)for(var b=0;b<a.B.length;b++)fs(a,a.B[b])&&(a.M=!0)}function ds(a){if(a.M)for(var b=0;b<a.B.length;b++){var c=a.B[b];c&&(c.style.cursor="auto")}}function fs(a,b){return b?(b.addEventListener("mousemove",function(b){gs(a,b)},!1),b.addEventListener("mousedown",function(b){gs(a,b,!0)},!1),b.addEventListener("mouseup",function(b){gs(a,b,!1)},!1),b.style.cursor="none",!0):!1}
function gs(a,b,c){if(void 0!==c){var d;!(d=!1!==a.L)&&(d=a.C.length)&&(d=a.C[0],d=d.md?d.Jd(!0):!1);d||(a.L=null);a.je(b.button,c)}else{if(0>a.F||0>a.G)a.F=b.clientX,a.G=b.clientY;a.L?(c=b.movementX||b.mozMovementX||b.webkitMovementX||0,d=b.movementY||b.mozMovementY||b.webkitMovementY||0):(c=b.clientX-a.F,d=b.clientY-a.G);a.F=b.clientX;a.G=b.clientY;a.vg(c,d,a.F,a.G)}}
function gs(a,b,c){if(void 0!==c){var d;!(d=!1!==a.L)&&(d=a.C.length)&&(d=a.C[0],d=d.md?d.Jd(!0):!1);d||(a.L=null);a.je(b.button,c)}else{if(0>a.F||0>a.G)a.F=b.screenX,a.G=b.screenY;a.L?(c=b.movementX||b.mozMovementX||b.webkitMovementX||0,d=b.movementY||b.mozMovementY||b.webkitMovementY||0):(c=b.screenX-a.F,d=b.screenY-a.G);a.F=b.screenX;a.G=b.screenY;a.vg(c,d,a.F,a.G)}}
l.je=function(a,b){if(this.Ub&&this.S&&this.S.Z.vb)switch(a){case sq:this.J!=b&&(this.J=b,hs(this));break;case is:this.K!=b&&(this.K=b,hs(this))}};l.vg=function(a,b){this.Ub&&this.S&&this.S.Z.vb&&(a||b)&&(this.H=a,this.I=b,hs(this))};function hs(a){a.D.ef([64|(a.J?32:0)|(a.K?16:0)|(a.I&192)>>4|(a.H&192)>>6,a.H&63,a.I&63]);a.H=a.I=0}
l.ik=function(a){var b=1048592==(a&1048592);if(b){if(!this.Ub){var c=!1;this.A&16||(this.reset(),c=!0);this.A&1048576||(c=!0);c&&this.D.ef([js,js]);cs(this);this.Ub=b}}else this.Ub&&(ds(this),this.Ub=b);this.A=a};var js=77,sq=0,is=2;Ra(function(){for(var a=hb(document,"pcx86","mouse"),b=0;b<a.length;b++){var c=a[b],d=ib(c),d=new bs(d);gb(d,c)}});
function ks(a,b,c){t.call(this,"Disk",{id:a.Wd+".disk"+pa(++ls,4)});this.controller=a;this.ua=a.ua;this.ub=a.ub;this.oa=a.oa;this.Ea=a.Ea;this.B=b;this.Rc=b.name;this.oe=b.oe;this.Gf=this.C=!1;ms(this,c,b.hb,b.Ya,b.Va,b.mb);this.G=[];this.J=[];this.D=null;this.L=0;this.K=!1;tb(this)}da(ks,t);l=ks.prototype;l.ic=function(a,b,c,d){this.Ea=d};l.Pb=function(a,b){b||!this.Gf||this.C||(tb(this,!1),this.load(this.Rc,this.F,null,this.xk,this));return!0};l.xk=function(){tb(this,!0)};

View file

@ -437,32 +437,23 @@ class Mouse extends Component {
this.clickMouse(event.button, fDown);
} else {
/*
* MouseEvent objects contain, among other things, the following properties:
*
* clientX
* clientY
*
* I've selected the above properties because they're widely supported, not because I need
* client-area coordinates. In fact, layerX and layerY are probably closer to what I really want,
* but I don't think they're available in all browsers. screenX and screenY would work as well.
*
* This is because all we care about are deltas. We record clientX and clientY (as xMouse and yMouse)
* All we really care about are deltas. We record screenX and screenY (as xMouse and yMouse)
* merely to calculate xDelta and yDelta.
*/
var xDelta, yDelta;
if (this.xMouse < 0 || this.yMouse < 0) {
this.xMouse = event.clientX;
this.yMouse = event.clientY;
this.xMouse = event.screenX;
this.yMouse = event.screenY;
}
if (this.fLocked) {
xDelta = event['movementX'] || event['mozMovementX'] || event['webkitMovementX'] || 0;
yDelta = event['movementY'] || event['mozMovementY'] || event['webkitMovementY'] || 0;
} else {
xDelta = event.clientX - this.xMouse;
yDelta = event.clientY - this.yMouse;
xDelta = event.screenX - this.xMouse;
yDelta = event.screenY - this.yMouse;
}
this.xMouse = event.clientX;
this.yMouse = event.clientY;
this.xMouse = event.screenX;
this.yMouse = event.screenY;
this.moveMouse(xDelta, yDelta, this.xMouse, this.yMouse);
}
}
@ -513,6 +504,9 @@ class Mouse extends Component {
{
if (this.isActive()) {
if (xDelta || yDelta) {
if (this.messageEnabled(Messages.MOUSE)) {
this.printMessage("moveMouse(" + xDelta + "," + yDelta + ")");
}
/*
* As sendPacket() indicates, any x and y coordinates we supply are for diagnostic purposes only.
* sendPacket() only cares about the xDelta and yDelta properties we provide above, which it then zeroes

View file

@ -623,8 +623,8 @@ function Wu(a){rb.call(this,"Mouse",a,16777216);if(this.P=a.serial)this.W="Seria
l.Xb=function(a,b){if(!b){if(!a||!this.restore)this.reset();else if(!this.restore(a))return!1;if(this.W&&!this.D){for(a=null;(a=bc(this.pa,this.W,a))&&(!a.Zi||!(this.D=a.Zi(this.P,this,this.tl))););if(this.D)for(this.B=[],a=0;a<this.C.length;a++)b=this.C[a],b.G=this,(b=b.D)&&this.B.push(b);else mb(this.id+": "+this.W+" "+this.P+" unavailable")}this.rc?Xu(this):Yu(this)}return!0};l.Wb=function(a){return a?this.save():!0};l.reset=function(){Zu(this)};
l.save=function(){var a=new cg(this),b=0,c=[];c[b++]=this.rc;c[b++]=this.F;c[b++]=this.G;c[b++]=this.I;c[b++]=this.J;c[b++]=this.K;c[b++]=this.L;c[b]=this.A;a.set(0,c);return a.data()};l.restore=function(a){return Zu(this,a[0])};function Zu(a,b){var c=0;b||(b=[!1,-1,-1,0,0,!1,!1,0]);var d=b[c++];a.rc=d;a.F=b[c++];a.G=b[c++];a.I=b[c++];a.J=b[c++];a.K=b[c++];a.L=b[c++];a.A=b[c];a.A&(Pu|Qu)&&(a.A=(a.A&Pu?1048576:0)|(a.A&Qu?16:0));return!0}l.Jf=function(a){this.M=a};
function Xu(a){if(!a.N)for(var b=0;b<a.B.length;b++)$u(a,a.B[b])&&(a.N=!0)}function Yu(a){if(a.N)for(var b=0;b<a.B.length;b++){var c=a.B[b];c&&(c.style.cursor="auto")}}function $u(a,b){return b?(b.addEventListener("mousemove",function(b){av(a,b)},!1),b.addEventListener("mousedown",function(b){av(a,b,!0)},!1),b.addEventListener("mouseup",function(b){av(a,b,!1)},!1),b.style.cursor="none",!0):!1}
function av(a,b,c){if(void 0!==c){var d;!(d=!1!==a.M)&&(d=a.C.length)&&(d=a.C[0],d=d.Fd?d.ne(!0):!1);d||(a.M=null);a.Wd(b.button,c)}else{if(0>a.F||0>a.G)a.F=b.clientX,a.G=b.clientY;a.M?(c=b.movementX||b.mozMovementX||b.webkitMovementX||0,d=b.movementY||b.mozMovementY||b.webkitMovementY||0):(c=b.clientX-a.F,d=b.clientY-a.G);a.F=b.clientX;a.G=b.clientY;a.uf(c,d,a.F,a.G)}}
l.Wd=function(a,b){if(this.rc&&this.H&&this.H.ba.jb){var c="mouse button"+a+" "+(b?"dn":"up");switch(a){case Ls:if(this.K!=b){this.K=b;bv(this,c);return}break;case cv:if(this.L!=b){this.L=b;bv(this,c);return}}Rb(this,c+": ignored")}};l.uf=function(a,b,c,d){this.rc&&this.H&&this.H.ba.jb&&(a||b)&&(this.I=a,this.J=b,bv(this,null,c,d))};
function av(a,b,c){if(void 0!==c){var d;!(d=!1!==a.M)&&(d=a.C.length)&&(d=a.C[0],d=d.Fd?d.ne(!0):!1);d||(a.M=null);a.Wd(b.button,c)}else{if(0>a.F||0>a.G)a.F=b.screenX,a.G=b.screenY;a.M?(c=b.movementX||b.mozMovementX||b.webkitMovementX||0,d=b.movementY||b.mozMovementY||b.webkitMovementY||0):(c=b.screenX-a.F,d=b.screenY-a.G);a.F=b.screenX;a.G=b.screenY;a.uf(c,d,a.F,a.G)}}
l.Wd=function(a,b){if(this.rc&&this.H&&this.H.ba.jb){var c="mouse button"+a+" "+(b?"dn":"up");switch(a){case Ls:if(this.K!=b){this.K=b;bv(this,c);return}break;case cv:if(this.L!=b){this.L=b;bv(this,c);return}}Rb(this,c+": ignored")}};l.uf=function(a,b,c,d){this.rc&&this.H&&this.H.ba.jb&&(a||b)&&(t(this,16777216)&&Rb(this,"moveMouse("+a+","+b+")"),this.I=a,this.J=b,bv(this,null,c,d))};
function bv(a,b,c,d){var e=64|(a.K?32:0)|(a.L?16:0)|(a.J&192)>>4|(a.I&192)>>6,f=a.I&63,g=a.J&63;t(a,8388608)&&Rb(a,(b?b+": ":"")+(void 0!==d?"mouse ("+c+","+d+"): ":"")+"serial packet ["+r(e)+","+r(f)+","+r(g)+"]",0,!0);a.D.Pf([e,f,g]);a.I=a.J=0}
l.tl=function(a){var b=1048592==(a&1048592);if(b){if(!this.rc){var c=!1;this.A&16||(this.reset(),Rb(this,"serial mouse reset"),c=!0);this.A&1048576||(Rb(this,"serial mouse ID requested"),c=!0);c&&(this.D.Pf([dv,dv]),Rb(this,"serial mouse ID sent"));Xu(this);this.rc=b}}else this.rc&&(Rb(this,"serial mouse inactive"),Yu(this),this.rc=b);this.A=a};var dv=77,Ls=0,cv=2;eb(function(){for(var a=Bb(document,"pcx86","mouse"),b=0;b<a.length;b++){var c=a[b],d=Cb(c),d=new Wu(d);Ab(d,c)}});
function ev(a,b,c){rb.call(this,"Disk",{id:a.ze+".disk"+q(++fv,4)},2097152);this.controller=a;this.Ca=a.Ca;this.O=a.O;this.pa=a.pa;this.ca=a.ca;this.B=b;this.ld=b.name;this.Qe=b.Qe;this.qg=this.D=!1;gv(this,c,b.rb,b.cb,b.Va,b.Na);this.I=[];this.L=[];this.F=null;this.N=0;this.M=!1;Ob(this)}ca(ev,rb);l=ev.prototype;l.uc=function(a,b,c,d){this.ca=d};l.Xb=function(a,b){b||!this.qg||this.D||(Ob(this,!1),this.load(this.ld,this.G,null,this.Kl,this));return!0};l.Kl=function(){Ob(this,!0)};

File diff suppressed because one or more lines are too long

View file

@ -55917,32 +55917,23 @@ class Mouse extends Component {
this.clickMouse(event.button, fDown);
} else {
/*
* MouseEvent objects contain, among other things, the following properties:
*
* clientX
* clientY
*
* I've selected the above properties because they're widely supported, not because I need
* client-area coordinates. In fact, layerX and layerY are probably closer to what I really want,
* but I don't think they're available in all browsers. screenX and screenY would work as well.
*
* This is because all we care about are deltas. We record clientX and clientY (as xMouse and yMouse)
* All we really care about are deltas. We record screenX and screenY (as xMouse and yMouse)
* merely to calculate xDelta and yDelta.
*/
var xDelta, yDelta;
if (this.xMouse < 0 || this.yMouse < 0) {
this.xMouse = event.clientX;
this.yMouse = event.clientY;
this.xMouse = event.screenX;
this.yMouse = event.screenY;
}
if (this.fLocked) {
xDelta = event['movementX'] || event['mozMovementX'] || event['webkitMovementX'] || 0;
yDelta = event['movementY'] || event['mozMovementY'] || event['webkitMovementY'] || 0;
} else {
xDelta = event.clientX - this.xMouse;
yDelta = event.clientY - this.yMouse;
xDelta = event.screenX - this.xMouse;
yDelta = event.screenY - this.yMouse;
}
this.xMouse = event.clientX;
this.yMouse = event.clientY;
this.xMouse = event.screenX;
this.yMouse = event.screenY;
this.moveMouse(xDelta, yDelta, this.xMouse, this.yMouse);
}
}
@ -55993,6 +55984,9 @@ class Mouse extends Component {
{
if (this.isActive()) {
if (xDelta || yDelta) {
if (this.messageEnabled(Messages.MOUSE)) {
this.printMessage("moveMouse(" + xDelta + "," + yDelta + ")");
}
/*
* As sendPacket() indicates, any x and y coordinates we supply are for diagnostic purposes only.
* sendPacket() only cares about the xDelta and yDelta properties we provide above, which it then zeroes

View file

@ -583,7 +583,7 @@ Ra(function(){for(var a=hb(document,"pcx86","serial"),b=0;b<a.length;b++){var c=
l.Pb=function(a,b){if(!b){if(!a||!this.restore)this.reset();else if(!this.restore(a))return!1;if(this.V&&!this.D){for(a=null;(a=Cb(this.oa,this.V,a))&&(!a.bi||!(this.D=a.bi(this.O,this,this.ik))););if(this.D)for(this.B=[],a=0;a<this.C.length;a++)b=this.C[a],b.K=this,(b=b.D)&&this.B.push(b);else r(this.id+": "+this.V+" "+this.O+" unavailable")}this.Ub?cs(this):ds(this)}return!0};l.Ob=function(a){return a?this.save():!0};l.reset=function(){es(this)};
l.save=function(){var a=new Ye(this),b=0,c=[];c[b++]=this.Ub;c[b++]=this.F;c[b++]=this.G;c[b++]=this.H;c[b++]=this.I;c[b++]=this.J;c[b++]=this.K;c[b]=this.A;a.set(0,c);return a.data()};l.restore=function(a){return es(this,a[0])};function es(a,b){var c=0;b||(b=[!1,-1,-1,0,0,!1,!1,0]);var d=b[c++];a.Ub=d;a.F=b[c++];a.G=b[c++];a.H=b[c++];a.I=b[c++];a.J=b[c++];a.K=b[c++];a.A=b[c];a.A&(Vr|Wr)&&(a.A=(a.A&Vr?1048576:0)|(a.A&Wr?16:0));return!0}l.$e=function(a){this.L=a};
function cs(a){if(!a.M)for(var b=0;b<a.B.length;b++)fs(a,a.B[b])&&(a.M=!0)}function ds(a){if(a.M)for(var b=0;b<a.B.length;b++){var c=a.B[b];c&&(c.style.cursor="auto")}}function fs(a,b){return b?(b.addEventListener("mousemove",function(b){gs(a,b)},!1),b.addEventListener("mousedown",function(b){gs(a,b,!0)},!1),b.addEventListener("mouseup",function(b){gs(a,b,!1)},!1),b.style.cursor="none",!0):!1}
function gs(a,b,c){if(void 0!==c){var d;!(d=!1!==a.L)&&(d=a.C.length)&&(d=a.C[0],d=d.md?d.Jd(!0):!1);d||(a.L=null);a.je(b.button,c)}else{if(0>a.F||0>a.G)a.F=b.clientX,a.G=b.clientY;a.L?(c=b.movementX||b.mozMovementX||b.webkitMovementX||0,d=b.movementY||b.mozMovementY||b.webkitMovementY||0):(c=b.clientX-a.F,d=b.clientY-a.G);a.F=b.clientX;a.G=b.clientY;a.vg(c,d,a.F,a.G)}}
function gs(a,b,c){if(void 0!==c){var d;!(d=!1!==a.L)&&(d=a.C.length)&&(d=a.C[0],d=d.md?d.Jd(!0):!1);d||(a.L=null);a.je(b.button,c)}else{if(0>a.F||0>a.G)a.F=b.screenX,a.G=b.screenY;a.L?(c=b.movementX||b.mozMovementX||b.webkitMovementX||0,d=b.movementY||b.mozMovementY||b.webkitMovementY||0):(c=b.screenX-a.F,d=b.screenY-a.G);a.F=b.screenX;a.G=b.screenY;a.vg(c,d,a.F,a.G)}}
l.je=function(a,b){if(this.Ub&&this.S&&this.S.Z.vb)switch(a){case sq:this.J!=b&&(this.J=b,hs(this));break;case is:this.K!=b&&(this.K=b,hs(this))}};l.vg=function(a,b){this.Ub&&this.S&&this.S.Z.vb&&(a||b)&&(this.H=a,this.I=b,hs(this))};function hs(a){a.D.ef([64|(a.J?32:0)|(a.K?16:0)|(a.I&192)>>4|(a.H&192)>>6,a.H&63,a.I&63]);a.H=a.I=0}
l.ik=function(a){var b=1048592==(a&1048592);if(b){if(!this.Ub){var c=!1;this.A&16||(this.reset(),c=!0);this.A&1048576||(c=!0);c&&this.D.ef([js,js]);cs(this);this.Ub=b}}else this.Ub&&(ds(this),this.Ub=b);this.A=a};var js=77,sq=0,is=2;Ra(function(){for(var a=hb(document,"pcx86","mouse"),b=0;b<a.length;b++){var c=a[b],d=ib(c),d=new bs(d);gb(d,c)}});
function ks(a,b,c){t.call(this,"Disk",{id:a.Wd+".disk"+pa(++ls,4)});this.controller=a;this.ua=a.ua;this.ub=a.ub;this.oa=a.oa;this.Ea=a.Ea;this.B=b;this.Rc=b.name;this.oe=b.oe;this.Gf=this.C=!1;ms(this,c,b.hb,b.Ya,b.Va,b.mb);this.G=[];this.J=[];this.D=null;this.L=0;this.K=!1;tb(this)}da(ks,t);l=ks.prototype;l.ic=function(a,b,c,d){this.Ea=d};l.Pb=function(a,b){b||!this.Gf||this.C||(tb(this,!1),this.load(this.Rc,this.F,null,this.xk,this));return!0};l.xk=function(){tb(this,!0)};

File diff suppressed because one or more lines are too long