i3geo_tudo_compacto8.js.php 1.86 MB
<?php header("Content-type: text/javascript"); ?>$i = function(id){return document.getElementById(id);};
//
//../pacotes/jsts/jsts_min.js
/**
* JSTS. See https://github.com/bjornharrtell/jsts
* https://github.com/bjornharrtell/jsts/blob/master/LICENSE_EDLv1.txt
* https://github.com/bjornharrtell/jsts/blob/master/LICENSE_EPLv1.txt
* https://github.com/bjornharrtell/jsts/blob/master/LICENSE_LICENSE_ES6_COLLECTIONS.txt
* @license
*/
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.jsts={})}(this,function(t){"use strict";function e(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])}function n(){}function i(){}function r(t,e){this.low=0|e,this.high=0|t}function s(){}var o,a,u,l,h,c,f;function g(){}function d(){}function _(){}function p(){}function m(t){this.name="RuntimeException",this.message=t,this.stack=(new Error).stack,Error.call(this,t)}function v(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t}function y(){if(0===arguments.length)m.call(this);else if(1===arguments.length){var t=arguments[0];m.call(this,t)}}function x(){}function E(){if(this.x=null,this.y=null,this.z=null,0===arguments.length)E.call(this,0,0);else if(1===arguments.length){var t=arguments[0];E.call(this,t.x,t.y,t.z)}else if(2===arguments.length){var e=arguments[0],n=arguments[1];E.call(this,e,n,E.NULL_ORDINATE)}else if(3===arguments.length){var i=arguments[0],r=arguments[1],s=arguments[2];this.x=i,this.y=r,this.z=s}}function I(){if(this._dimensionsToTest=2,0===arguments.length)I.call(this,2);else if(1===arguments.length){var t=arguments[0];if(2!==t&&3!==t)throw new i("only 2 or 3 dimensions may be specified");this._dimensionsToTest=t}}function N(t,e){return t.interfaces_&&t.interfaces_().indexOf(e)>-1}function C(){}function S(){}function L(t){this.message=t||""}function w(){}function R(t){this.message=t||""}function T(t){this.message=t||""}function P(){this.array_=[],arguments[0]instanceof S&&this.addAll(arguments[0])}"fill"in Array.prototype||Object.defineProperty(Array.prototype,"fill",{configurable:!0,value:function(t){if(void 0===this||null===this)throw new TypeError(this+" is not an object");var e=Object(this),n=Math.max(Math.min(e.length,9007199254740991),0)||0,i=1 in arguments&&parseInt(Number(arguments[1]),10)||0;i=i<0?Math.max(n+i,0):Math.min(i,n);var r=2 in arguments&&void 0!==arguments[2]?parseInt(Number(arguments[2]),10)||0:n;for(r=r<0?Math.max(n+arguments[2],0):Math.min(r,n);i<r;)e[i]=t,++i;return e},writable:!0}),Number.isFinite=Number.isFinite||function(t){return"number"==typeof t&&isFinite(t)},Number.isInteger=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t},Number.parseFloat=Number.parseFloat||parseFloat,Number.isNaN=Number.isNaN||function(t){return t!=t},Math.trunc=Math.trunc||function(t){return t<0?Math.ceil(t):Math.floor(t)},e(n.prototype,{interfaces_:function(){return[]},getClass:function(){return n}}),n.equalsWithTolerance=function(t,e,n){return Math.abs(t-e)<=n},r.toBinaryString=function(t){for(var e="",n=2147483648;n>0;n>>>=1)e+=(t.high&n)===n?"1":"0";for(n=2147483648;n>0;n>>>=1)e+=(t.low&n)===n?"1":"0";return e},s.isNaN=function(t){return Number.isNaN(t)},s.isInfinite=function(t){return!Number.isFinite(t)},s.MAX_VALUE=Number.MAX_VALUE,"function"==typeof Float64Array&&"function"==typeof Int32Array?(h=2146435072,c=new Float64Array(1),f=new Int32Array(c.buffer),s.doubleToLongBits=function(t){c[0]=t;var e=0|f[0],n=0|f[1];return(n&h)===h&&0!=(1048575&n)&&0!==e&&(e=0,n=2146959360),new r(n,e)},s.longBitsToDouble=function(t){return f[0]=t.low,f[1]=t.high,c[0]}):(o=Math.log2,a=Math.floor,u=Math.pow,l=function(){for(var t=53;t>0;t--){var e=u(2,t)-1;if(a(o(e))+1===t)return e}return 0}(),s.doubleToLongBits=function(t){var e,n,i,s,h,c,f,g,d;if(t<0||1/t===Number.NEGATIVE_INFINITY?(c=1<<31,t=-t):c=0,0===t)return new r(g=c,d=0);if(t===1/0)return new r(g=2146435072|c,d=0);if(t!=t)return new r(g=2146959360,d=0);if(s=0,d=0,(e=a(t))>1)if(e<=l)(s=a(o(e)))<=20?(d=0,g=e<<20-s&1048575):(d=e%(n=u(2,i=s-20))<<32-i,g=e/n&1048575);else for(i=e,d=0;0!==(i=a(n=i/2));)s++,d>>>=1,d|=(1&g)<<31,g>>>=1,n!==i&&(g|=524288);if(f=s+1023,h=0===e,e=t-e,s<52&&0!==e)for(i=0;;){if((n=2*e)>=1?(e=n-1,h?(f--,h=!1):(i<<=1,i|=1,s++)):(e=n,h?0==--f&&(s++,h=!1):(i<<=1,s++)),20===s)g|=i,i=0;else if(52===s){d|=i;break}if(1===n){s<20?g|=i<<20-s:s<52&&(d|=i<<52-s);break}}return g|=f<<20,new r(g|=c,d)},s.longBitsToDouble=function(t){var e,n,i,r,s=t.high,o=t.low;n=s&1<<31?-1:1,i=((2146435072&s)>>20)-1023,r=0,e=1<<19;for(var a=1;a<=20;a++)s&e&&(r+=u(2,-a)),e>>>=1;for(e=1<<31,a=21;a<=52;a++)o&e&&(r+=u(2,-a)),e>>>=1;if(-1023===i){if(0===r)return 0*n;i=-1022}else{if(1024===i)return 0===r?n/0:NaN;r+=1}return n*r*u(2,i)}),m.prototype=Object.create(Error.prototype),m.prototype.constructor=Error,v(y,m),e(y.prototype,{interfaces_:function(){return[]},getClass:function(){return y}}),e(x.prototype,{interfaces_:function(){return[]},getClass:function(){return x}}),x.shouldNeverReachHere=function(){if(0===arguments.length)x.shouldNeverReachHere(null);else if(1===arguments.length){var t=arguments[0];throw new y("Should never reach here"+(null!==t?": "+t:""))}},x.isTrue=function(){if(1===arguments.length){var t=arguments[0];x.isTrue(t,null)}else if(2===arguments.length){var e=arguments[0],n=arguments[1];if(!e)throw null===n?new y:new y(n)}},x.equals=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1];x.equals(t,e,null)}else if(3===arguments.length){var n=arguments[0],i=arguments[1],r=arguments[2];if(!i.equals(n))throw new y("Expected "+n+" but encountered "+i+(null!==r?": "+r:""))}},e(E.prototype,{setOrdinate:function(t,e){switch(t){case E.X:this.x=e;break;case E.Y:this.y=e;break;case E.Z:this.z=e;break;default:throw new i("Invalid ordinate index: "+t)}},equals2D:function(){if(1===arguments.length){var t=arguments[0];return this.x===t.x&&this.y===t.y}if(2===arguments.length){var e=arguments[0],i=arguments[1];return!!n.equalsWithTolerance(this.x,e.x,i)&&!!n.equalsWithTolerance(this.y,e.y,i)}},getOrdinate:function(t){switch(t){case E.X:return this.x;case E.Y:return this.y;case E.Z:return this.z}throw new i("Invalid ordinate index: "+t)},equals3D:function(t){return this.x===t.x&&this.y===t.y&&(this.z===t.z||s.isNaN(this.z)&&s.isNaN(t.z))},equals:function(t){return t instanceof E&&this.equals2D(t)},equalInZ:function(t,e){return n.equalsWithTolerance(this.z,t.z,e)},compareTo:function(t){var e=t;return this.x<e.x?-1:this.x>e.x?1:this.y<e.y?-1:this.y>e.y?1:0},clone:function(){try{return null}catch(t){if(t instanceof CloneNotSupportedException)return x.shouldNeverReachHere("this shouldn't happen because this class is Cloneable"),null;throw t}},copy:function(){return new E(this)},toString:function(){return"("+this.x+", "+this.y+", "+this.z+")"},distance3D:function(t){var e=this.x-t.x,n=this.y-t.y,i=this.z-t.z;return Math.sqrt(e*e+n*n+i*i)},distance:function(t){var e=this.x-t.x,n=this.y-t.y;return Math.sqrt(e*e+n*n)},hashCode:function(){var t=17;return t=37*(t=37*t+E.hashCode(this.x))+E.hashCode(this.y)},setCoordinate:function(t){this.x=t.x,this.y=t.y,this.z=t.z},interfaces_:function(){return[g,d,p]},getClass:function(){return E}}),E.hashCode=function(){if(1===arguments.length&&"number"==typeof arguments[0]){var t=arguments[0],e=s.doubleToLongBits(t);return Math.trunc(e^e>>>32)}},e(I.prototype,{compare:function(t,e){var n=t,i=e,r=I.compare(n.x,i.x);if(0!==r)return r;var s=I.compare(n.y,i.y);return 0!==s?s:this._dimensionsToTest<=2?0:I.compare(n.z,i.z)},interfaces_:function(){return[_]},getClass:function(){return I}}),I.compare=function(t,e){return t<e?-1:t>e?1:s.isNaN(t)?s.isNaN(e)?0:-1:s.isNaN(e)?1:0},E.DimensionalComparator=I,E.serialVersionUID=0x5cbf2c235c7e5800,E.NULL_ORDINATE=s.NaN,E.X=0,E.Y=1,E.Z=2,C.prototype.hasNext=function(){},C.prototype.next=function(){},C.prototype.remove=function(){},S.prototype.add=function(){},S.prototype.addAll=function(){},S.prototype.isEmpty=function(){},S.prototype.iterator=function(){},S.prototype.size=function(){},S.prototype.toArray=function(){},S.prototype.remove=function(){},L.prototype=new Error,L.prototype.name="IndexOutOfBoundsException",w.prototype=Object.create(S.prototype),w.prototype.constructor=w,w.prototype.get=function(){},w.prototype.set=function(){},w.prototype.isEmpty=function(){},R.prototype=new Error,R.prototype.name="NoSuchElementException",T.prototype=new Error,T.prototype.name="OperationNotSupported",P.prototype=Object.create(w.prototype),P.prototype.constructor=P,P.prototype.ensureCapacity=function(){},P.prototype.interfaces_=function(){return[w,S]},P.prototype.add=function(t){return 1===arguments.length?this.array_.push(t):this.array_.splice(arguments[0],0,arguments[1]),!0},P.prototype.clear=function(){this.array_=[]},P.prototype.addAll=function(t){for(var e=t.iterator();e.hasNext();)this.add(e.next());return!0},P.prototype.set=function(t,e){var n=this.array_[t];return this.array_[t]=e,n},P.prototype.iterator=function(){return new O(this)},P.prototype.get=function(t){if(t<0||t>=this.size())throw new L;return this.array_[t]},P.prototype.isEmpty=function(){return 0===this.array_.length},P.prototype.size=function(){return this.array_.length},P.prototype.toArray=function(){for(var t=[],e=0,n=this.array_.length;e<n;e++)t.push(this.array_[e]);return t},P.prototype.remove=function(t){for(var e=!1,n=0,i=this.array_.length;n<i;n++)if(this.array_[n]===t){this.array_.splice(n,1),e=!0;break}return e};var O=function(t){this.arrayList_=t,this.position_=0};function b(){if(P.apply(this),0===arguments.length);else if(1===arguments.length){var t=arguments[0];this.ensureCapacity(t.length),this.add(t,!0)}else if(2===arguments.length){var e=arguments[0],n=arguments[1];this.ensureCapacity(e.length),this.add(e,n)}}function M(){if(this._minx=null,this._maxx=null,this._miny=null,this._maxy=null,0===arguments.length)this.init();else if(1===arguments.length){if(arguments[0]instanceof E){var t=arguments[0];this.init(t.x,t.x,t.y,t.y)}else if(arguments[0]instanceof M){var e=arguments[0];this.init(e)}}else if(2===arguments.length){var n=arguments[0],i=arguments[1];this.init(n.x,i.x,n.y,i.y)}else if(4===arguments.length){var r=arguments[0],s=arguments[1],o=arguments[2],a=arguments[3];this.init(r,s,o,a)}}function D(){}function A(){D.call(this,"Projective point not representable on the Cartesian plane.")}function F(t){this.str=t}function G(t){this.value=t}function q(){}function B(){if(this._hi=0,this._lo=0,0===arguments.length)this.init(0);else if(1===arguments.length){if("number"==typeof arguments[0]){var t=arguments[0];this.init(t)}else if(arguments[0]instanceof B){var e=arguments[0];this.init(e)}else if("string"==typeof arguments[0]){var n=arguments[0];B.call(this,B.parse(n))}}else if(2===arguments.length){var i=arguments[0],r=arguments[1];this.init(i,r)}}function V(){}function z(){}function Y(){}function k(){if(this.x=null,this.y=null,this.w=null,0===arguments.length)this.x=0,this.y=0,this.w=1;else if(1===arguments.length){var t=arguments[0];this.x=t.x,this.y=t.y,this.w=1}else if(2===arguments.length){if("number"==typeof arguments[0]&&"number"==typeof arguments[1]){var e=arguments[0],n=arguments[1];this.x=e,this.y=n,this.w=1}else if(arguments[0]instanceof k&&arguments[1]instanceof k){var i=arguments[0],r=arguments[1];this.x=i.y*r.w-r.y*i.w,this.y=r.x*i.w-i.x*r.w,this.w=i.x*r.y-r.x*i.y}else if(arguments[0]instanceof E&&arguments[1]instanceof E){var s=arguments[0],o=arguments[1];this.x=s.y-o.y,this.y=o.x-s.x,this.w=s.x*o.y-o.x*s.y}}else if(3===arguments.length){var a=arguments[0],u=arguments[1],l=arguments[2];this.x=a,this.y=u,this.w=l}else if(4===arguments.length){var h=arguments[0],c=arguments[1],f=arguments[2],g=arguments[3],d=h.y-c.y,_=c.x-h.x,p=h.x*c.y-c.x*h.y,m=f.y-g.y,v=g.x-f.x,y=f.x*g.y-g.x*f.y;this.x=_*y-v*p,this.y=m*p-d*y,this.w=d*v-m*_}}function U(){}function X(){}function H(){}function W(){}function j(){}function K(){this._envelope=null,this._factory=null,this._SRID=null,this._userData=null;var t=arguments[0];this._factory=t,this._SRID=t.getSRID()}function Z(){}function Q(){}function J(){}function $(){}function tt(){}function et(){}function nt(){}function it(){}function rt(){}function st(){}function ot(){}function at(){}function ut(){this.array_=[],arguments[0]instanceof S&&this.addAll(arguments[0])}O.prototype.next=function(){if(this.position_===this.arrayList_.size())throw new R;return this.arrayList_.get(this.position_++)},O.prototype.hasNext=function(){return this.position_<this.arrayList_.size()},O.prototype.set=function(t){return this.arrayList_.set(this.position_-1,t)},O.prototype.remove=function(){this.arrayList_.remove(this.arrayList_.get(this.position_))},v(b,P),e(b.prototype,{getCoordinate:function(t){return this.get(t)},addAll:function(){if(2===arguments.length&&"boolean"==typeof arguments[1]&&N(arguments[0],S)){for(var t=arguments[0],e=arguments[1],n=!1,i=t.iterator();i.hasNext();)this.add(i.next(),e),n=!0;return n}return P.prototype.addAll.apply(this,arguments)},clone:function(){for(var t=P.prototype.clone.call(this),e=0;e<this.size();e++)t.add(e,this.get(e).clone());return t},toCoordinateArray:function(){return this.toArray(b.coordArrayType)},add:function(){if(1===arguments.length){var t=arguments[0];P.prototype.add.call(this,t)}else if(2===arguments.length){if(arguments[0]instanceof Array&&"boolean"==typeof arguments[1]){var e=arguments[0],n=arguments[1];return this.add(e,n,!0),!0}if(arguments[0]instanceof E&&"boolean"==typeof arguments[1]){var i=arguments[0];if(!arguments[1])if(this.size()>=1)if(this.get(this.size()-1).equals2D(i))return null;P.prototype.add.call(this,i)}else if(arguments[0]instanceof Object&&"boolean"==typeof arguments[1]){var r=arguments[0],s=arguments[1];return this.add(r,s),!0}}else if(3===arguments.length){if("boolean"==typeof arguments[2]&&arguments[0]instanceof Array&&"boolean"==typeof arguments[1]){var o=arguments[0],a=arguments[1];if(arguments[2])for(var u=0;u<o.length;u++)this.add(o[u],a);else for(u=o.length-1;u>=0;u--)this.add(o[u],a);return!0}if("boolean"==typeof arguments[2]&&Number.isInteger(arguments[0])&&arguments[1]instanceof E){var l=arguments[0],h=arguments[1];if(!arguments[2]){var c=this.size();if(c>0){if(l>0)if(this.get(l-1).equals2D(h))return null;if(l<c)if(this.get(l).equals2D(h))return null}}P.prototype.add.call(this,l,h)}}else if(4===arguments.length){var f=arguments[0],g=arguments[1],d=arguments[2],_=arguments[3],p=1;d>_&&(p=-1);for(u=d;u!==_;u+=p)this.add(f[u],g);return!0}},closeRing:function(){this.size()>0&&this.add(new E(this.get(0)),!1)},interfaces_:function(){return[]},getClass:function(){return b}}),b.coordArrayType=new Array(0).fill(null),e(M.prototype,{getArea:function(){return this.getWidth()*this.getHeight()},equals:function(t){if(!(t instanceof M))return!1;var e=t;return this.isNull()?e.isNull():this._maxx===e.getMaxX()&&this._maxy===e.getMaxY()&&this._minx===e.getMinX()&&this._miny===e.getMinY()},intersection:function(t){if(this.isNull()||t.isNull()||!this.intersects(t))return new M;var e=this._minx>t._minx?this._minx:t._minx,n=this._miny>t._miny?this._miny:t._miny;return new M(e,this._maxx<t._maxx?this._maxx:t._maxx,n,this._maxy<t._maxy?this._maxy:t._maxy)},isNull:function(){return this._maxx<this._minx},getMaxX:function(){return this._maxx},covers:function(){if(1===arguments.length){if(arguments[0]instanceof E){var t=arguments[0];return this.covers(t.x,t.y)}if(arguments[0]instanceof M){var e=arguments[0];return!this.isNull()&&!e.isNull()&&(e.getMinX()>=this._minx&&e.getMaxX()<=this._maxx&&e.getMinY()>=this._miny&&e.getMaxY()<=this._maxy)}}else if(2===arguments.length){var n=arguments[0],i=arguments[1];return!this.isNull()&&(n>=this._minx&&n<=this._maxx&&i>=this._miny&&i<=this._maxy)}},intersects:function(){if(1===arguments.length){if(arguments[0]instanceof M){var t=arguments[0];return!this.isNull()&&!t.isNull()&&!(t._minx>this._maxx||t._maxx<this._minx||t._miny>this._maxy||t._maxy<this._miny)}if(arguments[0]instanceof E){var e=arguments[0];return this.intersects(e.x,e.y)}}else if(2===arguments.length){if(arguments[0]instanceof E&&arguments[1]instanceof E){var n=arguments[0],i=arguments[1];return!this.isNull()&&(!((n.x<i.x?n.x:i.x)>this._maxx)&&(!((n.x>i.x?n.x:i.x)<this._minx)&&(!((n.y<i.y?n.y:i.y)>this._maxy)&&!((n.y>i.y?n.y:i.y)<this._miny))))}if("number"==typeof arguments[0]&&"number"==typeof arguments[1]){var r=arguments[0],s=arguments[1];return!this.isNull()&&!(r>this._maxx||r<this._minx||s>this._maxy||s<this._miny)}}},getMinY:function(){return this._miny},getMinX:function(){return this._minx},expandToInclude:function(){if(1===arguments.length){if(arguments[0]instanceof E){var t=arguments[0];this.expandToInclude(t.x,t.y)}else if(arguments[0]instanceof M){var e=arguments[0];if(e.isNull())return null;this.isNull()?(this._minx=e.getMinX(),this._maxx=e.getMaxX(),this._miny=e.getMinY(),this._maxy=e.getMaxY()):(e._minx<this._minx&&(this._minx=e._minx),e._maxx>this._maxx&&(this._maxx=e._maxx),e._miny<this._miny&&(this._miny=e._miny),e._maxy>this._maxy&&(this._maxy=e._maxy))}}else if(2===arguments.length){var n=arguments[0],i=arguments[1];this.isNull()?(this._minx=n,this._maxx=n,this._miny=i,this._maxy=i):(n<this._minx&&(this._minx=n),n>this._maxx&&(this._maxx=n),i<this._miny&&(this._miny=i),i>this._maxy&&(this._maxy=i))}},minExtent:function(){if(this.isNull())return 0;var t=this.getWidth(),e=this.getHeight();return t<e?t:e},getWidth:function(){return this.isNull()?0:this._maxx-this._minx},compareTo:function(t){var e=t;return this.isNull()?e.isNull()?0:-1:e.isNull()?1:this._minx<e._minx?-1:this._minx>e._minx?1:this._miny<e._miny?-1:this._miny>e._miny?1:this._maxx<e._maxx?-1:this._maxx>e._maxx?1:this._maxy<e._maxy?-1:this._maxy>e._maxy?1:0},translate:function(t,e){if(this.isNull())return null;this.init(this.getMinX()+t,this.getMaxX()+t,this.getMinY()+e,this.getMaxY()+e)},toString:function(){return"Env["+this._minx+" : "+this._maxx+", "+this._miny+" : "+this._maxy+"]"},setToNull:function(){this._minx=0,this._maxx=-1,this._miny=0,this._maxy=-1},getHeight:function(){return this.isNull()?0:this._maxy-this._miny},maxExtent:function(){if(this.isNull())return 0;var t=this.getWidth(),e=this.getHeight();return t>e?t:e},expandBy:function(){if(1===arguments.length){var t=arguments[0];this.expandBy(t,t)}else if(2===arguments.length){var e=arguments[0],n=arguments[1];if(this.isNull())return null;this._minx-=e,this._maxx+=e,this._miny-=n,this._maxy+=n,(this._minx>this._maxx||this._miny>this._maxy)&&this.setToNull()}},contains:function(){if(1===arguments.length){if(arguments[0]instanceof M){var t=arguments[0];return this.covers(t)}if(arguments[0]instanceof E){var e=arguments[0];return this.covers(e)}}else if(2===arguments.length){var n=arguments[0],i=arguments[1];return this.covers(n,i)}},centre:function(){return this.isNull()?null:new E((this.getMinX()+this.getMaxX())/2,(this.getMinY()+this.getMaxY())/2)},init:function(){if(0===arguments.length)this.setToNull();else if(1===arguments.length){if(arguments[0]instanceof E){var t=arguments[0];this.init(t.x,t.x,t.y,t.y)}else if(arguments[0]instanceof M){var e=arguments[0];this._minx=e._minx,this._maxx=e._maxx,this._miny=e._miny,this._maxy=e._maxy}}else if(2===arguments.length){var n=arguments[0],i=arguments[1];this.init(n.x,i.x,n.y,i.y)}else if(4===arguments.length){var r=arguments[0],s=arguments[1],o=arguments[2],a=arguments[3];r<s?(this._minx=r,this._maxx=s):(this._minx=s,this._maxx=r),o<a?(this._miny=o,this._maxy=a):(this._miny=a,this._maxy=o)}},getMaxY:function(){return this._maxy},distance:function(t){if(this.intersects(t))return 0;var e=0;this._maxx<t._minx?e=t._minx-this._maxx:this._minx>t._maxx&&(e=this._minx-t._maxx);var n=0;return this._maxy<t._miny?n=t._miny-this._maxy:this._miny>t._maxy&&(n=this._miny-t._maxy),0===e?n:0===n?e:Math.sqrt(e*e+n*n)},hashCode:function(){var t=17;return t=37*(t=37*(t=37*(t=37*t+E.hashCode(this._minx))+E.hashCode(this._maxx))+E.hashCode(this._miny))+E.hashCode(this._maxy)},interfaces_:function(){return[g,p]},getClass:function(){return M}}),M.intersects=function(){if(3===arguments.length){var t=arguments[0],e=arguments[1],n=arguments[2];return n.x>=(t.x<e.x?t.x:e.x)&&n.x<=(t.x>e.x?t.x:e.x)&&n.y>=(t.y<e.y?t.y:e.y)&&n.y<=(t.y>e.y?t.y:e.y)}if(4===arguments.length){var i=arguments[0],r=arguments[1],s=arguments[2],o=arguments[3],a=Math.min(s.x,o.x),u=Math.max(s.x,o.x),l=Math.min(i.x,r.x),h=Math.max(i.x,r.x);return!(l>u)&&(!(h<a)&&(a=Math.min(s.y,o.y),u=Math.max(s.y,o.y),l=Math.min(i.y,r.y),h=Math.max(i.y,r.y),!(l>u)&&!(h<a)))}},M.serialVersionUID=0x51845cd552189800,v(A,D),e(A.prototype,{interfaces_:function(){return[]},getClass:function(){return A}}),F.prototype.append=function(t){this.str+=t},F.prototype.setCharAt=function(t,e){this.str=this.str.substr(0,t)+e+this.str.substr(t+1)},F.prototype.toString=function(t){return this.str},G.prototype.intValue=function(){return this.value},G.prototype.compareTo=function(t){return this.value<t?-1:this.value>t?1:0},G.isNaN=function(t){return Number.isNaN(t)},q.isWhitespace=function(t){return t<=32&&t>=0||127==t},q.toUpperCase=function(t){return t.toUpperCase()},e(B.prototype,{le:function(t){return this._hi<t._hi||this._hi===t._hi&&this._lo<=t._lo},extractSignificantDigits:function(t,e){var n=this.abs(),i=B.magnitude(n._hi),r=B.TEN.pow(i);(n=n.divide(r)).gt(B.TEN)?(n=n.divide(B.TEN),i+=1):n.lt(B.ONE)&&(n=n.multiply(B.TEN),i-=1);for(var s=i+1,o=new F,a=B.MAX_PRINT_DIGITS-1,u=0;u<=a;u++){t&&u===s&&o.append(".");var l=Math.trunc(n._hi);if(l<0)break;var h=!1,c=0;l>9?(h=!0,c="9"):c="0"+l,o.append(c),n=n.subtract(B.valueOf(l)).multiply(B.TEN),h&&n.selfAdd(B.TEN);var f=!0,g=B.magnitude(n._hi);if(g<0&&Math.abs(g)>=a-u&&(f=!1),!f)break}return e[0]=i,o.toString()},sqr:function(){return this.multiply(this)},doubleValue:function(){return this._hi+this._lo},subtract:function(){if(arguments[0]instanceof B){var t=arguments[0];return this.add(t.negate())}if("number"==typeof arguments[0]){var e=arguments[0];return this.add(-e)}},equals:function(){if(1===arguments.length&&arguments[0]instanceof B){var t=arguments[0];return this._hi===t._hi&&this._lo===t._lo}},isZero:function(){return 0===this._hi&&0===this._lo},selfSubtract:function(){if(arguments[0]instanceof B){var t=arguments[0];return this.isNaN()?this:this.selfAdd(-t._hi,-t._lo)}if("number"==typeof arguments[0]){var e=arguments[0];return this.isNaN()?this:this.selfAdd(-e,0)}},getSpecialNumberString:function(){return this.isZero()?"0.0":this.isNaN()?"NaN ":null},min:function(t){return this.le(t)?this:t},selfDivide:function(){if(1===arguments.length){if(arguments[0]instanceof B){var t=arguments[0];return this.selfDivide(t._hi,t._lo)}if("number"==typeof arguments[0]){var e=arguments[0];return this.selfDivide(e,0)}}else if(2===arguments.length){var n,i,r,s,o=arguments[0],a=arguments[1],u=null,l=null,h=null,c=null;return r=this._hi/o,c=(u=(h=B.SPLIT*r)-(u=h-r))*(l=(c=B.SPLIT*o)-(l=c-o))-(s=r*o)+u*(i=o-l)+(n=r-u)*l+n*i,c=r+(h=(this._hi-s-c+this._lo-r*a)/o),this._hi=c,this._lo=r-c+h,this}},dump:function(){return"DD<"+this._hi+", "+this._lo+">"},divide:function(){if(arguments[0]instanceof B){var t,e,n,i,r=arguments[0],o=null,a=null,u=null,l=null;return n=this._hi/r._hi,o=(u=B.SPLIT*n)-n,l=B.SPLIT*r._hi,t=n-(o=u-o),a=l-r._hi,i=n*r._hi,l=o*(a=l-a)-i+o*(e=r._hi-a)+t*a+t*e,new B(l=n+(u=(this._hi-i-l+this._lo-n*r._lo)/r._hi),n-l+u)}if("number"==typeof arguments[0]){var h=arguments[0];return s.isNaN(h)?B.createNaN():B.copy(this).selfDivide(h,0)}},ge:function(t){return this._hi>t._hi||this._hi===t._hi&&this._lo>=t._lo},pow:function(t){if(0===t)return B.valueOf(1);var e=new B(this),n=B.valueOf(1),i=Math.abs(t);if(i>1)for(;i>0;)i%2==1&&n.selfMultiply(e),(i/=2)>0&&(e=e.sqr());else n=e;return t<0?n.reciprocal():n},ceil:function(){if(this.isNaN())return B.NaN;var t=Math.ceil(this._hi),e=0;return t===this._hi&&(e=Math.ceil(this._lo)),new B(t,e)},compareTo:function(t){var e=t;return this._hi<e._hi?-1:this._hi>e._hi?1:this._lo<e._lo?-1:this._lo>e._lo?1:0},rint:function(){return this.isNaN()?this:this.add(.5).floor()},setValue:function(){if(arguments[0]instanceof B){var t=arguments[0];return this.init(t),this}if("number"==typeof arguments[0]){var e=arguments[0];return this.init(e),this}},max:function(t){return this.ge(t)?this:t},sqrt:function(){if(this.isZero())return B.valueOf(0);if(this.isNegative())return B.NaN;var t=1/Math.sqrt(this._hi),e=this._hi*t,n=B.valueOf(e),i=this.subtract(n.sqr())._hi*(.5*t);return n.add(i)},selfAdd:function(){if(1===arguments.length){if(arguments[0]instanceof B){var t=arguments[0];return this.selfAdd(t._hi,t._lo)}if("number"==typeof arguments[0]){var e=arguments[0],n=null,i=null,r=null,s=null,o=null,a=null;return s=(r=this._hi+e)-(o=r-this._hi),i=(a=(s=e-o+(this._hi-s))+this._lo)+(r-(n=r+a)),this._hi=n+i,this._lo=i+(n-this._hi),this}}else if(2===arguments.length){var u,l=arguments[0],h=arguments[1],c=(n=null,i=null,null);r=null,s=null,o=null,a=null;r=this._hi+l,u=this._lo+h,s=r-(o=r-this._hi),c=u-(a=u-this._lo),s=l-o+(this._hi-s),c=h-a+(this._lo-c);var f=(n=r+(o=s+u))+(o=c+(i=o+(r-n))),g=o+(n-f);return this._hi=f,this._lo=g,this}},selfMultiply:function(){if(1===arguments.length){if(arguments[0]instanceof B){var t=arguments[0];return this.selfMultiply(t._hi,t._lo)}if("number"==typeof arguments[0]){var e=arguments[0];return this.selfMultiply(e,0)}}else if(2===arguments.length){var n,i,r=arguments[0],s=arguments[1],o=null,a=null,u=null,l=null;o=(u=B.SPLIT*this._hi)-this._hi,l=B.SPLIT*r,o=u-o,n=this._hi-o,a=l-r;var h=(u=this._hi*r)+(l=o*(a=l-a)-u+o*(i=r-a)+n*a+n*i+(this._hi*s+this._lo*r)),c=l+(o=u-h);return this._hi=h,this._lo=c,this}},selfSqr:function(){return this.selfMultiply(this)},floor:function(){if(this.isNaN())return B.NaN;var t=Math.floor(this._hi),e=0;return t===this._hi&&(e=Math.floor(this._lo)),new B(t,e)},negate:function(){return this.isNaN()?this:new B(-this._hi,-this._lo)},clone:function(){try{return null}catch(t){if(t instanceof CloneNotSupportedException)return null;throw t}},multiply:function(){if(arguments[0]instanceof B){var t=arguments[0];return t.isNaN()?B.createNaN():B.copy(this).selfMultiply(t)}if("number"==typeof arguments[0]){var e=arguments[0];return s.isNaN(e)?B.createNaN():B.copy(this).selfMultiply(e,0)}},isNaN:function(){return s.isNaN(this._hi)},intValue:function(){return Math.trunc(this._hi)},toString:function(){var t=B.magnitude(this._hi);return t>=-3&&t<=20?this.toStandardNotation():this.toSciNotation()},toStandardNotation:function(){var t=this.getSpecialNumberString();if(null!==t)return t;var e=new Array(1).fill(null),n=this.extractSignificantDigits(!0,e),i=e[0]+1,r=n;if("."===n.charAt(0))r="0"+n;else if(i<0)r="0."+B.stringOfChar("0",-i)+n;else if(-1===n.indexOf(".")){var s=i-n.length;r=n+B.stringOfChar("0",s)+".0"}return this.isNegative()?"-"+r:r},reciprocal:function(){var t,e,n,i,r=null,s=null,o=null,a=null;n=1/this._hi,r=(o=B.SPLIT*n)-n,a=B.SPLIT*this._hi,t=n-(r=o-r),s=a-this._hi;var u=n+(o=(1-(i=n*this._hi)-(a=r*(s=a-s)-i+r*(e=this._hi-s)+t*s+t*e)-n*this._lo)/this._hi);return new B(u,n-u+o)},toSciNotation:function(){if(this.isZero())return B.SCI_NOT_ZERO;var t=this.getSpecialNumberString();if(null!==t)return t;var e=new Array(1).fill(null),n=this.extractSignificantDigits(!1,e),i=B.SCI_NOT_EXPONENT_CHAR+e[0];if("0"===n.charAt(0))throw new IllegalStateException("Found leading zero: "+n);var r="";n.length>1&&(r=n.substring(1));var s=n.charAt(0)+"."+r;return this.isNegative()?"-"+s+i:s+i},abs:function(){return this.isNaN()?B.NaN:this.isNegative()?this.negate():new B(this)},isPositive:function(){return this._hi>0||0===this._hi&&this._lo>0},lt:function(t){return this._hi<t._hi||this._hi===t._hi&&this._lo<t._lo},add:function(){if(arguments[0]instanceof B){var t=arguments[0];return B.copy(this).selfAdd(t)}if("number"==typeof arguments[0]){var e=arguments[0];return B.copy(this).selfAdd(e)}},init:function(){if(1===arguments.length){if("number"==typeof arguments[0]){var t=arguments[0];this._hi=t,this._lo=0}else if(arguments[0]instanceof B){var e=arguments[0];this._hi=e._hi,this._lo=e._lo}}else if(2===arguments.length){var n=arguments[0],i=arguments[1];this._hi=n,this._lo=i}},gt:function(t){return this._hi>t._hi||this._hi===t._hi&&this._lo>t._lo},isNegative:function(){return this._hi<0||0===this._hi&&this._lo<0},trunc:function(){return this.isNaN()?B.NaN:this.isPositive()?this.floor():this.ceil()},signum:function(){return this._hi>0?1:this._hi<0?-1:this._lo>0?1:this._lo<0?-1:0},interfaces_:function(){return[p,g,d]},getClass:function(){return B}}),B.sqr=function(t){return B.valueOf(t).selfMultiply(t)},B.valueOf=function(){if("string"==typeof arguments[0]){var t=arguments[0];return B.parse(t)}if("number"==typeof arguments[0])return new B(arguments[0])},B.sqrt=function(t){return B.valueOf(t).sqrt()},B.parse=function(t){for(var e=0,n=t.length;q.isWhitespace(t.charAt(e));)e++;var i=!1;if(e<n){var r=t.charAt(e);"-"!==r&&"+"!==r||(e++,"-"===r&&(i=!0))}for(var s=new B,o=0,a=0,u=0;!(e>=n);){var l=t.charAt(e);if(e++,q.isDigit(l)){var h=l-"0";s.selfMultiply(B.TEN),s.selfAdd(h),o++}else{if("."!==l){if("e"===l||"E"===l){var c=t.substring(e);try{u=G.parseInt(c)}catch(e){throw e instanceof NumberFormatException?new NumberFormatException("Invalid exponent "+c+" in string "+t):e}break}throw new NumberFormatException("Unexpected character '"+l+"' at position "+e+" in string "+t)}a=o}}var f=s,g=o-a-u;if(0===g)f=s;else if(g>0){var d=B.TEN.pow(g);f=s.divide(d)}else if(g<0){d=B.TEN.pow(-g);f=s.multiply(d)}return i?f.negate():f},B.createNaN=function(){return new B(s.NaN,s.NaN)},B.copy=function(t){return new B(t)},B.magnitude=function(t){var e=Math.abs(t),n=Math.log(e)/Math.log(10),i=Math.trunc(Math.floor(n));return 10*Math.pow(10,i)<=e&&(i+=1),i},B.stringOfChar=function(t,e){for(var n=new F,i=0;i<e;i++)n.append(t);return n.toString()},B.PI=new B(3.141592653589793,1.2246467991473532e-16),B.TWO_PI=new B(6.283185307179586,2.4492935982947064e-16),B.PI_2=new B(1.5707963267948966,6.123233995736766e-17),B.E=new B(2.718281828459045,1.4456468917292502e-16),B.NaN=new B(s.NaN,s.NaN),B.EPS=1.23259516440783e-32,B.SPLIT=134217729,B.MAX_PRINT_DIGITS=32,B.TEN=B.valueOf(10),B.ONE=B.valueOf(1),B.SCI_NOT_EXPONENT_CHAR="E",B.SCI_NOT_ZERO="0.0E0",e(V.prototype,{interfaces_:function(){return[]},getClass:function(){return V}}),V.orientationIndex=function(t,e,n){var i=V.orientationIndexFilter(t,e,n);if(i<=1)return i;var r=B.valueOf(e.x).selfAdd(-t.x),s=B.valueOf(e.y).selfAdd(-t.y),o=B.valueOf(n.x).selfAdd(-e.x),a=B.valueOf(n.y).selfAdd(-e.y);return r.selfMultiply(a).selfSubtract(s.selfMultiply(o)).signum()},V.signOfDet2x2=function(){if(arguments[0]instanceof B){var t=arguments[0],e=arguments[1],n=arguments[2],i=arguments[3];return t.multiply(i).selfSubtract(e.multiply(n)).signum()}if("number"==typeof arguments[0]){var r=arguments[0],s=arguments[1],o=arguments[2],a=arguments[3],u=B.valueOf(r),l=B.valueOf(s),h=B.valueOf(o),c=B.valueOf(a);return u.multiply(c).selfSubtract(l.multiply(h)).signum()}},V.intersection=function(t,e,n,i){var r=B.valueOf(i.y).selfSubtract(n.y).selfMultiply(B.valueOf(e.x).selfSubtract(t.x)),s=B.valueOf(i.x).selfSubtract(n.x).selfMultiply(B.valueOf(e.y).selfSubtract(t.y)),o=r.subtract(s),a=B.valueOf(i.x).selfSubtract(n.x).selfMultiply(B.valueOf(t.y).selfSubtract(n.y)),u=B.valueOf(i.y).selfSubtract(n.y).selfMultiply(B.valueOf(t.x).selfSubtract(n.x)),l=a.subtract(u).selfDivide(o).doubleValue(),h=B.valueOf(t.x).selfAdd(B.valueOf(e.x).selfSubtract(t.x).selfMultiply(l)).doubleValue(),c=B.valueOf(e.x).selfSubtract(t.x).selfMultiply(B.valueOf(t.y).selfSubtract(n.y)),f=B.valueOf(e.y).selfSubtract(t.y).selfMultiply(B.valueOf(t.x).selfSubtract(n.x)),g=c.subtract(f).selfDivide(o).doubleValue();return new E(h,B.valueOf(n.y).selfAdd(B.valueOf(i.y).selfSubtract(n.y).selfMultiply(g)).doubleValue())},V.orientationIndexFilter=function(t,e,n){var i=null,r=(t.x-n.x)*(e.y-n.y),s=(t.y-n.y)*(e.x-n.x),o=r-s;if(r>0){if(s<=0)return V.signum(o);i=r+s}else{if(!(r<0))return V.signum(o);if(s>=0)return V.signum(o);i=-r-s}var a=V.DP_SAFE_EPSILON*i;return o>=a||-o>=a?V.signum(o):2},V.signum=function(t){return t>0?1:t<0?-1:0},V.DP_SAFE_EPSILON=1e-15,e(z.prototype,{interfaces_:function(){return[]},getClass:function(){return z}}),z.index=function(t,e,n){return V.orientationIndex(t,e,n)},z.isCCW=function(t){var e=t.length-1;if(e<3)throw new i("Ring has fewer than 4 points, so orientation cannot be determined");for(var n=t[0],r=0,s=1;s<=e;s++){var o=t[s];o.y>n.y&&(n=o,r=s)}var a=r;do{(a-=1)<0&&(a=e)}while(t[a].equals2D(n)&&a!==r);var u=r;do{u=(u+1)%e}while(t[u].equals2D(n)&&u!==r);var l=t[a],h=t[u];if(l.equals2D(n)||h.equals2D(n)||l.equals2D(h))return!1;var c=z.index(l,n,h);return 0===c?l.x>h.x:c>0},z.CLOCKWISE=-1,z.RIGHT=z.CLOCKWISE,z.COUNTERCLOCKWISE=1,z.LEFT=z.COUNTERCLOCKWISE,z.COLLINEAR=0,z.STRAIGHT=z.COLLINEAR,Y.arraycopy=function(t,e,n,i,r){for(var s=0,o=e;o<e+r;o++)n[i+s]=t[o],s++},Y.getProperty=function(t){return{"line.separator":"\n"}[t]},e(k.prototype,{getY:function(){var t=this.y/this.w;if(s.isNaN(t)||s.isInfinite(t))throw new A;return t},getX:function(){var t=this.x/this.w;if(s.isNaN(t)||s.isInfinite(t))throw new A;return t},getCoordinate:function(){var t=new E;return t.x=this.getX(),t.y=this.getY(),t},interfaces_:function(){return[]},getClass:function(){return k}}),k.intersection=function(t,e,n,i){var r=t.y-e.y,o=e.x-t.x,a=t.x*e.y-e.x*t.y,u=n.y-i.y,l=i.x-n.x,h=n.x*i.y-i.x*n.y,c=r*l-u*o,f=(o*h-l*a)/c,g=(u*a-r*h)/c;if(s.isNaN(f)||s.isInfinite(f)||s.isNaN(g)||s.isInfinite(g))throw new A;return new E(f,g)},e(U.prototype,{interfaces_:function(){return[]},getClass:function(){return U}}),U.log10=function(t){var e=Math.log(t);return s.isInfinite(e)?e:s.isNaN(e)?e:e/U.LOG_10},U.min=function(t,e,n,i){var r=t;return e<r&&(r=e),n<r&&(r=n),i<r&&(r=i),r},U.clamp=function(){if("number"==typeof arguments[2]&&"number"==typeof arguments[0]&&"number"==typeof arguments[1]){var t=arguments[0],e=arguments[1],n=arguments[2];return t<e?e:t>n?n:t}if(Number.isInteger(arguments[2])&&Number.isInteger(arguments[0])&&Number.isInteger(arguments[1])){var i=arguments[0],r=arguments[1],s=arguments[2];return i<r?r:i>s?s:i}},U.wrap=function(t,e){return t<0?e- -t%e:t%e},U.max=function(){if(3===arguments.length){var t=arguments[0],e=arguments[1],n=arguments[2];return e>(i=t)&&(i=e),n>i&&(i=n),i}if(4===arguments.length){var i,r=arguments[0],s=arguments[1],o=arguments[2],a=arguments[3];return s>(i=r)&&(i=s),o>i&&(i=o),a>i&&(i=a),i}},U.average=function(t,e){return(t+e)/2},U.LOG_10=Math.log(10),e(X.prototype,{interfaces_:function(){return[]},getClass:function(){return X}}),X.segmentToSegment=function(t,e,n,i){if(t.equals(e))return X.pointToSegment(t,n,i);if(n.equals(i))return X.pointToSegment(i,t,e);var r=!1;if(M.intersects(t,e,n,i)){var s=(e.x-t.x)*(i.y-n.y)-(e.y-t.y)*(i.x-n.x);if(0===s)r=!0;else{var o=(t.y-n.y)*(i.x-n.x)-(t.x-n.x)*(i.y-n.y),a=((t.y-n.y)*(e.x-t.x)-(t.x-n.x)*(e.y-t.y))/s,u=o/s;(u<0||u>1||a<0||a>1)&&(r=!0)}}else r=!0;return r?U.min(X.pointToSegment(t,n,i),X.pointToSegment(e,n,i),X.pointToSegment(n,t,e),X.pointToSegment(i,t,e)):0},X.pointToSegment=function(t,e,n){if(e.x===n.x&&e.y===n.y)return t.distance(e);var i=(n.x-e.x)*(n.x-e.x)+(n.y-e.y)*(n.y-e.y),r=((t.x-e.x)*(n.x-e.x)+(t.y-e.y)*(n.y-e.y))/i;if(r<=0)return t.distance(e);if(r>=1)return t.distance(n);var s=((e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y))/i;return Math.abs(s)*Math.sqrt(i)},X.pointToLinePerpendicular=function(t,e,n){var i=(n.x-e.x)*(n.x-e.x)+(n.y-e.y)*(n.y-e.y),r=((e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y))/i;return Math.abs(r)*Math.sqrt(i)},X.pointToSegmentString=function(t,e){if(0===e.length)throw new i("Line array must contain at least one vertex");for(var n=t.distance(e[0]),r=0;r<e.length-1;r++){var s=X.pointToSegment(t,e[r],e[r+1]);s<n&&(n=s)}return n},e(H.prototype,{setOrdinate:function(t,e,n){},size:function(){},getOrdinate:function(t,e){},getCoordinate:function(){},getCoordinateCopy:function(t){},getDimension:function(){},getX:function(t){},expandEnvelope:function(t){},copy:function(){},getY:function(t){},toCoordinateArray:function(){},interfaces_:function(){return[d]},getClass:function(){return H}}),H.X=0,H.Y=1,H.Z=2,H.M=3,e(W.prototype,{create:function(){1===arguments.length?arguments[0]instanceof Array||N(arguments[0],H):arguments.length},interfaces_:function(){return[]},getClass:function(){return W}}),e(j.prototype,{filter:function(t){},interfaces_:function(){return[]},getClass:function(){return j}}),e(K.prototype,{isGeometryCollection:function(){return this.getTypeCode()===K.TYPECODE_GEOMETRYCOLLECTION},getFactory:function(){return this._factory},getGeometryN:function(t){return this},getArea:function(){return 0},isRectangle:function(){return!1},equals:function(){if(arguments[0]instanceof K){var t=arguments[0];return null!==t&&this.equalsTopo(t)}if(arguments[0]instanceof Object){var e=arguments[0];if(!(e instanceof K))return!1;var n=e;return this.equalsExact(n)}},equalsExact:function(t){return this===t||this.equalsExact(t,0)},geometryChanged:function(){this.apply(K.geometryChangedFilter)},geometryChangedAction:function(){this._envelope=null},equalsNorm:function(t){return null!==t&&this.norm().equalsExact(t.norm())},getLength:function(){return 0},getNumGeometries:function(){return 1},compareTo:function(){if(1===arguments.length){var t=arguments[0],e=t;return this.getTypeCode()!==e.getTypeCode()?this.getTypeCode()-e.getTypeCode():this.isEmpty()&&e.isEmpty()?0:this.isEmpty()?-1:e.isEmpty()?1:this.compareToSameClass(t)}if(2===arguments.length){var n=arguments[0],i=arguments[1];e=n;return this.getTypeCode()!==e.getTypeCode()?this.getTypeCode()-e.getTypeCode():this.isEmpty()&&e.isEmpty()?0:this.isEmpty()?-1:e.isEmpty()?1:this.compareToSameClass(n,i)}},getUserData:function(){return this._userData},getSRID:function(){return this._SRID},getEnvelope:function(){return this.getFactory().toGeometry(this.getEnvelopeInternal())},checkNotGeometryCollection:function(t){if(t.getTypeCode()===K.TYPECODE_GEOMETRYCOLLECTION)throw new i("This method does not support GeometryCollection arguments")},equal:function(t,e,n){return 0===n?t.equals(e):t.distance(e)<=n},norm:function(){var t=this.copy();return t.normalize(),t},getPrecisionModel:function(){return this._factory.getPrecisionModel()},getEnvelopeInternal:function(){return null===this._envelope&&(this._envelope=this.computeEnvelopeInternal()),new M(this._envelope)},setSRID:function(t){this._SRID=t},setUserData:function(t){this._userData=t},compare:function(t,e){for(var n=t.iterator(),i=e.iterator();n.hasNext()&&i.hasNext();){var r=n.next(),s=i.next(),o=r.compareTo(s);if(0!==o)return o}return n.hasNext()?1:i.hasNext()?-1:0},hashCode:function(){return this.getEnvelopeInternal().hashCode()},isGeometryCollectionOrDerived:function(){return this.getTypeCode()===K.TYPECODE_GEOMETRYCOLLECTION||this.getTypeCode()===K.TYPECODE_MULTIPOINT||this.getTypeCode()===K.TYPECODE_MULTILINESTRING||this.getTypeCode()===K.TYPECODE_MULTIPOLYGON},interfaces_:function(){return[d,g,p]},getClass:function(){return K}}),K.hasNonEmptyElements=function(t){for(var e=0;e<t.length;e++)if(!t[e].isEmpty())return!0;return!1},K.hasNullElements=function(t){for(var e=0;e<t.length;e++)if(null===t[e])return!0;return!1},K.serialVersionUID=0x799ea46522854c00,K.TYPECODE_POINT=0,K.TYPECODE_MULTIPOINT=1,K.TYPECODE_LINESTRING=2,K.TYPECODE_LINEARRING=3,K.TYPECODE_MULTILINESTRING=4,K.TYPECODE_POLYGON=5,K.TYPECODE_MULTIPOLYGON=6,K.TYPECODE_GEOMETRYCOLLECTION=7,K.TYPENAME_POINT="Point",K.TYPENAME_MULTIPOINT="MultiPoint",K.TYPENAME_LINESTRING="LineString",K.TYPENAME_LINEARRING="LinearRing",K.TYPENAME_MULTILINESTRING="MultiLineString",K.TYPENAME_POLYGON="Polygon",K.TYPENAME_MULTIPOLYGON="MultiPolygon",K.TYPENAME_GEOMETRYCOLLECTION="GeometryCollection",K.geometryChangedFilter={interfaces_:function(){return[j]},filter:function(t){t.geometryChangedAction()}},e(Z.prototype,{filter:function(t){},interfaces_:function(){return[]},getClass:function(){return Z}}),e(Q.prototype,{isInBoundary:function(t){},interfaces_:function(){return[]},getClass:function(){return Q}}),e(J.prototype,{isInBoundary:function(t){return t%2==1},interfaces_:function(){return[Q]},getClass:function(){return J}}),e($.prototype,{isInBoundary:function(t){return t>0},interfaces_:function(){return[Q]},getClass:function(){return $}}),e(tt.prototype,{isInBoundary:function(t){return t>1},interfaces_:function(){return[Q]},getClass:function(){return tt}}),e(et.prototype,{isInBoundary:function(t){return 1===t},interfaces_:function(){return[Q]},getClass:function(){return et}}),Q.Mod2BoundaryNodeRule=J,Q.EndPointBoundaryNodeRule=$,Q.MultiValentEndPointBoundaryNodeRule=tt,Q.MonoValentEndPointBoundaryNodeRule=et,Q.MOD2_BOUNDARY_RULE=new J,Q.ENDPOINT_BOUNDARY_RULE=new $,Q.MULTIVALENT_ENDPOINT_BOUNDARY_RULE=new tt,Q.MONOVALENT_ENDPOINT_BOUNDARY_RULE=new et,Q.OGC_SFS_BOUNDARY_RULE=Q.MOD2_BOUNDARY_RULE,e(nt.prototype,{interfaces_:function(){return[]},getClass:function(){return nt}}),nt.isRing=function(t){return!(t.length<4)&&!!t[0].equals2D(t[t.length-1])},nt.ptNotInList=function(t,e){for(var n=0;n<t.length;n++){var i=t[n];if(nt.indexOf(i,e)<0)return i}return null},nt.scroll=function(t,e){var n=nt.indexOf(e,t);if(n<0)return null;var i=new Array(t.length).fill(null);Y.arraycopy(t,n,i,0,t.length-n),Y.arraycopy(t,0,i,t.length-n,n),Y.arraycopy(i,0,t,0,t.length)},nt.equals=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1];if(t===e)return!0;if(null===t||null===e)return!1;if(t.length!==e.length)return!1;for(var n=0;n<t.length;n++)if(!t[n].equals(e[n]))return!1;return!0}if(3===arguments.length){var i=arguments[0],r=arguments[1],s=arguments[2];if(i===r)return!0;if(null===i||null===r)return!1;if(i.length!==r.length)return!1;for(n=0;n<i.length;n++)if(0!==s.compare(i[n],r[n]))return!1;return!0}},nt.intersection=function(t,e){for(var n=new b,i=0;i<t.length;i++)e.intersects(t[i])&&n.add(t[i],!0);return n.toCoordinateArray()},nt.hasRepeatedPoints=function(t){for(var e=1;e<t.length;e++)if(t[e-1].equals(t[e]))return!0;return!1},nt.removeRepeatedPoints=function(t){return nt.hasRepeatedPoints(t)?new b(t,!1).toCoordinateArray():t},nt.reverse=function(t){for(var e=t.length-1,n=Math.trunc(e/2),i=0;i<=n;i++){var r=t[i];t[i]=t[e-i],t[e-i]=r}},nt.removeNull=function(t){for(var e=0,n=0;n<t.length;n++)null!==t[n]&&e++;var i=new Array(e).fill(null);if(0===e)return i;var r=0;for(n=0;n<t.length;n++)null!==t[n]&&(i[r++]=t[n]);return i},nt.copyDeep=function(){if(1===arguments.length){for(var t=arguments[0],e=new Array(t.length).fill(null),n=0;n<t.length;n++)e[n]=new E(t[n]);return e}if(5===arguments.length){var i=arguments[0],r=arguments[1],s=arguments[2],o=arguments[3],a=arguments[4];for(n=0;n<a;n++)s[o+n]=new E(i[r+n])}},nt.isEqualReversed=function(t,e){for(var n=0;n<t.length;n++){var i=t[n],r=e[t.length-n-1];if(0!==i.compareTo(r))return!1}return!0},nt.envelope=function(t){for(var e=new M,n=0;n<t.length;n++)e.expandToInclude(t[n]);return e},nt.toCoordinateArray=function(t){return t.toArray(nt.coordArrayType)},nt.atLeastNCoordinatesOrNothing=function(t,e){return e.length>=t?e:[]},nt.indexOf=function(t,e){for(var n=0;n<e.length;n++)if(t.equals(e[n]))return n;return-1},nt.increasingDirection=function(t){for(var e=0;e<Math.trunc(t.length/2);e++){var n=t.length-1-e,i=t[e].compareTo(t[n]);if(0!==i)return i}return 1},nt.compare=function(t,e){for(var n=0;n<t.length&&n<e.length;){var i=t[n].compareTo(e[n]);if(0!==i)return i;n++}return n<e.length?-1:n<t.length?1:0},nt.minCoordinate=function(t){for(var e=null,n=0;n<t.length;n++)(null===e||e.compareTo(t[n])>0)&&(e=t[n]);return e},nt.extract=function(t,e,n){e=U.clamp(e,0,t.length);var i=(n=U.clamp(n,-1,t.length))-e+1;n<0&&(i=0),e>=t.length&&(i=0),n<e&&(i=0);var r=new Array(i).fill(null);if(0===i)return r;for(var s=0,o=e;o<=n;o++)r[s++]=t[o];return r},e(it.prototype,{compare:function(t,e){var n=t,i=e;return nt.compare(n,i)},interfaces_:function(){return[_]},getClass:function(){return it}}),e(rt.prototype,{compare:function(t,e){var n=t,i=e;if(n.length<i.length)return-1;if(n.length>i.length)return 1;if(0===n.length)return 0;var r=nt.compare(n,i);return nt.isEqualReversed(n,i)?0:r},OLDcompare:function(t,e){var n=t,i=e;if(n.length<i.length)return-1;if(n.length>i.length)return 1;if(0===n.length)return 0;for(var r=nt.increasingDirection(n),s=nt.increasingDirection(i),o=r>0?0:n.length-1,a=s>0?0:n.length-1,u=0;u<n.length;u++){var l=n[o].compareTo(i[a]);if(0!==l)return l;o+=r,a+=s}return 0},interfaces_:function(){return[_]},getClass:function(){return rt}}),nt.ForwardComparator=it,nt.BidirectionalComparator=rt,nt.coordArrayType=new Array(0).fill(null),st.prototype.get=function(){},st.prototype.put=function(){},st.prototype.size=function(){},st.prototype.values=function(){},st.prototype.entrySet=function(){},ot.prototype=new st,at.prototype=new S,at.prototype.contains=function(){},ut.prototype=new at,ut.prototype.contains=function(t){for(var e=0,n=this.array_.length;e<n;e++){if(this.array_[e]===t)return!0}return!1},ut.prototype.add=function(t){return!this.contains(t)&&(this.array_.push(t),!0)},ut.prototype.addAll=function(t){for(var e=t.iterator();e.hasNext();)this.add(e.next());return!0},ut.prototype.remove=function(t){throw new javascript.util.OperationNotSupported},ut.prototype.size=function(){return this.array_.length},ut.prototype.isEmpty=function(){return 0===this.array_.length},ut.prototype.toArray=function(){for(var t=[],e=0,n=this.array_.length;e<n;e++)t.push(this.array_[e]);return t},ut.prototype.iterator=function(){return new lt(this)};var lt=function(t){this.hashSet_=t,this.position_=0};lt.prototype.next=function(){if(this.position_===this.hashSet_.size())throw new R;return this.hashSet_.array_[this.position_++]},lt.prototype.hasNext=function(){return this.position_<this.hashSet_.size()},lt.prototype.remove=function(){throw new T};var ht=0;function ct(t){return null==t?ht:t.color}function ft(t){return null==t?null:t.parent}function gt(t,e){null!==t&&(t.color=e)}function dt(t){return null==t?null:t.left}function _t(t){return null==t?null:t.right}function pt(){this.root_=null,this.size_=0}function mt(){}function vt(){}function yt(){this.array_=[],arguments[0]instanceof S&&this.addAll(arguments[0])}pt.prototype=new ot,pt.prototype.get=function(t){for(var e=this.root_;null!==e;){var n=t.compareTo(e.key);if(n<0)e=e.left;else{if(!(n>0))return e.value;e=e.right}}return null},pt.prototype.put=function(t,e){if(null===this.root_)return this.root_={key:t,value:e,left:null,right:null,parent:null,color:ht,getValue:function(){return this.value},getKey:function(){return this.key}},this.size_=1,null;var n,i,r=this.root_;do{if(n=r,(i=t.compareTo(r.key))<0)r=r.left;else{if(!(i>0)){var s=r.value;return r.value=e,s}r=r.right}}while(null!==r);var o={key:t,left:null,right:null,value:e,parent:n,color:ht,getValue:function(){return this.value},getKey:function(){return this.key}};return i<0?n.left=o:n.right=o,this.fixAfterInsertion(o),this.size_++,null},pt.prototype.fixAfterInsertion=function(t){for(t.color=1;null!=t&&t!=this.root_&&1==t.parent.color;){var e;if(ft(t)==dt(ft(ft(t))))1==ct(e=_t(ft(ft(t))))?(gt(ft(t),ht),gt(e,ht),gt(ft(ft(t)),1),t=ft(ft(t))):(t==_t(ft(t))&&(t=ft(t),this.rotateLeft(t)),gt(ft(t),ht),gt(ft(ft(t)),1),this.rotateRight(ft(ft(t))));else 1==ct(e=dt(ft(ft(t))))?(gt(ft(t),ht),gt(e,ht),gt(ft(ft(t)),1),t=ft(ft(t))):(t==dt(ft(t))&&(t=ft(t),this.rotateRight(t)),gt(ft(t),ht),gt(ft(ft(t)),1),this.rotateLeft(ft(ft(t))))}this.root_.color=ht},pt.prototype.values=function(){var t=new P,e=this.getFirstEntry();if(null!==e)for(t.add(e.value);null!==(e=pt.successor(e));)t.add(e.value);return t},pt.prototype.entrySet=function(){var t=new ut,e=this.getFirstEntry();if(null!==e)for(t.add(e);null!==(e=pt.successor(e));)t.add(e);return t},pt.prototype.rotateLeft=function(t){if(null!=t){var e=t.right;t.right=e.left,null!=e.left&&(e.left.parent=t),e.parent=t.parent,null==t.parent?this.root_=e:t.parent.left==t?t.parent.left=e:t.parent.right=e,e.left=t,t.parent=e}},pt.prototype.rotateRight=function(t){if(null!=t){var e=t.left;t.left=e.right,null!=e.right&&(e.right.parent=t),e.parent=t.parent,null==t.parent?this.root_=e:t.parent.right==t?t.parent.right=e:t.parent.left=e,e.right=t,t.parent=e}},pt.prototype.getFirstEntry=function(){var t=this.root_;if(null!=t)for(;null!=t.left;)t=t.left;return t},pt.successor=function(t){if(null===t)return null;if(null!==t.right){for(var e=t.right;null!==e.left;)e=e.left;return e}e=t.parent;for(var n=t;null!==e&&n===e.right;)n=e,e=e.parent;return e},pt.prototype.size=function(){return this.size_},e(mt.prototype,{interfaces_:function(){return[]},getClass:function(){return mt}}),vt.prototype=new at,yt.prototype=new vt,yt.prototype.contains=function(t){for(var e=0,n=this.array_.length;e<n;e++){if(0===this.array_[e].compareTo(t))return!0}return!1},yt.prototype.add=function(t){if(this.contains(t))return!1;for(var e=0,n=this.array_.length;e<n;e++){if(1===this.array_[e].compareTo(t))return this.array_.splice(e,0,t),!0}return this.array_.push(t),!0},yt.prototype.addAll=function(t){for(var e=t.iterator();e.hasNext();)this.add(e.next());return!0},yt.prototype.remove=function(t){throw new T},yt.prototype.size=function(){return this.array_.length},yt.prototype.isEmpty=function(){return 0===this.array_.length},yt.prototype.toArray=function(){for(var t=[],e=0,n=this.array_.length;e<n;e++)t.push(this.array_[e]);return t},yt.prototype.iterator=function(){return new Et(this)};var xt,Et=function(t){this.treeSet_=t,this.position_=0};function It(){}function Nt(){}function Ct(){}function St(){}function Lt(){this._geometries=null;var t=arguments[0],e=arguments[1];if(K.call(this,e),null===t&&(t=[]),K.hasNullElements(t))throw new i("geometries must not contain null elements");this._geometries=t}function wt(){var t=arguments[0],e=arguments[1];Lt.call(this,t,e)}function Rt(){if(this._geom=null,this._geomFact=null,this._bnRule=null,this._endpointMap=null,1===arguments.length){var t=arguments[0];Rt.call(this,t,Q.MOD2_BOUNDARY_RULE)}else if(2===arguments.length){var e=arguments[0],n=arguments[1];this._geom=e,this._geomFact=e.getFactory(),this._bnRule=n}}function Tt(){this.count=null}function Pt(){}function Ot(){}function bt(){}function Mt(t){this.str=t}function Dt(){}function At(){this._points=null;var t=arguments[0],e=arguments[1];K.call(this,e),this.init(t)}function Ft(){}function Gt(){this._coordinates=null;var t=arguments[0],e=arguments[1];K.call(this,e),this.init(t)}function qt(){}function Bt(){}function Vt(){this._shell=null,this._holes=null;var t=arguments[0],e=arguments[1],n=arguments[2];if(K.call(this,n),null===t&&(t=this.getFactory().createLinearRing()),null===e&&(e=[]),K.hasNullElements(e))throw new i("holes must not contain null elements");if(t.isEmpty()&&K.hasNonEmptyElements(e))throw new i("shell is empty but holes are not");this._shell=t,this._holes=e}function zt(){var t=arguments[0],e=arguments[1];Lt.call(this,t,e)}function Yt(){if(arguments[0]instanceof Array&&arguments[1]instanceof se){var t=arguments[0],e=arguments[1];Yt.call(this,e.getCoordinateSequenceFactory().create(t),e)}else if(N(arguments[0],H)&&arguments[1]instanceof se){var n=arguments[0],i=arguments[1];At.call(this,n,i),this.validateConstruction()}}function kt(){var t=arguments[0],e=arguments[1];Lt.call(this,t,e)}function Ut(){if(this._factory=null,this._isUserDataCopied=!1,0===arguments.length);else if(1===arguments.length){var t=arguments[0];this._factory=t}}function Xt(){}function Ht(){}function Wt(){}function jt(){}function Kt(){if(this._dimension=3,this._coordinates=null,1===arguments.length){if(arguments[0]instanceof Array){var t=arguments[0];Kt.call(this,t,3)}else if(Number.isInteger(arguments[0])){var e=arguments[0];this._coordinates=new Array(e).fill(null);for(var n=0;n<e;n++)this._coordinates[n]=new E}else if(N(arguments[0],H)){var i=arguments[0];if(null===i)return this._coordinates=new Array(0).fill(null),null;this._dimension=i.getDimension(),this._coordinates=new Array(i.size()).fill(null);for(n=0;n<this._coordinates.length;n++)this._coordinates[n]=i.getCoordinateCopy(n)}}else if(2===arguments.length)if(arguments[0]instanceof Array&&Number.isInteger(arguments[1])){var r=arguments[0],s=arguments[1];this._coordinates=r,this._dimension=s,null===r&&(this._coordinates=new Array(0).fill(null))}else if(Number.isInteger(arguments[0])&&Number.isInteger(arguments[1])){var o=arguments[0],a=arguments[1];this._coordinates=new Array(o).fill(null),this._dimension=a;for(n=0;n<o;n++)this._coordinates[n]=new E}}function Zt(){}Et.prototype.next=function(){if(this.position_===this.treeSet_.size())throw new R;return this.treeSet_.array_[this.position_++]},Et.prototype.hasNext=function(){return this.position_<this.treeSet_.size()},Et.prototype.remove=function(){throw new T},It.sort=function(){var t,e,n,i,r=arguments[0];if(1===arguments.length)return i=function(t,e){return t.compareTo(e)},void r.sort(i);if(2===arguments.length)n=arguments[1],i=function(t,e){return n.compare(t,e)},r.sort(i);else{if(3===arguments.length){(e=r.slice(arguments[1],arguments[2])).sort();var s=r.slice(0,arguments[1]).concat(e,r.slice(arguments[2],r.length));for(r.splice(0,r.length),t=0;t<s.length;t++)r.push(s[t]);return}if(4===arguments.length){for(e=r.slice(arguments[1],arguments[2]),n=arguments[3],i=function(t,e){return n.compare(t,e)},e.sort(i),s=r.slice(0,arguments[1]).concat(e,r.slice(arguments[2],r.length)),r.splice(0,r.length),t=0;t<s.length;t++)r.push(s[t]);return}}},It.asList=function(t){for(var e=new P,n=0,i=t.length;n<i;n++)e.add(t[n]);return e},e(Nt.prototype,{interfaces_:function(){return[]},getClass:function(){return Nt}}),Nt.toDimensionSymbol=function(t){switch(t){case Nt.FALSE:return Nt.SYM_FALSE;case Nt.TRUE:return Nt.SYM_TRUE;case Nt.DONTCARE:return Nt.SYM_DONTCARE;case Nt.P:return Nt.SYM_P;case Nt.L:return Nt.SYM_L;case Nt.A:return Nt.SYM_A}throw new i("Unknown dimension value: "+t)},Nt.toDimensionValue=function(t){switch(q.toUpperCase(t)){case Nt.SYM_FALSE:return Nt.FALSE;case Nt.SYM_TRUE:return Nt.TRUE;case Nt.SYM_DONTCARE:return Nt.DONTCARE;case Nt.SYM_P:return Nt.P;case Nt.SYM_L:return Nt.L;case Nt.SYM_A:return Nt.A}throw new i("Unknown dimension symbol: "+t)},Nt.P=0,Nt.L=1,Nt.A=2,Nt.FALSE=-1,Nt.TRUE=-2,Nt.DONTCARE=-3,Nt.SYM_FALSE="F",Nt.SYM_TRUE="T",Nt.SYM_DONTCARE="*",Nt.SYM_P="0",Nt.SYM_L="1",Nt.SYM_A="2",e(Ct.prototype,{filter:function(t){},interfaces_:function(){return[]},getClass:function(){return Ct}}),e(St.prototype,{filter:function(t,e){},isDone:function(){},isGeometryChanged:function(){},interfaces_:function(){return[]},getClass:function(){return St}}),v(Lt,K),e(Lt.prototype,{computeEnvelopeInternal:function(){for(var t=new M,e=0;e<this._geometries.length;e++)t.expandToInclude(this._geometries[e].getEnvelopeInternal());return t},getGeometryN:function(t){return this._geometries[t]},getCoordinates:function(){for(var t=new Array(this.getNumPoints()).fill(null),e=-1,n=0;n<this._geometries.length;n++)for(var i=this._geometries[n].getCoordinates(),r=0;r<i.length;r++)t[++e]=i[r];return t},getArea:function(){for(var t=0,e=0;e<this._geometries.length;e++)t+=this._geometries[e].getArea();return t},equalsExact:function(){if(2===arguments.length&&"number"==typeof arguments[1]&&arguments[0]instanceof K){var t=arguments[0],e=arguments[1];if(!this.isEquivalentClass(t))return!1;var n=t;if(this._geometries.length!==n._geometries.length)return!1;for(var i=0;i<this._geometries.length;i++)if(!this._geometries[i].equalsExact(n._geometries[i],e))return!1;return!0}return K.prototype.equalsExact.apply(this,arguments)},normalize:function(){for(var t=0;t<this._geometries.length;t++)this._geometries[t].normalize();It.sort(this._geometries)},getCoordinate:function(){return this.isEmpty()?null:this._geometries[0].getCoordinate()},getBoundaryDimension:function(){for(var t=Nt.FALSE,e=0;e<this._geometries.length;e++)t=Math.max(t,this._geometries[e].getBoundaryDimension());return t},getTypeCode:function(){return K.TYPECODE_GEOMETRYCOLLECTION},getDimension:function(){for(var t=Nt.FALSE,e=0;e<this._geometries.length;e++)t=Math.max(t,this._geometries[e].getDimension());return t},getLength:function(){for(var t=0,e=0;e<this._geometries.length;e++)t+=this._geometries[e].getLength();return t},getNumPoints:function(){for(var t=0,e=0;e<this._geometries.length;e++)t+=this._geometries[e].getNumPoints();return t},getNumGeometries:function(){return this._geometries.length},reverse:function(){for(var t=this._geometries.length,e=new Array(t).fill(null),n=0;n<this._geometries.length;n++)e[n]=this._geometries[n].reverse();return this.getFactory().createGeometryCollection(e)},compareToSameClass:function(){if(1===arguments.length){var t=arguments[0],e=new yt(It.asList(this._geometries)),n=new yt(It.asList(t._geometries));return this.compare(e,n)}if(2===arguments.length){for(var i=arguments[0],r=arguments[1],s=i,o=this.getNumGeometries(),a=s.getNumGeometries(),u=0;u<o&&u<a;){var l=this.getGeometryN(u),h=s.getGeometryN(u),c=l.compareToSameClass(h,r);if(0!==c)return c;u++}return u<o?1:u<a?-1:0}},apply:function(){if(N(arguments[0],Z))for(var t=arguments[0],e=0;e<this._geometries.length;e++)this._geometries[e].apply(t);else if(N(arguments[0],St)){var n=arguments[0];if(0===this._geometries.length)return null;for(e=0;e<this._geometries.length&&(this._geometries[e].apply(n),!n.isDone());e++);n.isGeometryChanged()&&this.geometryChanged()}else if(N(arguments[0],Ct)){var i=arguments[0];i.filter(this);for(e=0;e<this._geometries.length;e++)this._geometries[e].apply(i)}else if(N(arguments[0],j)){var r=arguments[0];r.filter(this);for(e=0;e<this._geometries.length;e++)this._geometries[e].apply(r)}},getBoundary:function(){return this.checkNotGeometryCollection(this),x.shouldNeverReachHere(),null},getGeometryType:function(){return K.TYPENAME_GEOMETRYCOLLECTION},copy:function(){for(var t=new Array(this._geometries.length).fill(null),e=0;e<t.length;e++)t[e]=this._geometries[e].copy();return new Lt(t,this._factory)},isEmpty:function(){for(var t=0;t<this._geometries.length;t++)if(!this._geometries[t].isEmpty())return!1;return!0},interfaces_:function(){return[]},getClass:function(){return Lt}}),Lt.serialVersionUID=-0x4f07bcb1f857d800,v(wt,Lt),e(wt.prototype,{equalsExact:function(){if(2===arguments.length&&"number"==typeof arguments[1]&&arguments[0]instanceof K){var t=arguments[0],e=arguments[1];return!!this.isEquivalentClass(t)&&Lt.prototype.equalsExact.call(this,t,e)}return Lt.prototype.equalsExact.apply(this,arguments)},getBoundaryDimension:function(){return this.isClosed()?Nt.FALSE:0},isClosed:function(){if(this.isEmpty())return!1;for(var t=0;t<this._geometries.length;t++)if(!this._geometries[t].isClosed())return!1;return!0},getTypeCode:function(){return K.TYPECODE_MULTILINESTRING},getDimension:function(){return 1},reverse:function(){for(var t=this._geometries.length,e=new Array(t).fill(null),n=0;n<this._geometries.length;n++)e[t-1-n]=this._geometries[n].reverse();return this.getFactory().createMultiLineString(e)},getBoundary:function(){return new Rt(this).getBoundary()},getGeometryType:function(){return K.TYPENAME_MULTILINESTRING},copy:function(){for(var t=new Array(this._geometries.length).fill(null),e=0;e<t.length;e++)t[e]=this._geometries[e].copy();return new wt(t,this._factory)},interfaces_:function(){return[mt]},getClass:function(){return wt}}),wt.serialVersionUID=0x7155d2ab4afa8000,e(Rt.prototype,{boundaryMultiLineString:function(t){if(this._geom.isEmpty())return this.getEmptyMultiPoint();var e=this.computeBoundaryCoordinates(t);return 1===e.length?this._geomFact.createPoint(e[0]):this._geomFact.createMultiPointFromCoords(e)},getBoundary:function(){return this._geom instanceof At?this.boundaryLineString(this._geom):this._geom instanceof wt?this.boundaryMultiLineString(this._geom):this._geom.getBoundary()},boundaryLineString:function(t){return this._geom.isEmpty()?this.getEmptyMultiPoint():t.isClosed()?this._bnRule.isInBoundary(2)?t.getStartPoint():this._geomFact.createMultiPoint():this._geomFact.createMultiPoint([t.getStartPoint(),t.getEndPoint()])},getEmptyMultiPoint:function(){return this._geomFact.createMultiPoint()},computeBoundaryCoordinates:function(t){var e=new P;this._endpointMap=new pt;for(var n=0;n<t.getNumGeometries();n++){var i=t.getGeometryN(n);0!==i.getNumPoints()&&(this.addEndpoint(i.getCoordinateN(0)),this.addEndpoint(i.getCoordinateN(i.getNumPoints()-1)))}for(var r=this._endpointMap.entrySet().iterator();r.hasNext();){var s=r.next(),o=s.getValue().count;this._bnRule.isInBoundary(o)&&e.add(s.getKey())}return nt.toCoordinateArray(e)},addEndpoint:function(t){var e=this._endpointMap.get(t);null===e&&(e=new Tt,this._endpointMap.put(t,e)),e.count++},interfaces_:function(){return[]},getClass:function(){return Rt}}),Rt.getBoundary=function(){return 1===arguments.length?new Rt(arguments[0]).getBoundary():2===arguments.length?new Rt(arguments[0],arguments[1]).getBoundary():void 0},e(Tt.prototype,{interfaces_:function(){return[]},getClass:function(){return Tt}}),e(Pt.prototype,{interfaces_:function(){return[]},getClass:function(){return Pt}}),Pt.ofLine=function(t){var e=t.size();if(e<=1)return 0;var n=0,i=new E;t.getCoordinate(0,i);for(var r=i.x,s=i.y,o=1;o<e;o++){t.getCoordinate(o,i);var a=i.x,u=i.y,l=a-r,h=u-s;n+=Math.sqrt(l*l+h*h),r=a,s=u}return n},e(bt.prototype,{interfaces_:function(){return[]},getClass:function(){return bt}}),bt.chars=function(t,e){for(var n=new Array(e).fill(null),i=0;i<e;i++)n[i]=t;return new String(n)},bt.getStackTrace=function(){if(1===arguments.length){var t=arguments[0],e=new function(){},n=new function(){}(e);return t.printStackTrace(n),e.toString()}if(2===arguments.length){for(var i=arguments[0],r=arguments[1],s="",o=new function(){}(new function(){}(bt.getStackTrace(i))),a=0;a<r;a++)try{s+=o.readLine()+bt.NEWLINE}catch(t){if(!(t instanceof Ot))throw t;x.shouldNeverReachHere()}return s}},bt.split=function(t,e){for(var n=e.length,i=new P,r=""+t,s=r.indexOf(e);s>=0;){var o=r.substring(0,s);i.add(o),s=(r=r.substring(s+n)).indexOf(e)}r.length>0&&i.add(r);for(var a=new Array(i.size()).fill(null),u=0;u<a.length;u++)a[u]=i.get(u);return a},bt.toString=function(){if(1===arguments.length&&"number"==typeof arguments[0]){var t=arguments[0];return bt.SIMPLE_ORDINATE_FORMAT.format(t)}},bt.spaces=function(t){return bt.chars(" ",t)},bt.NEWLINE=Y.getProperty("line.separator"),bt.SIMPLE_ORDINATE_FORMAT=new function(){}("0.#"),Mt.prototype.append=function(t){this.str+=t},Mt.prototype.setCharAt=function(t,e){this.str=this.str.substr(0,t)+e+this.str.substr(t+1)},Mt.prototype.toString=function(t){return this.str},e(Dt.prototype,{interfaces_:function(){return[]},getClass:function(){return Dt}}),Dt.copyCoord=function(t,e,n,i){for(var r=Math.min(t.getDimension(),n.getDimension()),s=0;s<r;s++)n.setOrdinate(i,s,t.getOrdinate(e,s))},Dt.isRing=function(t){var e=t.size();return 0===e||!(e<=3)&&(t.getOrdinate(0,H.X)===t.getOrdinate(e-1,H.X)&&t.getOrdinate(0,H.Y)===t.getOrdinate(e-1,H.Y))},Dt.isEqual=function(t,e){var n=t.size();if(n!==e.size())return!1;for(var i=Math.min(t.getDimension(),e.getDimension()),r=0;r<n;r++)for(var o=0;o<i;o++){var a=t.getOrdinate(r,o),u=e.getOrdinate(r,o);if(t.getOrdinate(r,o)!==e.getOrdinate(r,o)&&(!s.isNaN(a)||!s.isNaN(u)))return!1}return!0},Dt.extend=function(t,e,n){var i=t.create(n,e.getDimension()),r=e.size();if(Dt.copy(e,0,i,0,r),r>0)for(var s=r;s<n;s++)Dt.copy(e,r-1,i,s,1);return i},Dt.reverse=function(t){for(var e=t.size()-1,n=Math.trunc(e/2),i=0;i<=n;i++)Dt.swap(t,i,e-i)},Dt.swap=function(t,e,n){if(e===n)return null;for(var i=0;i<t.getDimension();i++){var r=t.getOrdinate(e,i);t.setOrdinate(e,i,t.getOrdinate(n,i)),t.setOrdinate(n,i,r)}},Dt.copy=function(t,e,n,i,r){for(var s=0;s<r;s++)Dt.copyCoord(t,e+s,n,i+s)},Dt.toString=function(){if(1===arguments.length&&N(arguments[0],H)){var t=arguments[0],e=t.size();if(0===e)return"()";var n=t.getDimension(),i=new Mt;i.append("(");for(var r=0;r<e;r++){r>0&&i.append(" ");for(var s=0;s<n;s++)s>0&&i.append(","),i.append(bt.toString(t.getOrdinate(r,s)))}return i.append(")"),i.toString()}},Dt.ensureValidRing=function(t,e){var n=e.size();return 0===n?e:n<=3?Dt.createClosedRing(t,e,4):e.getOrdinate(0,H.X)===e.getOrdinate(n-1,H.X)&&e.getOrdinate(0,H.Y)===e.getOrdinate(n-1,H.Y)?e:Dt.createClosedRing(t,e,n+1)},Dt.createClosedRing=function(t,e,n){var i=t.create(n,e.getDimension()),r=e.size();Dt.copy(e,0,i,0,r);for(var s=r;s<n;s++)Dt.copy(e,0,i,s,1);return i},v(At,K),e(At.prototype,{computeEnvelopeInternal:function(){return this.isEmpty()?new M:this._points.expandEnvelope(new M)},isRing:function(){return this.isClosed()&&this.isSimple()},getCoordinates:function(){return this._points.toCoordinateArray()},equalsExact:function(){if(2===arguments.length&&"number"==typeof arguments[1]&&arguments[0]instanceof K){var t=arguments[0],e=arguments[1];if(!this.isEquivalentClass(t))return!1;var n=t;if(this._points.size()!==n._points.size())return!1;for(var i=0;i<this._points.size();i++)if(!this.equal(this._points.getCoordinate(i),n._points.getCoordinate(i),e))return!1;return!0}return K.prototype.equalsExact.apply(this,arguments)},normalize:function(){for(var t=0;t<Math.trunc(this._points.size()/2);t++){var e=this._points.size()-1-t;if(!this._points.getCoordinate(t).equals(this._points.getCoordinate(e))){if(this._points.getCoordinate(t).compareTo(this._points.getCoordinate(e))>0){var n=this._points.copy();Dt.reverse(n),this._points=n}return null}}},getCoordinate:function(){return this.isEmpty()?null:this._points.getCoordinate(0)},getBoundaryDimension:function(){return this.isClosed()?Nt.FALSE:0},isClosed:function(){return!this.isEmpty()&&this.getCoordinateN(0).equals2D(this.getCoordinateN(this.getNumPoints()-1))},getEndPoint:function(){return this.isEmpty()?null:this.getPointN(this.getNumPoints()-1)},getTypeCode:function(){return K.TYPECODE_LINESTRING},getDimension:function(){return 1},getLength:function(){return Pt.ofLine(this._points)},getNumPoints:function(){return this._points.size()},reverse:function(){var t=this._points.copy();return Dt.reverse(t),this.getFactory().createLineString(t)},compareToSameClass:function(){if(1===arguments.length){for(var t=arguments[0],e=0,n=0;e<this._points.size()&&n<t._points.size();){var i=this._points.getCoordinate(e).compareTo(t._points.getCoordinate(n));if(0!==i)return i;e++,n++}return e<this._points.size()?1:n<t._points.size()?-1:0}if(2===arguments.length){t=arguments[0];return arguments[1].compare(this._points,t._points)}},apply:function(){if(N(arguments[0],Z))for(var t=arguments[0],e=0;e<this._points.size();e++)t.filter(this._points.getCoordinate(e));else if(N(arguments[0],St)){var n=arguments[0];if(0===this._points.size())return null;for(e=0;e<this._points.size()&&(n.filter(this._points,e),!n.isDone());e++);n.isGeometryChanged()&&this.geometryChanged()}else if(N(arguments[0],Ct)){arguments[0].filter(this)}else if(N(arguments[0],j)){arguments[0].filter(this)}},getBoundary:function(){return new Rt(this).getBoundary()},isEquivalentClass:function(t){return t instanceof At},getCoordinateN:function(t){return this._points.getCoordinate(t)},getGeometryType:function(){return K.TYPENAME_LINESTRING},copy:function(){return new At(this._points.copy(),this._factory)},getCoordinateSequence:function(){return this._points},isEmpty:function(){return 0===this._points.size()},init:function(t){if(null===t&&(t=this.getFactory().getCoordinateSequenceFactory().create([])),1===t.size())throw new i("Invalid number of points in LineString (found "+t.size()+" - must be 0 or >= 2)");this._points=t},isCoordinate:function(t){for(var e=0;e<this._points.size();e++)if(this._points.getCoordinate(e).equals(t))return!0;return!1},getStartPoint:function(){return this.isEmpty()?null:this.getPointN(0)},getPointN:function(t){return this.getFactory().createPoint(this._points.getCoordinate(t))},interfaces_:function(){return[mt]},getClass:function(){return At}}),At.serialVersionUID=0x2b2b51ba435c8e00,e(Ft.prototype,{interfaces_:function(){return[]},getClass:function(){return Ft}}),v(Gt,K),e(Gt.prototype,{computeEnvelopeInternal:function(){if(this.isEmpty())return new M;var t=new M;return t.expandToInclude(this._coordinates.getX(0),this._coordinates.getY(0)),t},getCoordinates:function(){return this.isEmpty()?[]:[this.getCoordinate()]},equalsExact:function(){if(2===arguments.length&&"number"==typeof arguments[1]&&arguments[0]instanceof K){var t=arguments[0],e=arguments[1];return!!this.isEquivalentClass(t)&&(!(!this.isEmpty()||!t.isEmpty())||this.isEmpty()===t.isEmpty()&&this.equal(t.getCoordinate(),this.getCoordinate(),e))}return K.prototype.equalsExact.apply(this,arguments)},normalize:function(){},getCoordinate:function(){return 0!==this._coordinates.size()?this._coordinates.getCoordinate(0):null},getBoundaryDimension:function(){return Nt.FALSE},getTypeCode:function(){return K.TYPECODE_POINT},getDimension:function(){return 0},getNumPoints:function(){return this.isEmpty()?0:1},reverse:function(){return this.copy()},getX:function(){if(null===this.getCoordinate())throw new IllegalStateException("getX called on empty Point");return this.getCoordinate().x},compareToSameClass:function(){if(1===arguments.length){var t=arguments[0];return this.getCoordinate().compareTo(t.getCoordinate())}if(2===arguments.length){t=arguments[0];return arguments[1].compare(this._coordinates,t._coordinates)}},apply:function(){if(N(arguments[0],Z)){var t=arguments[0];if(this.isEmpty())return null;t.filter(this.getCoordinate())}else if(N(arguments[0],St)){var e=arguments[0];if(this.isEmpty())return null;e.filter(this._coordinates,0),e.isGeometryChanged()&&this.geometryChanged()}else if(N(arguments[0],Ct)){arguments[0].filter(this)}else if(N(arguments[0],j)){arguments[0].filter(this)}},getBoundary:function(){return this.getFactory().createGeometryCollection()},getGeometryType:function(){return K.TYPENAME_POINT},copy:function(){return new Gt(this._coordinates.copy(),this._factory)},getCoordinateSequence:function(){return this._coordinates},getY:function(){if(null===this.getCoordinate())throw new IllegalStateException("getY called on empty Point");return this.getCoordinate().y},isEmpty:function(){return 0===this._coordinates.size()},init:function(t){null===t&&(t=this.getFactory().getCoordinateSequenceFactory().create([])),x.isTrue(t.size()<=1),this._coordinates=t},isSimple:function(){return!0},interfaces_:function(){return[Ft]},getClass:function(){return Gt}}),Gt.serialVersionUID=0x44077bad161cbc00,e(qt.prototype,{interfaces_:function(){return[]},getClass:function(){return qt}}),qt.ofRing=function(){if(arguments[0]instanceof Array){var t=arguments[0];return Math.abs(qt.ofRingSigned(t))}if(N(arguments[0],H)){var e=arguments[0];return Math.abs(qt.ofRingSigned(e))}},qt.ofRingSigned=function(){if(arguments[0]instanceof Array){var t=arguments[0];if(t.length<3)return 0;for(var e=0,n=t[0].x,i=1;i<t.length-1;i++){var r=t[i].x-n,s=t[i+1].y;e+=r*(t[i-1].y-s)}return e/2}if(N(arguments[0],H)){var o=arguments[0],a=o.size();if(a<3)return 0;var u=new E,l=new E,h=new E;o.getCoordinate(0,l),o.getCoordinate(1,h);n=l.x;h.x-=n;for(e=0,i=1;i<a-1;i++)u.y=l.y,l.x=h.x,l.y=h.y,o.getCoordinate(i+1,h),h.x-=n,e+=l.x*(u.y-h.y);return e/2}},e(Bt.prototype,{interfaces_:function(){return[]},getClass:function(){return Bt}}),v(Vt,K),e(Vt.prototype,{computeEnvelopeInternal:function(){return this._shell.getEnvelopeInternal()},getCoordinates:function(){if(this.isEmpty())return[];for(var t=new Array(this.getNumPoints()).fill(null),e=-1,n=this._shell.getCoordinates(),i=0;i<n.length;i++)t[++e]=n[i];for(var r=0;r<this._holes.length;r++)for(var s=this._holes[r].getCoordinates(),o=0;o<s.length;o++)t[++e]=s[o];return t},getArea:function(){var t=0;t+=qt.ofRing(this._shell.getCoordinateSequence());for(var e=0;e<this._holes.length;e++)t-=qt.ofRing(this._holes[e].getCoordinateSequence());return t},isRectangle:function(){if(0!==this.getNumInteriorRing())return!1;if(null===this._shell)return!1;if(5!==this._shell.getNumPoints())return!1;for(var t=this._shell.getCoordinateSequence(),e=this.getEnvelopeInternal(),n=0;n<5;n++){if((s=t.getX(n))!==e.getMinX()&&s!==e.getMaxX())return!1;if((o=t.getY(n))!==e.getMinY()&&o!==e.getMaxY())return!1}var i=t.getX(0),r=t.getY(0);for(n=1;n<=4;n++){var s,o;if((s=t.getX(n))!==i===((o=t.getY(n))!==r))return!1;i=s,r=o}return!0},equalsExact:function(){if(2===arguments.length&&"number"==typeof arguments[1]&&arguments[0]instanceof K){var t=arguments[0],e=arguments[1];if(!this.isEquivalentClass(t))return!1;var n=t,i=this._shell,r=n._shell;if(!i.equalsExact(r,e))return!1;if(this._holes.length!==n._holes.length)return!1;for(var s=0;s<this._holes.length;s++)if(!this._holes[s].equalsExact(n._holes[s],e))return!1;return!0}return K.prototype.equalsExact.apply(this,arguments)},normalize:function(){if(0===arguments.length){this.normalize(this._shell,!0);for(var t=0;t<this._holes.length;t++)this.normalize(this._holes[t],!1);It.sort(this._holes)}else if(2===arguments.length){var e=arguments[0],n=arguments[1];if(e.isEmpty())return null;var i=new Array(e.getCoordinates().length-1).fill(null);Y.arraycopy(e.getCoordinates(),0,i,0,i.length);var r=nt.minCoordinate(e.getCoordinates());nt.scroll(i,r),Y.arraycopy(i,0,e.getCoordinates(),0,i.length),e.getCoordinates()[i.length]=i[0],z.isCCW(e.getCoordinates())===n&&nt.reverse(e.getCoordinates())}},getCoordinate:function(){return this._shell.getCoordinate()},getNumInteriorRing:function(){return this._holes.length},getBoundaryDimension:function(){return 1},getTypeCode:function(){return K.TYPECODE_POLYGON},getDimension:function(){return 2},getLength:function(){var t=0;t+=this._shell.getLength();for(var e=0;e<this._holes.length;e++)t+=this._holes[e].getLength();return t},getNumPoints:function(){for(var t=this._shell.getNumPoints(),e=0;e<this._holes.length;e++)t+=this._holes[e].getNumPoints();return t},reverse:function(){var t=this.copy();t._shell=this._shell.copy().reverse(),t._holes=new Array(this._holes.length).fill(null);for(var e=0;e<this._holes.length;e++)t._holes[e]=this._holes[e].copy().reverse();return t},convexHull:function(){return this.getExteriorRing().convexHull()},compareToSameClass:function(){if(1===arguments.length){var t=arguments[0],e=this._shell,n=t._shell;return e.compareToSameClass(n)}if(2===arguments.length){var i=arguments[0],r=arguments[1],s=i,o=(e=this._shell,n=s._shell,e.compareToSameClass(n,r));if(0!==o)return o;for(var a=this.getNumInteriorRing(),u=s.getNumInteriorRing(),l=0;l<a&&l<u;){var h=this.getInteriorRingN(l),c=s.getInteriorRingN(l),f=h.compareToSameClass(c,r);if(0!==f)return f;l++}return l<a?1:l<u?-1:0}},apply:function(){if(N(arguments[0],Z)){var t=arguments[0];this._shell.apply(t);for(var e=0;e<this._holes.length;e++)this._holes[e].apply(t)}else if(N(arguments[0],St)){var n=arguments[0];if(this._shell.apply(n),!n.isDone())for(e=0;e<this._holes.length&&(this._holes[e].apply(n),!n.isDone());e++);n.isGeometryChanged()&&this.geometryChanged()}else if(N(arguments[0],Ct)){arguments[0].filter(this)}else if(N(arguments[0],j)){var i=arguments[0];i.filter(this),this._shell.apply(i);for(e=0;e<this._holes.length;e++)this._holes[e].apply(i)}},getBoundary:function(){if(this.isEmpty())return this.getFactory().createMultiLineString();var t=new Array(this._holes.length+1).fill(null);t[0]=this._shell;for(var e=0;e<this._holes.length;e++)t[e+1]=this._holes[e];return t.length<=1?this.getFactory().createLinearRing(t[0].getCoordinateSequence()):this.getFactory().createMultiLineString(t)},getGeometryType:function(){return K.TYPENAME_POLYGON},copy:function(){for(var t=this._shell.copy(),e=new Array(this._holes.length).fill(null),n=0;n<this._holes.length;n++)e[n]=this._holes[n].copy();return new Vt(t,e,this._factory)},getExteriorRing:function(){return this._shell},isEmpty:function(){return this._shell.isEmpty()},getInteriorRingN:function(t){return this._holes[t]},interfaces_:function(){return[Bt]},getClass:function(){return Vt}}),Vt.serialVersionUID=-0x307ffefd8dc97200,v(zt,Lt),e(zt.prototype,{isValid:function(){return!0},equalsExact:function(){if(2===arguments.length&&"number"==typeof arguments[1]&&arguments[0]instanceof K){var t=arguments[0],e=arguments[1];return!!this.isEquivalentClass(t)&&Lt.prototype.equalsExact.call(this,t,e)}return Lt.prototype.equalsExact.apply(this,arguments)},getCoordinate:function(){if(1===arguments.length&&Number.isInteger(arguments[0])){var t=arguments[0];return this._geometries[t].getCoordinate()}return Lt.prototype.getCoordinate.apply(this,arguments)},getBoundaryDimension:function(){return Nt.FALSE},getTypeCode:function(){return K.TYPECODE_MULTIPOINT},getDimension:function(){return 0},getBoundary:function(){return this.getFactory().createGeometryCollection()},getGeometryType:function(){return K.TYPENAME_MULTIPOINT},copy:function(){for(var t=new Array(this._geometries.length).fill(null),e=0;e<t.length;e++)t[e]=this._geometries[e].copy();return new zt(t,this._factory)},interfaces_:function(){return[Ft]},getClass:function(){return zt}}),zt.serialVersionUID=-0x6fb1ed4162e0fc00,v(Yt,At),e(Yt.prototype,{getBoundaryDimension:function(){return Nt.FALSE},isClosed:function(){return!!this.isEmpty()||At.prototype.isClosed.call(this)},getTypeCode:function(){return K.TYPECODE_LINEARRING},reverse:function(){var t=this._points.copy();return Dt.reverse(t),this.getFactory().createLinearRing(t)},validateConstruction:function(){if(!this.isEmpty()&&!At.prototype.isClosed.call(this))throw new i("Points of LinearRing do not form a closed linestring");if(this.getCoordinateSequence().size()>=1&&this.getCoordinateSequence().size()<Yt.MINIMUM_VALID_SIZE)throw new i("Invalid number of points in LinearRing (found "+this.getCoordinateSequence().size()+" - must be 0 or >= 4)")},getGeometryType:function(){return K.TYPENAME_LINEARRING},copy:function(){return new Yt(this._points.copy(),this._factory)},interfaces_:function(){return[]},getClass:function(){return Yt}}),Yt.MINIMUM_VALID_SIZE=4,Yt.serialVersionUID=-0x3b229e262367a600,v(kt,Lt),e(kt.prototype,{equalsExact:function(){if(2===arguments.length&&"number"==typeof arguments[1]&&arguments[0]instanceof K){var t=arguments[0],e=arguments[1];return!!this.isEquivalentClass(t)&&Lt.prototype.equalsExact.call(this,t,e)}return Lt.prototype.equalsExact.apply(this,arguments)},getBoundaryDimension:function(){return 1},getTypeCode:function(){return K.TYPECODE_MULTIPOLYGON},getDimension:function(){return 2},reverse:function(){for(var t=this._geometries.length,e=new Array(t).fill(null),n=0;n<this._geometries.length;n++)e[n]=this._geometries[n].reverse();return this.getFactory().createMultiPolygon(e)},getBoundary:function(){if(this.isEmpty())return this.getFactory().createMultiLineString();for(var t=new P,e=0;e<this._geometries.length;e++)for(var n=this._geometries[e].getBoundary(),i=0;i<n.getNumGeometries();i++)t.add(n.getGeometryN(i));var r=new Array(t.size()).fill(null);return this.getFactory().createMultiLineString(t.toArray(r))},getGeometryType:function(){return K.TYPENAME_MULTIPOLYGON},copy:function(){for(var t=new Array(this._geometries.length).fill(null),e=0;e<t.length;e++)t[e]=this._geometries[e].copy();return new kt(t,this._factory)},interfaces_:function(){return[Bt]},getClass:function(){return kt}}),kt.serialVersionUID=-0x7a5aa1369171980,e(Ut.prototype,{setCopyUserData:function(t){this._isUserDataCopied=t},edit:function(t,e){if(null===t)return null;var n=this.editInternal(t,e);return this._isUserDataCopied&&n.setUserData(t.getUserData()),n},editInternal:function(t,e){return null===this._factory&&(this._factory=t.getFactory()),t instanceof Lt?this.editGeometryCollection(t,e):t instanceof Vt?this.editPolygon(t,e):t instanceof Gt?e.edit(t,this._factory):t instanceof At?e.edit(t,this._factory):(x.shouldNeverReachHere("Unsupported Geometry class: "+t.getClass().getName()),null)},editGeometryCollection:function(t,e){for(var n=e.edit(t,this._factory),i=new P,r=0;r<n.getNumGeometries();r++){var s=this.edit(n.getGeometryN(r),e);null===s||s.isEmpty()||i.add(s)}return n.getClass()===zt?this._factory.createMultiPoint(i.toArray([])):n.getClass()===wt?this._factory.createMultiLineString(i.toArray([])):n.getClass()===kt?this._factory.createMultiPolygon(i.toArray([])):this._factory.createGeometryCollection(i.toArray([]))},editPolygon:function(t,e){var n=e.edit(t,this._factory);if(null===n&&(n=this._factory.createPolygon()),n.isEmpty())return n;var i=this.edit(n.getExteriorRing(),e);if(null===i||i.isEmpty())return this._factory.createPolygon();for(var r=new P,s=0;s<n.getNumInteriorRing();s++){var o=this.edit(n.getInteriorRingN(s),e);null===o||o.isEmpty()||r.add(o)}return this._factory.createPolygon(i,r.toArray([]))},interfaces_:function(){return[]},getClass:function(){return Ut}}),Ut.GeometryEditorOperation=Xt,e(Ht.prototype,{edit:function(t,e){return t},interfaces_:function(){return[Xt]},getClass:function(){return Ht}}),e(Wt.prototype,{edit:function(t,e){var n=this.edit(t.getCoordinates(),t);return t instanceof Yt?null===n?e.createLinearRing():e.createLinearRing(n):t instanceof At?null===n?e.createLineString():e.createLineString(n):t instanceof Gt?null===n||0===n.length?e.createPoint():e.createPoint(n[0]):t},interfaces_:function(){return[Xt]},getClass:function(){return Wt}}),e(jt.prototype,{edit:function(t,e){return t instanceof Yt?e.createLinearRing(this.edit(t.getCoordinateSequence(),t)):t instanceof At?e.createLineString(this.edit(t.getCoordinateSequence(),t)):t instanceof Gt?e.createPoint(this.edit(t.getCoordinateSequence(),t)):t},interfaces_:function(){return[Xt]},getClass:function(){return jt}}),Ut.NoOpGeometryOperation=Ht,Ut.CoordinateOperation=Wt,Ut.CoordinateSequenceOperation=jt,e(Kt.prototype,{setOrdinate:function(t,e,n){switch(e){case H.X:this._coordinates[t].x=n;break;case H.Y:this._coordinates[t].y=n;break;case H.Z:this._coordinates[t].z=n;break;default:throw new i("invalid ordinateIndex")}},size:function(){return this._coordinates.length},getOrdinate:function(t,e){switch(e){case H.X:return this._coordinates[t].x;case H.Y:return this._coordinates[t].y;case H.Z:return this._coordinates[t].z}return s.NaN},getCoordinate:function(){if(1===arguments.length){var t=arguments[0];return this._coordinates[t]}if(2===arguments.length){var e=arguments[0],n=arguments[1];n.x=this._coordinates[e].x,n.y=this._coordinates[e].y,n.z=this._coordinates[e].z}},getCoordinateCopy:function(t){return new E(this._coordinates[t])},getDimension:function(){return this._dimension},getX:function(t){return this._coordinates[t].x},expandEnvelope:function(t){for(var e=0;e<this._coordinates.length;e++)t.expandToInclude(this._coordinates[e]);return t},copy:function(){for(var t=new Array(this.size()).fill(null),e=0;e<this._coordinates.length;e++)t[e]=this._coordinates[e].copy();return new Kt(t,this._dimension)},toString:function(){if(this._coordinates.length>0){var t=new Mt(17*this._coordinates.length);t.append("("),t.append(this._coordinates[0]);for(var e=1;e<this._coordinates.length;e++)t.append(", "),t.append(this._coordinates[e]);return t.append(")"),t.toString()}return"()"},getY:function(t){return this._coordinates[t].y},toCoordinateArray:function(){return this._coordinates},interfaces_:function(){return[H,p]},getClass:function(){return Kt}}),Kt.serialVersionUID=-0xcb44a778db18e00,e(Zt.prototype,{readResolve:function(){return Zt.instance()},create:function(){if(1===arguments.length){if(arguments[0]instanceof Array)return new Kt(arguments[0]);if(N(arguments[0],H))return new Kt(arguments[0])}else if(2===arguments.length){var t=arguments[0],e=arguments[1];return e>3&&(e=3),e<2?new Kt(t):new Kt(t,e)}},interfaces_:function(){return[W,p]},getClass:function(){return Zt}}),Zt.instance=function(){return Zt.instanceObject},Zt.serialVersionUID=-0x38e49fa6cf6f2e00,Zt.instanceObject=new Zt;var Qt=Object.defineProperty;var Jt=function(t,e){function n(t){if(!this||this.constructor!==n)return new n(t);this._keys=[],this._values=[],this._itp=[],this.objectOnly=e,t&&function(t){this.add?t.forEach(this.add,this):t.forEach(function(t){this.set(t[0],t[1])},this)}.call(this,t)}e||Qt(t,"size",{get:te});return t.constructor=n,n.prototype=t,n}({delete:function(t){this.has(t)&&(this._keys.splice(xt,1),this._values.splice(xt,1),this._itp.forEach(function(t){xt<t[0]&&t[0]--}));return xt>-1},has:function(t){return function(t,e){if(this.objectOnly&&e!==Object(e))throw new TypeError("Invalid value used as weak collection key");if(e!=e||0===e)for(xt=t.length;xt--&&(n=t[xt],i=e,n!==i&&(n==n||i==i)););else xt=t.indexOf(e);var n,i;return xt>-1}.call(this,this._keys,t)},get:function(t){return this.has(t)?this._values[xt]:void 0},set:function(t,e){return this.has(t)?this._values[xt]=e:this._values[this._keys.push(t)-1]=e,this},keys:function(){return $t(this._itp,this._keys)},values:function(){return $t(this._itp,this._values)},entries:function(){return $t(this._itp,this._keys,this._values)},forEach:function(t,e){for(var n=this.entries();;){var i=n.next();if(i.done)break;t.call(e,i.value[1],i.value[0],this)}},clear:function(){(this._keys||0).length=this._values.length=0}});function $t(t,e,n){var i=[0],r=!1;return t.push(i),{next:function(){var s,o=i[0];return!r&&o<e.length?(s=n?[e[o],n[o]]:e[o],i[0]++):(r=!0,t.splice(t.indexOf(i),1)),{done:r,value:s}}}}function te(){return this._values.length}var ee="undefined"!=typeof Map&&Map.prototype.values?Map:Jt;function ne(){this.map_=new ee}function ie(){if(this._modelType=null,this._scale=null,0===arguments.length)this._modelType=ie.FLOATING;else if(1===arguments.length)if(arguments[0]instanceof re){var t=arguments[0];this._modelType=t,t===ie.FIXED&&this.setScale(1)}else if("number"==typeof arguments[0]){var e=arguments[0];this._modelType=ie.FIXED,this.setScale(e)}else if(arguments[0]instanceof ie){var n=arguments[0];this._modelType=n._modelType,this._scale=n._scale}}function re(){this._name=null;var t=arguments[0];this._name=t,re.nameToTypeMap.put(t,this)}function se(){if(this._precisionModel=null,this._coordinateSequenceFactory=null,this._SRID=null,0===arguments.length)se.call(this,new ie,0);else if(1===arguments.length){if(N(arguments[0],W)){var t=arguments[0];se.call(this,new ie,0,t)}else if(arguments[0]instanceof ie){var e=arguments[0];se.call(this,e,0,se.getDefaultCoordinateSequenceFactory())}}else if(2===arguments.length){var n=arguments[0],i=arguments[1];se.call(this,n,i,se.getDefaultCoordinateSequenceFactory())}else if(3===arguments.length){var r=arguments[0],s=arguments[1],o=arguments[2];this._precisionModel=r,this._coordinateSequenceFactory=o,this._SRID=s}}ne.prototype=new st,ne.prototype.get=function(t){return this.map_.get(t)||null},ne.prototype.put=function(t,e){return this.map_.set(t,e),e},ne.prototype.values=function(){for(var t=new P,e=this.map_.values(),n=e.next();!n.done;)t.add(n.value),n=e.next();return t},ne.prototype.entrySet=function(){var t=new ut;return this.map_.entries().forEach(function(e){return t.add(e)}),t},ne.prototype.size=function(){return this.map_.size()},e(ie.prototype,{equals:function(t){if(!(t instanceof ie))return!1;var e=t;return this._modelType===e._modelType&&this._scale===e._scale},compareTo:function(t){var e=t,n=this.getMaximumSignificantDigits(),i=e.getMaximumSignificantDigits();return new G(n).compareTo(new G(i))},getScale:function(){return this._scale},isFloating:function(){return this._modelType===ie.FLOATING||this._modelType===ie.FLOATING_SINGLE},getType:function(){return this._modelType},toString:function(){var t="UNKNOWN";return this._modelType===ie.FLOATING?t="Floating":this._modelType===ie.FLOATING_SINGLE?t="Floating-Single":this._modelType===ie.FIXED&&(t="Fixed (Scale="+this.getScale()+")"),t},makePrecise:function(){if("number"==typeof arguments[0]){var t=arguments[0];return s.isNaN(t)?t:this._modelType===ie.FLOATING_SINGLE?t:this._modelType===ie.FIXED?Math.round(t*this._scale)/this._scale:t}if(arguments[0]instanceof E){var e=arguments[0];if(this._modelType===ie.FLOATING)return null;e.x=this.makePrecise(e.x),e.y=this.makePrecise(e.y)}},getMaximumSignificantDigits:function(){var t=16;return this._modelType===ie.FLOATING?t=16:this._modelType===ie.FLOATING_SINGLE?t=6:this._modelType===ie.FIXED&&(t=1+Math.trunc(Math.ceil(Math.log(this.getScale())/Math.log(10)))),t},setScale:function(t){this._scale=Math.abs(t)},interfaces_:function(){return[p,g]},getClass:function(){return ie}}),ie.mostPrecise=function(t,e){return t.compareTo(e)>=0?t:e},e(re.prototype,{readResolve:function(){return re.nameToTypeMap.get(this._name)},toString:function(){return this._name},interfaces_:function(){return[p]},getClass:function(){return re}}),re.serialVersionUID=-552860263173159e4,re.nameToTypeMap=new ne,ie.Type=re,ie.serialVersionUID=0x6bee6404e9a25c00,ie.FIXED=new re("FIXED"),ie.FLOATING=new re("FLOATING"),ie.FLOATING_SINGLE=new re("FLOATING SINGLE"),ie.maximumPreciseValue=9007199254740992,e(se.prototype,{toGeometry:function(t){return t.isNull()?this.createPoint():t.getMinX()===t.getMaxX()&&t.getMinY()===t.getMaxY()?this.createPoint(new E(t.getMinX(),t.getMinY())):t.getMinX()===t.getMaxX()||t.getMinY()===t.getMaxY()?this.createLineString([new E(t.getMinX(),t.getMinY()),new E(t.getMaxX(),t.getMaxY())]):this.createPolygon(this.createLinearRing([new E(t.getMinX(),t.getMinY()),new E(t.getMinX(),t.getMaxY()),new E(t.getMaxX(),t.getMaxY()),new E(t.getMaxX(),t.getMinY()),new E(t.getMinX(),t.getMinY())]),null)},createLineString:function(){if(0===arguments.length)return this.createLineString(this.getCoordinateSequenceFactory().create([]));if(1===arguments.length){if(arguments[0]instanceof Array){var t=arguments[0];return this.createLineString(null!==t?this.getCoordinateSequenceFactory().create(t):null)}if(N(arguments[0],H))return new At(arguments[0],this)}},createMultiLineString:function(){return 0===arguments.length?new wt(null,this):1===arguments.length?new wt(arguments[0],this):void 0},buildGeometry:function(t){for(var e=null,n=!1,i=!1,r=t.iterator();r.hasNext();){var s=r.next(),o=s.getClass();null===e&&(e=o),o!==e&&(n=!0),s instanceof Lt&&(i=!0)}if(null===e)return this.createGeometryCollection();if(n||i)return this.createGeometryCollection(se.toGeometryArray(t));var a=t.iterator().next();if(t.size()>1){if(a instanceof Vt)return this.createMultiPolygon(se.toPolygonArray(t));if(a instanceof At)return this.createMultiLineString(se.toLineStringArray(t));if(a instanceof Gt)return this.createMultiPoint(se.toPointArray(t));x.shouldNeverReachHere("Unhandled class: "+a.getClass().getName())}return a},createMultiPointFromCoords:function(t){return this.createMultiPoint(null!==t?this.getCoordinateSequenceFactory().create(t):null)},createPoint:function(){if(0===arguments.length)return this.createPoint(this.getCoordinateSequenceFactory().create([]));if(1===arguments.length){if(arguments[0]instanceof E){var t=arguments[0];return this.createPoint(null!==t?this.getCoordinateSequenceFactory().create([t]):null)}if(N(arguments[0],H))return new Gt(arguments[0],this)}},getCoordinateSequenceFactory:function(){return this._coordinateSequenceFactory},createPolygon:function(){if(0===arguments.length)return this.createPolygon(null,null);if(1===arguments.length){if(N(arguments[0],H)){var t=arguments[0];return this.createPolygon(this.createLinearRing(t))}if(arguments[0]instanceof Array){var e=arguments[0];return this.createPolygon(this.createLinearRing(e))}if(arguments[0]instanceof Yt){var n=arguments[0];return this.createPolygon(n,null)}}else if(2===arguments.length){return new Vt(arguments[0],arguments[1],this)}},getSRID:function(){return this._SRID},createGeometryCollection:function(){return 0===arguments.length?new Lt(null,this):1===arguments.length?new Lt(arguments[0],this):void 0},createGeometry:function(t){return new Ut(this).edit(t,{edit:function(){if(2===arguments.length&&arguments[1]instanceof K&&N(arguments[0],H)){var t=arguments[0];return this._coordinateSequenceFactory.create(t)}}})},getPrecisionModel:function(){return this._precisionModel},createLinearRing:function(){if(0===arguments.length)return this.createLinearRing(this.getCoordinateSequenceFactory().create([]));if(1===arguments.length){if(arguments[0]instanceof Array){var t=arguments[0];return this.createLinearRing(null!==t?this.getCoordinateSequenceFactory().create(t):null)}if(N(arguments[0],H))return new Yt(arguments[0],this)}},createMultiPolygon:function(){return 0===arguments.length?new kt(null,this):1===arguments.length?new kt(arguments[0],this):void 0},createMultiPoint:function(){if(0===arguments.length)return new zt(null,this);if(1===arguments.length){if(arguments[0]instanceof Array)return new zt(arguments[0],this);if(N(arguments[0],H)){var t=arguments[0];if(null===t)return this.createMultiPoint(new Array(0).fill(null));for(var e=new Array(t.size()).fill(null),n=0;n<t.size();n++){var i=this.getCoordinateSequenceFactory().create(1,t.getDimension());Dt.copy(t,n,i,0,1),e[n]=this.createPoint(i)}return this.createMultiPoint(e)}}},interfaces_:function(){return[p]},getClass:function(){return se}}),se.toMultiPolygonArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},se.toGeometryArray=function(t){if(null===t)return null;var e=new Array(t.size()).fill(null);return t.toArray(e)},se.getDefaultCoordinateSequenceFactory=function(){return Zt.instance()},se.toMultiLineStringArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},se.toLineStringArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},se.toMultiPointArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},se.toLinearRingArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},se.toPointArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},se.toPolygonArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},se.createPointFromInternalCoord=function(t,e){return e.getPrecisionModel().makePrecise(t),e.getFactory().createPoint(t)},se.serialVersionUID=-0x5ea75f2051eeb400;var oe={typeStr:/^\s*(\w+)\s*\(\s*(.*)\s*\)\s*$/,emptyTypeStr:/^\s*(\w+)\s*EMPTY\s*$/,spaces:/\s+/,parenComma:/\)\s*,\s*\(/,doubleParenComma:/\)\s*\)\s*,\s*\(\s*\(/,trimParens:/^\s*\(?(.*?)\)?\s*$/};function ae(t){this.geometryFactory=t||new se,this.precisionModel=this.geometryFactory.getPrecisionModel()}e(ae.prototype,{read:function(t){var e,n,i;t=t.replace(/[\n\r]/g," ");var r=oe.typeStr.exec(t);if(-1!==t.search("EMPTY")&&((r=oe.emptyTypeStr.exec(t))[2]=void 0),r&&(n=r[1].toLowerCase(),i=r[2],le[n]&&(e=le[n].call(this,i))),void 0===e)throw new Error("Could not parse WKT "+t);return e},write:function(t){return this.extractGeometry(t)},extractGeometry:function(t){var e=t.getGeometryType().toLowerCase();if(!ue[e])return null;var n=e.toUpperCase();return t.isEmpty()?n+" EMPTY":n+"("+ue[e].call(this,t)+")"}});var ue={coordinate:function(t){return t.x+" "+t.y},point:function(t){return ue.coordinate.call(this,t._coordinates._coordinates[0])},multipoint:function(t){for(var e=[],n=0,i=t._geometries.length;n<i;++n)e.push("("+ue.point.call(this,t._geometries[n])+")");return e.join(",")},linestring:function(t){for(var e=[],n=0,i=t._points._coordinates.length;n<i;++n)e.push(ue.coordinate.call(this,t._points._coordinates[n]));return e.join(",")},linearring:function(t){for(var e=[],n=0,i=t._points._coordinates.length;n<i;++n)e.push(ue.coordinate.call(this,t._points._coordinates[n]));return e.join(",")},multilinestring:function(t){for(var e=[],n=0,i=t._geometries.length;n<i;++n)e.push("("+ue.linestring.call(this,t._geometries[n])+")");return e.join(",")},polygon:function(t){var e=[];e.push("("+ue.linestring.call(this,t._shell)+")");for(var n=0,i=t._holes.length;n<i;++n)e.push("("+ue.linestring.call(this,t._holes[n])+")");return e.join(",")},multipolygon:function(t){for(var e=[],n=0,i=t._geometries.length;n<i;++n)e.push("("+ue.polygon.call(this,t._geometries[n])+")");return e.join(",")},geometrycollection:function(t){for(var e=[],n=0,i=t._geometries.length;n<i;++n)e.push(this.extractGeometry(t._geometries[n]));return e.join(",")}},le={coord:function(t){var e=t.trim().split(oe.spaces),n=new E(Number.parseFloat(e[0]),Number.parseFloat(e[1]));return this.precisionModel.makePrecise(n),n},point:function(t){return void 0===t?this.geometryFactory.createPoint():this.geometryFactory.createPoint(le.coord.call(this,t))},multipoint:function(t){if(void 0===t)return this.geometryFactory.createMultiPoint();for(var e,n=t.trim().split(","),i=[],r=0,s=n.length;r<s;++r)e=n[r].replace(oe.trimParens,"$1"),i.push(le.point.call(this,e));return this.geometryFactory.createMultiPoint(i)},linestring:function(t){if(void 0===t)return this.geometryFactory.createLineString();for(var e=t.trim().split(","),n=[],i=0,r=e.length;i<r;++i)n.push(le.coord.call(this,e[i]));return this.geometryFactory.createLineString(n)},linearring:function(t){if(void 0===t)return this.geometryFactory.createLinearRing();for(var e=t.trim().split(","),n=[],i=0,r=e.length;i<r;++i)n.push(le.coord.call(this,e[i]));return this.geometryFactory.createLinearRing(n)},multilinestring:function(t){if(void 0===t)return this.geometryFactory.createMultiLineString();for(var e,n=t.trim().split(oe.parenComma),i=[],r=0,s=n.length;r<s;++r)e=n[r].replace(oe.trimParens,"$1"),i.push(le.linestring.call(this,e));return this.geometryFactory.createMultiLineString(i)},polygon:function(t){if(void 0===t)return this.geometryFactory.createPolygon();for(var e,n,i,r,s=t.trim().split(oe.parenComma),o=[],a=0,u=s.length;a<u;++a)e=s[a].replace(oe.trimParens,"$1"),n=le.linestring.call(this,e),i=this.geometryFactory.createLinearRing(n._points),0===a?r=i:o.push(i);return this.geometryFactory.createPolygon(r,o)},multipolygon:function(t){if(void 0===t)return this.geometryFactory.createMultiPolygon();for(var e,n=t.trim().split(oe.doubleParenComma),i=[],r=0,s=n.length;r<s;++r)e=n[r].replace(oe.trimParens,"$1"),i.push(le.polygon.call(this,e));return this.geometryFactory.createMultiPolygon(i)},geometrycollection:function(t){if(void 0===t)return this.geometryFactory.createGeometryCollection();for(var e=(t=t.replace(/,\s*([A-Za-z])/g,"|$1")).trim().split("|"),n=[],i=0,r=e.length;i<r;++i)n.push(this.read(e[i]));return this.geometryFactory.createGeometryCollection(n)}};function he(t){this.parser=new ae(t)}function ce(){this._result=null,this._inputLines=Array(2).fill().map(function(){return Array(2)}),this._intPt=new Array(2).fill(null),this._intLineIndex=null,this._isProper=null,this._pa=null,this._pb=null,this._precisionModel=null,this._intPt[0]=new E,this._intPt[1]=new E,this._pa=this._intPt[0],this._pb=this._intPt[1],this._result=0}function fe(){ce.apply(this)}function ge(){if(this.p0=null,this.p1=null,0===arguments.length)ge.call(this,new E,new E);else if(1===arguments.length){var t=arguments[0];ge.call(this,t.p0,t.p1)}else if(2===arguments.length){var e=arguments[0],n=arguments[1];this.p0=e,this.p1=n}else if(4===arguments.length){var i=arguments[0],r=arguments[1],s=arguments[2],o=arguments[3];ge.call(this,new E(i,r),new E(s,o))}}function de(){}function _e(){if(this._matrix=null,0===arguments.length)this._matrix=Array(3).fill().map(function(){return Array(3)}),this.setAll(Nt.FALSE);else if(1===arguments.length)if("string"==typeof arguments[0]){var t=arguments[0];_e.call(this),this.set(t)}else if(arguments[0]instanceof _e){var e=arguments[0];_e.call(this),this._matrix[de.INTERIOR][de.INTERIOR]=e._matrix[de.INTERIOR][de.INTERIOR],this._matrix[de.INTERIOR][de.BOUNDARY]=e._matrix[de.INTERIOR][de.BOUNDARY],this._matrix[de.INTERIOR][de.EXTERIOR]=e._matrix[de.INTERIOR][de.EXTERIOR],this._matrix[de.BOUNDARY][de.INTERIOR]=e._matrix[de.BOUNDARY][de.INTERIOR],this._matrix[de.BOUNDARY][de.BOUNDARY]=e._matrix[de.BOUNDARY][de.BOUNDARY],this._matrix[de.BOUNDARY][de.EXTERIOR]=e._matrix[de.BOUNDARY][de.EXTERIOR],this._matrix[de.EXTERIOR][de.INTERIOR]=e._matrix[de.EXTERIOR][de.INTERIOR],this._matrix[de.EXTERIOR][de.BOUNDARY]=e._matrix[de.EXTERIOR][de.BOUNDARY],this._matrix[de.EXTERIOR][de.EXTERIOR]=e._matrix[de.EXTERIOR][de.EXTERIOR]}}function pe(){}function me(){this.p0=null,this.p1=null,this.p2=null;var t=arguments[0],e=arguments[1],n=arguments[2];this.p0=t,this.p1=e,this.p2=n}e(he.prototype,{write:function(t){return this.parser.write(t)}}),e(he,{toLineString:function(t,e){if(2!==arguments.length)throw new Error("Not implemented");return"LINESTRING ( "+t.x+" "+t.y+", "+e.x+" "+e.y+" )"}}),e(ce.prototype,{getIndexAlongSegment:function(t,e){return this.computeIntLineIndex(),this._intLineIndex[t][e]},getTopologySummary:function(){var t=new Mt;return this.isEndPoint()&&t.append(" endpoint"),this._isProper&&t.append(" proper"),this.isCollinear()&&t.append(" collinear"),t.toString()},computeIntersection:function(t,e,n,i){this._inputLines[0][0]=t,this._inputLines[0][1]=e,this._inputLines[1][0]=n,this._inputLines[1][1]=i,this._result=this.computeIntersect(t,e,n,i)},getIntersectionNum:function(){return this._result},computeIntLineIndex:function(){if(0===arguments.length)null===this._intLineIndex&&(this._intLineIndex=Array(2).fill().map(function(){return Array(2)}),this.computeIntLineIndex(0),this.computeIntLineIndex(1));else if(1===arguments.length){var t=arguments[0];this.getEdgeDistance(t,0)>this.getEdgeDistance(t,1)?(this._intLineIndex[t][0]=0,this._intLineIndex[t][1]=1):(this._intLineIndex[t][0]=1,this._intLineIndex[t][1]=0)}},isProper:function(){return this.hasIntersection()&&this._isProper},setPrecisionModel:function(t){this._precisionModel=t},isInteriorIntersection:function(){if(0===arguments.length)return!!this.isInteriorIntersection(0)||!!this.isInteriorIntersection(1);if(1===arguments.length){for(var t=arguments[0],e=0;e<this._result;e++)if(!this._intPt[e].equals2D(this._inputLines[t][0])&&!this._intPt[e].equals2D(this._inputLines[t][1]))return!0;return!1}},getIntersection:function(t){return this._intPt[t]},isEndPoint:function(){return this.hasIntersection()&&!this._isProper},hasIntersection:function(){return this._result!==ce.NO_INTERSECTION},getEdgeDistance:function(t,e){return ce.computeEdgeDistance(this._intPt[e],this._inputLines[t][0],this._inputLines[t][1])},isCollinear:function(){return this._result===ce.COLLINEAR_INTERSECTION},toString:function(){return he.toLineString(this._inputLines[0][0],this._inputLines[0][1])+" - "+he.toLineString(this._inputLines[1][0],this._inputLines[1][1])+this.getTopologySummary()},getEndpoint:function(t,e){return this._inputLines[t][e]},isIntersection:function(t){for(var e=0;e<this._result;e++)if(this._intPt[e].equals2D(t))return!0;return!1},getIntersectionAlongSegment:function(t,e){return this.computeIntLineIndex(),this._intPt[this._intLineIndex[t][e]]},interfaces_:function(){return[]},getClass:function(){return ce}}),ce.computeEdgeDistance=function(t,e,n){var i=Math.abs(n.x-e.x),r=Math.abs(n.y-e.y),s=-1;if(t.equals(e))s=0;else if(t.equals(n))s=i>r?i:r;else{var o=Math.abs(t.x-e.x),a=Math.abs(t.y-e.y);0!==(s=i>r?o:a)||t.equals(e)||(s=Math.max(o,a))}return x.isTrue(!(0===s&&!t.equals(e)),"Bad distance calculation"),s},ce.nonRobustComputeEdgeDistance=function(t,e,n){var i=t.x-e.x,r=t.y-e.y,s=Math.sqrt(i*i+r*r);return x.isTrue(!(0===s&&!t.equals(e)),"Invalid distance calculation"),s},ce.DONT_INTERSECT=0,ce.DO_INTERSECT=1,ce.COLLINEAR=2,ce.NO_INTERSECTION=0,ce.POINT_INTERSECTION=1,ce.COLLINEAR_INTERSECTION=2,v(fe,ce),e(fe.prototype,{isInSegmentEnvelopes:function(t){var e=new M(this._inputLines[0][0],this._inputLines[0][1]),n=new M(this._inputLines[1][0],this._inputLines[1][1]);return e.contains(t)&&n.contains(t)},computeIntersection:function(){if(3!==arguments.length)return ce.prototype.computeIntersection.apply(this,arguments);var t=arguments[0],e=arguments[1],n=arguments[2];if(this._isProper=!1,M.intersects(e,n,t)&&0===z.index(e,n,t)&&0===z.index(n,e,t))return this._isProper=!0,(t.equals(e)||t.equals(n))&&(this._isProper=!1),this._result=ce.POINT_INTERSECTION,null;this._result=ce.NO_INTERSECTION},normalizeToMinimum:function(t,e,n,i,r){r.x=this.smallestInAbsValue(t.x,e.x,n.x,i.x),r.y=this.smallestInAbsValue(t.y,e.y,n.y,i.y),t.x-=r.x,t.y-=r.y,e.x-=r.x,e.y-=r.y,n.x-=r.x,n.y-=r.y,i.x-=r.x,i.y-=r.y},safeHCoordinateIntersection:function(t,e,n,i){var r=null;try{r=k.intersection(t,e,n,i)}catch(s){if(!(s instanceof A))throw s;r=fe.nearestEndpoint(t,e,n,i)}return r},intersection:function(t,e,n,i){var r=this.intersectionWithNormalization(t,e,n,i);return this.isInSegmentEnvelopes(r)||(r=new E(fe.nearestEndpoint(t,e,n,i))),null!==this._precisionModel&&this._precisionModel.makePrecise(r),r},smallestInAbsValue:function(t,e,n,i){var r=t,s=Math.abs(r);return Math.abs(e)<s&&(r=e,s=Math.abs(e)),Math.abs(n)<s&&(r=n,s=Math.abs(n)),Math.abs(i)<s&&(r=i),r},checkDD:function(t,e,n,i,r){var s=V.intersection(t,e,n,i),o=this.isInSegmentEnvelopes(s);Y.out.println("DD in env = "+o+"  --------------------- "+s),r.distance(s)>1e-4&&Y.out.println("Distance = "+r.distance(s))},intersectionWithNormalization:function(t,e,n,i){var r=new E(t),s=new E(e),o=new E(n),a=new E(i),u=new E;this.normalizeToEnvCentre(r,s,o,a,u);var l=this.safeHCoordinateIntersection(r,s,o,a);return l.x+=u.x,l.y+=u.y,l},computeCollinearIntersection:function(t,e,n,i){var r=M.intersects(t,e,n),s=M.intersects(t,e,i),o=M.intersects(n,i,t),a=M.intersects(n,i,e);return r&&s?(this._intPt[0]=n,this._intPt[1]=i,ce.COLLINEAR_INTERSECTION):o&&a?(this._intPt[0]=t,this._intPt[1]=e,ce.COLLINEAR_INTERSECTION):r&&o?(this._intPt[0]=n,this._intPt[1]=t,!n.equals(t)||s||a?ce.COLLINEAR_INTERSECTION:ce.POINT_INTERSECTION):r&&a?(this._intPt[0]=n,this._intPt[1]=e,!n.equals(e)||s||o?ce.COLLINEAR_INTERSECTION:ce.POINT_INTERSECTION):s&&o?(this._intPt[0]=i,this._intPt[1]=t,!i.equals(t)||r||a?ce.COLLINEAR_INTERSECTION:ce.POINT_INTERSECTION):s&&a?(this._intPt[0]=i,this._intPt[1]=e,!i.equals(e)||r||o?ce.COLLINEAR_INTERSECTION:ce.POINT_INTERSECTION):ce.NO_INTERSECTION},normalizeToEnvCentre:function(t,e,n,i,r){var s=t.x<e.x?t.x:e.x,o=t.y<e.y?t.y:e.y,a=t.x>e.x?t.x:e.x,u=t.y>e.y?t.y:e.y,l=n.x<i.x?n.x:i.x,h=n.y<i.y?n.y:i.y,c=n.x>i.x?n.x:i.x,f=n.y>i.y?n.y:i.y,g=((s>l?s:l)+(a<c?a:c))/2,d=((o>h?o:h)+(u<f?u:f))/2;r.x=g,r.y=d,t.x-=r.x,t.y-=r.y,e.x-=r.x,e.y-=r.y,n.x-=r.x,n.y-=r.y,i.x-=r.x,i.y-=r.y},computeIntersect:function(t,e,n,i){if(this._isProper=!1,!M.intersects(t,e,n,i))return ce.NO_INTERSECTION;var r=z.index(t,e,n),s=z.index(t,e,i);if(r>0&&s>0||r<0&&s<0)return ce.NO_INTERSECTION;var o=z.index(n,i,t),a=z.index(n,i,e);return o>0&&a>0||o<0&&a<0?ce.NO_INTERSECTION:0===r&&0===s&&0===o&&0===a?this.computeCollinearIntersection(t,e,n,i):(0===r||0===s||0===o||0===a?(this._isProper=!1,t.equals2D(n)||t.equals2D(i)?this._intPt[0]=t:e.equals2D(n)||e.equals2D(i)?this._intPt[0]=e:0===r?this._intPt[0]=new E(n):0===s?this._intPt[0]=new E(i):0===o?this._intPt[0]=new E(t):0===a&&(this._intPt[0]=new E(e))):(this._isProper=!0,this._intPt[0]=this.intersection(t,e,n,i)),ce.POINT_INTERSECTION)},interfaces_:function(){return[]},getClass:function(){return fe}}),fe.nearestEndpoint=function(t,e,n,i){var r=t,s=X.pointToSegment(t,n,i),o=X.pointToSegment(e,n,i);return o<s&&(s=o,r=e),(o=X.pointToSegment(n,t,e))<s&&(s=o,r=n),(o=X.pointToSegment(i,t,e))<s&&(s=o,r=i),r},e(ge.prototype,{minX:function(){return Math.min(this.p0.x,this.p1.x)},orientationIndex:function(){if(arguments[0]instanceof ge){var t=arguments[0],e=z.index(this.p0,this.p1,t.p0),n=z.index(this.p0,this.p1,t.p1);return e>=0&&n>=0?Math.max(e,n):e<=0&&n<=0?Math.max(e,n):0}if(arguments[0]instanceof E){var i=arguments[0];return z.index(this.p0,this.p1,i)}},toGeometry:function(t){return t.createLineString([this.p0,this.p1])},isVertical:function(){return this.p0.x===this.p1.x},equals:function(t){if(!(t instanceof ge))return!1;var e=t;return this.p0.equals(e.p0)&&this.p1.equals(e.p1)},intersection:function(t){var e=new fe;return e.computeIntersection(this.p0,this.p1,t.p0,t.p1),e.hasIntersection()?e.getIntersection(0):null},project:function(){if(arguments[0]instanceof E){var t=arguments[0];if(t.equals(this.p0)||t.equals(this.p1))return new E(t);var e=this.projectionFactor(t),n=new E;return n.x=this.p0.x+e*(this.p1.x-this.p0.x),n.y=this.p0.y+e*(this.p1.y-this.p0.y),n}if(arguments[0]instanceof ge){var i=arguments[0],r=this.projectionFactor(i.p0),s=this.projectionFactor(i.p1);if(r>=1&&s>=1)return null;if(r<=0&&s<=0)return null;var o=this.project(i.p0);r<0&&(o=this.p0),r>1&&(o=this.p1);var a=this.project(i.p1);return s<0&&(a=this.p0),s>1&&(a=this.p1),new ge(o,a)}},normalize:function(){this.p1.compareTo(this.p0)<0&&this.reverse()},angle:function(){return Math.atan2(this.p1.y-this.p0.y,this.p1.x-this.p0.x)},getCoordinate:function(t){return 0===t?this.p0:this.p1},distancePerpendicular:function(t){return X.pointToLinePerpendicular(t,this.p0,this.p1)},minY:function(){return Math.min(this.p0.y,this.p1.y)},midPoint:function(){return ge.midPoint(this.p0,this.p1)},projectionFactor:function(t){if(t.equals(this.p0))return 0;if(t.equals(this.p1))return 1;var e=this.p1.x-this.p0.x,n=this.p1.y-this.p0.y,i=e*e+n*n;return i<=0?s.NaN:((t.x-this.p0.x)*e+(t.y-this.p0.y)*n)/i},closestPoints:function(t){var e=this.intersection(t);if(null!==e)return[e,e];var n=new Array(2).fill(null),i=s.MAX_VALUE,r=null,o=this.closestPoint(t.p0);i=o.distance(t.p0),n[0]=o,n[1]=t.p0;var a=this.closestPoint(t.p1);(r=a.distance(t.p1))<i&&(i=r,n[0]=a,n[1]=t.p1);var u=t.closestPoint(this.p0);(r=u.distance(this.p0))<i&&(i=r,n[0]=this.p0,n[1]=u);var l=t.closestPoint(this.p1);return(r=l.distance(this.p1))<i&&(i=r,n[0]=this.p1,n[1]=l),n},closestPoint:function(t){var e=this.projectionFactor(t);return e>0&&e<1?this.project(t):this.p0.distance(t)<this.p1.distance(t)?this.p0:this.p1},maxX:function(){return Math.max(this.p0.x,this.p1.x)},getLength:function(){return this.p0.distance(this.p1)},compareTo:function(t){var e=t,n=this.p0.compareTo(e.p0);return 0!==n?n:this.p1.compareTo(e.p1)},reverse:function(){var t=this.p0;this.p0=this.p1,this.p1=t},equalsTopo:function(t){return this.p0.equals(t.p0)&&this.p1.equals(t.p1)||this.p0.equals(t.p1)&&this.p1.equals(t.p0)},lineIntersection:function(t){try{return k.intersection(this.p0,this.p1,t.p0,t.p1)}catch(t){if(!(t instanceof A))throw t}return null},maxY:function(){return Math.max(this.p0.y,this.p1.y)},pointAlongOffset:function(t,e){var n=this.p0.x+t*(this.p1.x-this.p0.x),i=this.p0.y+t*(this.p1.y-this.p0.y),r=this.p1.x-this.p0.x,s=this.p1.y-this.p0.y,o=Math.sqrt(r*r+s*s),a=0,u=0;if(0!==e){if(o<=0)throw new IllegalStateException("Cannot compute offset from zero-length line segment");a=e*r/o,u=e*s/o}return new E(n-u,i+a)},setCoordinates:function(){if(1===arguments.length){var t=arguments[0];this.setCoordinates(t.p0,t.p1)}else if(2===arguments.length){var e=arguments[0],n=arguments[1];this.p0.x=e.x,this.p0.y=e.y,this.p1.x=n.x,this.p1.y=n.y}},segmentFraction:function(t){var e=this.projectionFactor(t);return e<0?e=0:(e>1||s.isNaN(e))&&(e=1),e},toString:function(){return"LINESTRING( "+this.p0.x+" "+this.p0.y+", "+this.p1.x+" "+this.p1.y+")"},isHorizontal:function(){return this.p0.y===this.p1.y},distance:function(){if(arguments[0]instanceof ge){var t=arguments[0];return X.segmentToSegment(this.p0,this.p1,t.p0,t.p1)}if(arguments[0]instanceof E){var e=arguments[0];return X.pointToSegment(e,this.p0,this.p1)}},pointAlong:function(t){var e=new E;return e.x=this.p0.x+t*(this.p1.x-this.p0.x),e.y=this.p0.y+t*(this.p1.y-this.p0.y),e},hashCode:function(){var t=java.lang.Double.doubleToLongBits(this.p0.x);t^=31*java.lang.Double.doubleToLongBits(this.p0.y);var e=Math.trunc(t)^Math.trunc(t>>32),n=java.lang.Double.doubleToLongBits(this.p1.x);return n^=31*java.lang.Double.doubleToLongBits(this.p1.y),e^(Math.trunc(n)^Math.trunc(n>>32))},interfaces_:function(){return[g,p]},getClass:function(){return ge}}),ge.midPoint=function(t,e){return new E((t.x+e.x)/2,(t.y+e.y)/2)},ge.serialVersionUID=0x2d2172135f411c00,e(de.prototype,{interfaces_:function(){return[]},getClass:function(){return de}}),de.toLocationSymbol=function(t){switch(t){case de.EXTERIOR:return"e";case de.BOUNDARY:return"b";case de.INTERIOR:return"i";case de.NONE:return"-"}throw new i("Unknown location value: "+t)},de.INTERIOR=0,de.BOUNDARY=1,de.EXTERIOR=2,de.NONE=-1,e(_e.prototype,{isIntersects:function(){return!this.isDisjoint()},isCovers:function(){return(_e.isTrue(this._matrix[de.INTERIOR][de.INTERIOR])||_e.isTrue(this._matrix[de.INTERIOR][de.BOUNDARY])||_e.isTrue(this._matrix[de.BOUNDARY][de.INTERIOR])||_e.isTrue(this._matrix[de.BOUNDARY][de.BOUNDARY]))&&this._matrix[de.EXTERIOR][de.INTERIOR]===Nt.FALSE&&this._matrix[de.EXTERIOR][de.BOUNDARY]===Nt.FALSE},isCoveredBy:function(){return(_e.isTrue(this._matrix[de.INTERIOR][de.INTERIOR])||_e.isTrue(this._matrix[de.INTERIOR][de.BOUNDARY])||_e.isTrue(this._matrix[de.BOUNDARY][de.INTERIOR])||_e.isTrue(this._matrix[de.BOUNDARY][de.BOUNDARY]))&&this._matrix[de.INTERIOR][de.EXTERIOR]===Nt.FALSE&&this._matrix[de.BOUNDARY][de.EXTERIOR]===Nt.FALSE},set:function(){if(1===arguments.length)for(var t=arguments[0],e=0;e<t.length;e++){var n=Math.trunc(e/3),i=e%3;this._matrix[n][i]=Nt.toDimensionValue(t.charAt(e))}else if(3===arguments.length){var r=arguments[0],s=arguments[1],o=arguments[2];this._matrix[r][s]=o}},isContains:function(){return _e.isTrue(this._matrix[de.INTERIOR][de.INTERIOR])&&this._matrix[de.EXTERIOR][de.INTERIOR]===Nt.FALSE&&this._matrix[de.EXTERIOR][de.BOUNDARY]===Nt.FALSE},setAtLeast:function(){if(1===arguments.length)for(var t=arguments[0],e=0;e<t.length;e++){var n=Math.trunc(e/3),i=e%3;this.setAtLeast(n,i,Nt.toDimensionValue(t.charAt(e)))}else if(3===arguments.length){var r=arguments[0],s=arguments[1],o=arguments[2];this._matrix[r][s]<o&&(this._matrix[r][s]=o)}},setAtLeastIfValid:function(t,e,n){t>=0&&e>=0&&this.setAtLeast(t,e,n)},isWithin:function(){return _e.isTrue(this._matrix[de.INTERIOR][de.INTERIOR])&&this._matrix[de.INTERIOR][de.EXTERIOR]===Nt.FALSE&&this._matrix[de.BOUNDARY][de.EXTERIOR]===Nt.FALSE},isTouches:function(t,e){return t>e?this.isTouches(e,t):(t===Nt.A&&e===Nt.A||t===Nt.L&&e===Nt.L||t===Nt.L&&e===Nt.A||t===Nt.P&&e===Nt.A||t===Nt.P&&e===Nt.L)&&(this._matrix[de.INTERIOR][de.INTERIOR]===Nt.FALSE&&(_e.isTrue(this._matrix[de.INTERIOR][de.BOUNDARY])||_e.isTrue(this._matrix[de.BOUNDARY][de.INTERIOR])||_e.isTrue(this._matrix[de.BOUNDARY][de.BOUNDARY])))},isOverlaps:function(t,e){return t===Nt.P&&e===Nt.P||t===Nt.A&&e===Nt.A?_e.isTrue(this._matrix[de.INTERIOR][de.INTERIOR])&&_e.isTrue(this._matrix[de.INTERIOR][de.EXTERIOR])&&_e.isTrue(this._matrix[de.EXTERIOR][de.INTERIOR]):t===Nt.L&&e===Nt.L&&(1===this._matrix[de.INTERIOR][de.INTERIOR]&&_e.isTrue(this._matrix[de.INTERIOR][de.EXTERIOR])&&_e.isTrue(this._matrix[de.EXTERIOR][de.INTERIOR]))},isEquals:function(t,e){return t===e&&(_e.isTrue(this._matrix[de.INTERIOR][de.INTERIOR])&&this._matrix[de.INTERIOR][de.EXTERIOR]===Nt.FALSE&&this._matrix[de.BOUNDARY][de.EXTERIOR]===Nt.FALSE&&this._matrix[de.EXTERIOR][de.INTERIOR]===Nt.FALSE&&this._matrix[de.EXTERIOR][de.BOUNDARY]===Nt.FALSE)},toString:function(){for(var t=new Mt("123456789"),e=0;e<3;e++)for(var n=0;n<3;n++)t.setCharAt(3*e+n,Nt.toDimensionSymbol(this._matrix[e][n]));return t.toString()},setAll:function(t){for(var e=0;e<3;e++)for(var n=0;n<3;n++)this._matrix[e][n]=t},get:function(t,e){return this._matrix[t][e]},transpose:function(){var t=this._matrix[1][0];return this._matrix[1][0]=this._matrix[0][1],this._matrix[0][1]=t,t=this._matrix[2][0],this._matrix[2][0]=this._matrix[0][2],this._matrix[0][2]=t,t=this._matrix[2][1],this._matrix[2][1]=this._matrix[1][2],this._matrix[1][2]=t,this},matches:function(t){if(9!==t.length)throw new i("Should be length 9: "+t);for(var e=0;e<3;e++)for(var n=0;n<3;n++)if(!_e.matches(this._matrix[e][n],t.charAt(3*e+n)))return!1;return!0},add:function(t){for(var e=0;e<3;e++)for(var n=0;n<3;n++)this.setAtLeast(e,n,t.get(e,n))},isDisjoint:function(){return this._matrix[de.INTERIOR][de.INTERIOR]===Nt.FALSE&&this._matrix[de.INTERIOR][de.BOUNDARY]===Nt.FALSE&&this._matrix[de.BOUNDARY][de.INTERIOR]===Nt.FALSE&&this._matrix[de.BOUNDARY][de.BOUNDARY]===Nt.FALSE},isCrosses:function(t,e){return t===Nt.P&&e===Nt.L||t===Nt.P&&e===Nt.A||t===Nt.L&&e===Nt.A?_e.isTrue(this._matrix[de.INTERIOR][de.INTERIOR])&&_e.isTrue(this._matrix[de.INTERIOR][de.EXTERIOR]):t===Nt.L&&e===Nt.P||t===Nt.A&&e===Nt.P||t===Nt.A&&e===Nt.L?_e.isTrue(this._matrix[de.INTERIOR][de.INTERIOR])&&_e.isTrue(this._matrix[de.EXTERIOR][de.INTERIOR]):t===Nt.L&&e===Nt.L&&0===this._matrix[de.INTERIOR][de.INTERIOR]},interfaces_:function(){return[d]},getClass:function(){return _e}}),_e.matches=function(){if(Number.isInteger(arguments[0])&&"string"==typeof arguments[1]){var t=arguments[0],e=arguments[1];return e===Nt.SYM_DONTCARE||(e===Nt.SYM_TRUE&&(t>=0||t===Nt.TRUE)||(e===Nt.SYM_FALSE&&t===Nt.FALSE||(e===Nt.SYM_P&&t===Nt.P||(e===Nt.SYM_L&&t===Nt.L||e===Nt.SYM_A&&t===Nt.A))))}if("string"==typeof arguments[0]&&"string"==typeof arguments[1]){var n=arguments[0],i=arguments[1];return new _e(n).matches(i)}},_e.isTrue=function(t){return t>=0||t===Nt.TRUE},e(pe.prototype,{interfaces_:function(){return[]},getClass:function(){return pe}}),pe.toDegrees=function(t){return 180*t/Math.PI},pe.normalize=function(t){for(;t>Math.PI;)t-=pe.PI_TIMES_2;for(;t<=-Math.PI;)t+=pe.PI_TIMES_2;return t},pe.angle=function(){if(1===arguments.length){var t=arguments[0];return Math.atan2(t.y,t.x)}if(2===arguments.length){var e=arguments[0],n=arguments[1],i=n.x-e.x,r=n.y-e.y;return Math.atan2(r,i)}},pe.isAcute=function(t,e,n){var i=t.x-e.x,r=t.y-e.y;return i*(n.x-e.x)+r*(n.y-e.y)>0},pe.isObtuse=function(t,e,n){var i=t.x-e.x,r=t.y-e.y;return i*(n.x-e.x)+r*(n.y-e.y)<0},pe.interiorAngle=function(t,e,n){var i=pe.angle(e,t),r=pe.angle(e,n);return Math.abs(r-i)},pe.normalizePositive=function(t){if(t<0){for(;t<0;)t+=pe.PI_TIMES_2;t>=pe.PI_TIMES_2&&(t=0)}else{for(;t>=pe.PI_TIMES_2;)t-=pe.PI_TIMES_2;t<0&&(t=0)}return t},pe.angleBetween=function(t,e,n){var i=pe.angle(e,t),r=pe.angle(e,n);return pe.diff(i,r)},pe.diff=function(t,e){var n=null;return(n=t<e?e-t:t-e)>Math.PI&&(n=2*Math.PI-n),n},pe.toRadians=function(t){return t*Math.PI/180},pe.getTurn=function(t,e){var n=Math.sin(e-t);return n>0?pe.COUNTERCLOCKWISE:n<0?pe.CLOCKWISE:pe.NONE},pe.angleBetweenOriented=function(t,e,n){var i=pe.angle(e,t),r=pe.angle(e,n)-i;return r<=-Math.PI?r+pe.PI_TIMES_2:r>Math.PI?r-pe.PI_TIMES_2:r},pe.PI_TIMES_2=2*Math.PI,pe.PI_OVER_2=Math.PI/2,pe.PI_OVER_4=Math.PI/4,pe.COUNTERCLOCKWISE=z.COUNTERCLOCKWISE,pe.CLOCKWISE=z.CLOCKWISE,pe.NONE=z.COLLINEAR,e(me.prototype,{area:function(){return me.area(this.p0,this.p1,this.p2)},signedArea:function(){return me.signedArea(this.p0,this.p1,this.p2)},interpolateZ:function(t){if(null===t)throw new i("Supplied point is null.");return me.interpolateZ(t,this.p0,this.p1,this.p2)},longestSideLength:function(){return me.longestSideLength(this.p0,this.p1,this.p2)},isAcute:function(){return me.isAcute(this.p0,this.p1,this.p2)},circumcentre:function(){return me.circumcentre(this.p0,this.p1,this.p2)},area3D:function(){return me.area3D(this.p0,this.p1,this.p2)},centroid:function(){return me.centroid(this.p0,this.p1,this.p2)},inCentre:function(){return me.inCentre(this.p0,this.p1,this.p2)},interfaces_:function(){return[]},getClass:function(){return me}}),me.area=function(t,e,n){return Math.abs(((n.x-t.x)*(e.y-t.y)-(e.x-t.x)*(n.y-t.y))/2)},me.signedArea=function(t,e,n){return((n.x-t.x)*(e.y-t.y)-(e.x-t.x)*(n.y-t.y))/2},me.det=function(t,e,n,i){return t*i-e*n},me.interpolateZ=function(t,e,n,i){var r=e.x,s=e.y,o=n.x-r,a=i.x-r,u=n.y-s,l=i.y-s,h=o*l-a*u,c=t.x-r,f=t.y-s,g=(l*c-a*f)/h,d=(-u*c+o*f)/h;return e.z+g*(n.z-e.z)+d*(i.z-e.z)},me.longestSideLength=function(t,e,n){var i=t.distance(e),r=e.distance(n),s=n.distance(t),o=i;return r>o&&(o=r),s>o&&(o=s),o},me.isAcute=function(t,e,n){return!!pe.isAcute(t,e,n)&&(!!pe.isAcute(e,n,t)&&!!pe.isAcute(n,t,e))},me.circumcentre=function(t,e,n){var i=n.x,r=n.y,s=t.x-i,o=t.y-r,a=e.x-i,u=e.y-r,l=2*me.det(s,o,a,u);return new E(i-me.det(o,s*s+o*o,u,a*a+u*u)/l,r+me.det(s,s*s+o*o,a,a*a+u*u)/l)},me.perpendicularBisector=function(t,e){var n=e.x-t.x,i=e.y-t.y;return new k(new k(t.x+n/2,t.y+i/2,1),new k(t.x-i+n/2,t.y+n+i/2,1))},me.angleBisector=function(t,e,n){var i=e.distance(t),r=i/(i+e.distance(n)),s=n.x-t.x,o=n.y-t.y;return new E(t.x+r*s,t.y+r*o)},me.area3D=function(t,e,n){var i=e.x-t.x,r=e.y-t.y,s=e.z-t.z,o=n.x-t.x,a=n.y-t.y,u=n.z-t.z,l=r*u-s*a,h=s*o-i*u,c=i*a-r*o,f=l*l+h*h+c*c;return Math.sqrt(f)/2},me.centroid=function(t,e,n){return new E((t.x+e.x+n.x)/3,(t.y+e.y+n.y)/3)},me.inCentre=function(t,e,n){var i=e.distance(n),r=t.distance(n),s=t.distance(e),o=i+r+s;return new E((i*t.x+r*e.x+s*n.x)/o,(i*t.y+r*e.y+s*n.y)/o)};var ve=Object.freeze({Coordinate:E,CoordinateList:b,Envelope:M,LineSegment:ge,GeometryFactory:se,Geometry:K,Point:Gt,LineString:At,LinearRing:Yt,Polygon:Vt,GeometryCollection:Lt,MultiPoint:zt,MultiLineString:wt,MultiPolygon:kt,Dimension:Nt,IntersectionMatrix:_e,PrecisionModel:ie,Location:de,Triangle:me});function ye(){this._pt=[new E,new E],this._distance=s.NaN,this._isNull=!0}function xe(){}function Ee(){this._g0=null,this._g1=null,this._ptDist=new ye,this._densifyFrac=0;var t=arguments[0],e=arguments[1];this._g0=t,this._g1=e}function Ie(){this._maxPtDist=new ye,this._minPtDist=new ye,this._euclideanDist=new xe,this._geom=null;var t=arguments[0];this._geom=t}function Ne(){this._maxPtDist=new ye,this._minPtDist=new ye,this._geom=null,this._numSubSegs=0;var t=arguments[0],e=arguments[1];this._geom=t,this._numSubSegs=Math.trunc(Math.round(1/e))}function Ce(){}function Se(){}function Le(){this._min=s.POSITIVE_INFINITY,this._max=s.NEGATIVE_INFINITY}function we(){}function Re(){Le.apply(this),this._item=null;var t=arguments[0],e=arguments[1],n=arguments[2];this._min=t,this._max=e,this._item=n}e(ye.prototype,{getCoordinates:function(){return this._pt},getCoordinate:function(t){return this._pt[t]},setMinimum:function(){if(1===arguments.length){var t=arguments[0];this.setMinimum(t._pt[0],t._pt[1])}else if(2===arguments.length){var e=arguments[0],n=arguments[1];if(this._isNull)return this.initialize(e,n),null;var i=e.distance(n);i<this._distance&&this.initialize(e,n,i)}},initialize:function(){if(0===arguments.length)this._isNull=!0;else if(2===arguments.length){var t=arguments[0],e=arguments[1];this._pt[0].setCoordinate(t),this._pt[1].setCoordinate(e),this._distance=t.distance(e),this._isNull=!1}else if(3===arguments.length){var n=arguments[0],i=arguments[1],r=arguments[2];this._pt[0].setCoordinate(n),this._pt[1].setCoordinate(i),this._distance=r,this._isNull=!1}},toString:function(){return he.toLineString(this._pt[0],this._pt[1])},getDistance:function(){return this._distance},setMaximum:function(){if(1===arguments.length){var t=arguments[0];this.setMaximum(t._pt[0],t._pt[1])}else if(2===arguments.length){var e=arguments[0],n=arguments[1];if(this._isNull)return this.initialize(e,n),null;var i=e.distance(n);i>this._distance&&this.initialize(e,n,i)}},interfaces_:function(){return[]},getClass:function(){return ye}}),e(xe.prototype,{interfaces_:function(){return[]},getClass:function(){return xe}}),xe.computeDistance=function(){if(arguments[2]instanceof ye&&arguments[0]instanceof At&&arguments[1]instanceof E)for(var t=arguments[0],e=arguments[1],n=arguments[2],i=new ge,r=t.getCoordinates(),s=0;s<r.length-1;s++){i.setCoordinates(r[s],r[s+1]);var o=i.closestPoint(e);n.setMinimum(o,e)}else if(arguments[2]instanceof ye&&arguments[0]instanceof Vt&&arguments[1]instanceof E){var a=arguments[0],u=arguments[1],l=arguments[2];xe.computeDistance(a.getExteriorRing(),u,l);for(s=0;s<a.getNumInteriorRing();s++)xe.computeDistance(a.getInteriorRingN(s),u,l)}else if(arguments[2]instanceof ye&&arguments[0]instanceof K&&arguments[1]instanceof E){var h=arguments[0],c=arguments[1],f=arguments[2];if(h instanceof At)xe.computeDistance(h,c,f);else if(h instanceof Vt)xe.computeDistance(h,c,f);else if(h instanceof Lt){var g=h;for(s=0;s<g.getNumGeometries();s++){var d=g.getGeometryN(s);xe.computeDistance(d,c,f)}}else f.setMinimum(h.getCoordinate(),c)}else if(arguments[2]instanceof ye&&arguments[0]instanceof ge&&arguments[1]instanceof E){var _=arguments[0],p=arguments[1],m=arguments[2];o=_.closestPoint(p);m.setMinimum(o,p)}},e(Ee.prototype,{getCoordinates:function(){return this._ptDist.getCoordinates()},setDensifyFraction:function(t){if(t>1||t<=0)throw new i("Fraction is not in range (0.0 - 1.0]");this._densifyFrac=t},compute:function(t,e){this.computeOrientedDistance(t,e,this._ptDist),this.computeOrientedDistance(e,t,this._ptDist)},distance:function(){return this.compute(this._g0,this._g1),this._ptDist.getDistance()},computeOrientedDistance:function(t,e,n){var i=new Ie(e);if(t.apply(i),n.setMaximum(i.getMaxPointDistance()),this._densifyFrac>0){var r=new Ne(e,this._densifyFrac);t.apply(r),n.setMaximum(r.getMaxPointDistance())}},orientedDistance:function(){return this.computeOrientedDistance(this._g0,this._g1,this._ptDist),this._ptDist.getDistance()},interfaces_:function(){return[]},getClass:function(){return Ee}}),Ee.distance=function(){if(2===arguments.length)return(t=new Ee(arguments[0],arguments[1])).distance();if(3===arguments.length){var t,e=arguments[0],n=arguments[1],i=arguments[2];return(t=new Ee(e,n)).setDensifyFraction(i),t.distance()}},e(Ie.prototype,{filter:function(t){this._minPtDist.initialize(),xe.computeDistance(this._geom,t,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)},getMaxPointDistance:function(){return this._maxPtDist},interfaces_:function(){return[Z]},getClass:function(){return Ie}}),e(Ne.prototype,{filter:function(t,e){if(0===e)return null;for(var n=t.getCoordinate(e-1),i=t.getCoordinate(e),r=(i.x-n.x)/this._numSubSegs,s=(i.y-n.y)/this._numSubSegs,o=0;o<this._numSubSegs;o++){var a=new E(n.x+o*r,n.y+o*s);this._minPtDist.initialize(),xe.computeDistance(this._geom,a,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)}},isDone:function(){return!1},isGeometryChanged:function(){return!1},getMaxPointDistance:function(){return this._maxPtDist},interfaces_:function(){return[St]},getClass:function(){return Ne}}),Ee.MaxPointDistanceFilter=Ie,Ee.MaxDensifiedByFractionDistanceFilter=Ne,e(Ce.prototype,{visitItem:function(t){},interfaces_:function(){return[]},getClass:function(){return Ce}}),e(Se.prototype,{locate:function(t){},interfaces_:function(){return[]},getClass:function(){return Se}}),e(Le.prototype,{getMin:function(){return this._min},intersects:function(t,e){return!(this._min>e||this._max<t)},getMax:function(){return this._max},toString:function(){return he.toLineString(new E(this._min,0),new E(this._max,0))},interfaces_:function(){return[]},getClass:function(){return Le}}),e(we.prototype,{compare:function(t,e){var n=t,i=e,r=(n._min+n._max)/2,s=(i._min+i._max)/2;return r<s?-1:r>s?1:0},interfaces_:function(){return[_]},getClass:function(){return we}}),Le.NodeComparator=we,v(Re,Le),e(Re.prototype,{query:function(t,e,n){if(!this.intersects(t,e))return null;n.visitItem(this._item)},interfaces_:function(){return[]},getClass:function(){return Re}});var Te={reverseOrder:function(){return{compare:function(t,e){return e.compareTo(t)}}},min:function(t){return Te.sort(t),t.get(0)},sort:function(t,e){var n=t.toArray();e?It.sort(n,e):It.sort(n);for(var i=t.iterator(),r=0,s=n.length;r<s;r++)i.next(),i.set(n[r])},singletonList:function(t){var e=new P;return e.add(t),e}};function Pe(){Le.apply(this),this._node1=null,this._node2=null;var t=arguments[0],e=arguments[1];this._node1=t,this._node2=e,this.buildExtent(this._node1,this._node2)}function Oe(){this._leaves=new P,this._root=null,this._level=0}function be(){if(this._lines=null,this._isForcedToLineString=!1,1===arguments.length){var t=arguments[0];this._lines=t}else if(2===arguments.length){var e=arguments[0],n=arguments[1];this._lines=e,this._isForcedToLineString=n}}function Me(){this._items=new P}function De(){this._p=null,this._crossingCount=0,this._isPointOnSegment=!1;var t=arguments[0];this._p=t}function Ae(){this._index=null;var t=arguments[0];if(!(N(t,Bt)||t instanceof Yt))throw new i("Argument must be Polygonal or LinearRing");this._index=new Ge(t)}function Fe(){this._counter=null;var t=arguments[0];this._counter=t}function Ge(){this._index=new Oe;var t=arguments[0];this.init(t)}function qe(){}function Be(){this._parent=null,this._atStart=null,this._max=null,this._index=null,this._subcollectionIterator=null;var t=arguments[0];this._parent=t,this._atStart=!0,this._index=0,this._max=t.getNumGeometries()}function Ve(){this._geom=null;var t=arguments[0];this._geom=t}function ze(){}function Ye(){}function ke(){}function Ue(){}function Xe(){this._areaBasePt=null,this._triangleCent3=new E,this._areasum2=0,this._cg3=new E,this._lineCentSum=new E,this._totalLength=0,this._ptCount=0,this._ptCentSum=new E;var t=arguments[0];this._areaBasePt=null,this.add(t)}function He(){}function We(t){this.message=t||""}function je(){this.array_=[]}function Ke(){this.treeSet=new yt,this.list=new P}function Ze(){if(this._geomFactory=null,this._inputPts=null,1===arguments.length){var t=arguments[0];Ze.call(this,Ze.extractCoordinates(t),t.getFactory())}else if(2===arguments.length){var e=arguments[0],n=arguments[1];this._inputPts=Ke.filterCoordinates(e),this._geomFactory=n}}function Qe(){this._origin=null;var t=arguments[0];this._origin=t}function Je(){this._factory=null,this._interiorPoint=null,this._maxWidth=0;var t=arguments[0];this._factory=t.getFactory(),this.add(t)}function $e(){this._poly=null,this._centreY=null,this._hiY=s.MAX_VALUE,this._loY=-s.MAX_VALUE;var t=arguments[0];this._poly=t,this._hiY=t.getEnvelopeInternal().getMaxY(),this._loY=t.getEnvelopeInternal().getMinY(),this._centreY=Je.avg(this._loY,this._hiY)}function tn(){this._centroid=null,this._minDistance=s.MAX_VALUE,this._interiorPoint=null;var t=arguments[0];this._centroid=t.getCentroid().getCoordinate(),this.addInterior(t),null===this._interiorPoint&&this.addEndpoints(t)}function en(){this._centroid=null,this._minDistance=s.MAX_VALUE,this._interiorPoint=null;var t=arguments[0];this._centroid=t.getCentroid().getCoordinate(),this.add(t)}function nn(){this.selectedSegment=new ge}function rn(){this._items=new P,this._subnode=new Array(2).fill(null)}function sn(){if(this.min=null,this.max=null,0===arguments.length)this.min=0,this.max=0;else if(1===arguments.length){var t=arguments[0];this.init(t.min,t.max)}else if(2===arguments.length){var e=arguments[0],n=arguments[1];this.init(e,n)}}function on(){}function an(){this._pt=0,this._level=0,this._interval=null;var t=arguments[0];this.computeKey(t)}function un(){rn.apply(this),this._interval=null,this._centre=null,this._level=null;var t=arguments[0],e=arguments[1];this._interval=t,this._level=e,this._centre=(t.getMin()+t.getMax())/2}function ln(){}function hn(){rn.apply(this)}function cn(){this._root=null,this._minExtent=1,this._root=new hn}function fn(){this._pts=null,this._start=null,this._end=null,this._env=null,this._context=null,this._id=null;var t=arguments[0],e=arguments[1],n=arguments[2],i=arguments[3];this._pts=t,this._start=e,this._end=n,this._context=i}function gn(){}function dn(){}function _n(){}function pn(){}function mn(){this._ring=null,this._tree=null,this._crossings=0,this._interval=new sn;var t=arguments[0];this._ring=t,this.buildIndex()}function vn(){nn.apply(this),this.mcp=null,this.p=null;var t=arguments[0],e=arguments[1];this.mcp=t,this.p=e}function yn(){this._input=null,this._extremalPts=null,this._centre=null,this._radius=0;var t=arguments[0];this._input=t}function xn(){if(this._inputGeom=null,this._isConvex=null,this._convexHullPts=null,this._minBaseSeg=new ge,this._minWidthPt=null,this._minPtIndex=null,this._minWidth=0,1===arguments.length){var t=arguments[0];xn.call(this,t,!1)}else if(2===arguments.length){var e=arguments[0],n=arguments[1];this._inputGeom=e,this._isConvex=n}}v(Pe,Le),e(Pe.prototype,{buildExtent:function(t,e){this._min=Math.min(t._min,e._min),this._max=Math.max(t._max,e._max)},query:function(t,e,n){if(!this.intersects(t,e))return null;null!==this._node1&&this._node1.query(t,e,n),null!==this._node2&&this._node2.query(t,e,n)},interfaces_:function(){return[]},getClass:function(){return Pe}}),e(Oe.prototype,{buildTree:function(){Te.sort(this._leaves,new Le.NodeComparator);for(var t=this._leaves,e=null,n=new P;;){if(this.buildLevel(t,n),1===n.size())return n.get(0);e=t,t=n,n=e}},insert:function(t,e,n){if(null!==this._root)throw new IllegalStateException("Index cannot be added to once it has been queried");this._leaves.add(new Re(t,e,n))},query:function(t,e,n){this.init(),this._root.query(t,e,n)},buildRoot:function(){if(null!==this._root)return null;this._root=this.buildTree()},printNode:function(t){Y.out.println(he.toLineString(new E(t._min,this._level),new E(t._max,this._level)))},init:function(){if(null!==this._root)return null;this.buildRoot()},buildLevel:function(t,e){this._level++,e.clear();for(var n=0;n<t.size();n+=2){var i=t.get(n);if(null===(n+1<t.size()?t.get(n):null))e.add(i);else{var r=new Pe(t.get(n),t.get(n+1));e.add(r)}}},interfaces_:function(){return[]},getClass:function(){return Oe}}),e(be.prototype,{filter:function(t){if(this._isForcedToLineString&&t instanceof Yt){var e=t.getFactory().createLineString(t.getCoordinateSequence());return this._lines.add(e),null}t instanceof At&&this._lines.add(t)},setForceToLineString:function(t){this._isForcedToLineString=t},interfaces_:function(){return[j]},getClass:function(){return be}}),be.getGeometry=function(){if(1===arguments.length){var t=arguments[0];return t.getFactory().buildGeometry(be.getLines(t))}if(2===arguments.length){var e=arguments[0],n=arguments[1];return e.getFactory().buildGeometry(be.getLines(e,n))}},be.getLines=function(){if(1===arguments.length){var t=arguments[0];return be.getLines(t,!1)}if(2===arguments.length){if(N(arguments[0],S)&&N(arguments[1],S)){for(var e=arguments[0],n=arguments[1],i=e.iterator();i.hasNext();){var r=i.next();be.getLines(r,n)}return n}if(arguments[0]instanceof K&&"boolean"==typeof arguments[1]){var s=arguments[0],o=arguments[1],a=new P;return s.apply(new be(a,o)),a}if(arguments[0]instanceof K&&N(arguments[1],S)){var u=arguments[0],l=arguments[1];return u instanceof At?l.add(u):u.apply(new be(l)),l}}else if(3===arguments.length){if("boolean"==typeof arguments[2]&&N(arguments[0],S)&&N(arguments[1],S)){var h=arguments[0],c=arguments[1],f=arguments[2];for(i=h.iterator();i.hasNext();){r=i.next();be.getLines(r,c,f)}return c}if("boolean"==typeof arguments[2]&&arguments[0]instanceof K&&N(arguments[1],S)){var g=arguments[0],d=arguments[1],_=arguments[2];return g.apply(new be(d,_)),d}}},e(Me.prototype,{visitItem:function(t){this._items.add(t)},getItems:function(){return this._items},interfaces_:function(){return[Ce]},getClass:function(){return Me}}),e(De.prototype,{countSegment:function(t,e){if(t.x<this._p.x&&e.x<this._p.x)return null;if(this._p.x===e.x&&this._p.y===e.y)return this._isPointOnSegment=!0,null;if(t.y===this._p.y&&e.y===this._p.y){var n=t.x,i=e.x;return n>i&&(n=e.x,i=t.x),this._p.x>=n&&this._p.x<=i&&(this._isPointOnSegment=!0),null}if(t.y>this._p.y&&e.y<=this._p.y||e.y>this._p.y&&t.y<=this._p.y){var r=z.index(t,e,this._p);if(r===z.COLLINEAR)return this._isPointOnSegment=!0,null;e.y<t.y&&(r=-r),r===z.LEFT&&this._crossingCount++}},isPointInPolygon:function(){return this.getLocation()!==de.EXTERIOR},getLocation:function(){return this._isPointOnSegment?de.BOUNDARY:this._crossingCount%2==1?de.INTERIOR:de.EXTERIOR},isOnSegment:function(){return this._isPointOnSegment},interfaces_:function(){return[]},getClass:function(){return De}}),De.locatePointInRing=function(){if(arguments[0]instanceof E&&N(arguments[1],H)){for(var t=arguments[0],e=arguments[1],n=new De(t),i=new E,r=new E,s=1;s<e.size();s++)if(e.getCoordinate(s,i),e.getCoordinate(s-1,r),n.countSegment(i,r),n.isOnSegment())return n.getLocation();return n.getLocation()}if(arguments[0]instanceof E&&arguments[1]instanceof Array){var o=arguments[0],a=arguments[1];for(n=new De(o),s=1;s<a.length;s++){i=a[s],r=a[s-1];if(n.countSegment(i,r),n.isOnSegment())return n.getLocation()}return n.getLocation()}},e(Ae.prototype,{locate:function(t){var e=new De(t),n=new Fe(e);return this._index.query(t.y,t.y,n),e.getLocation()},interfaces_:function(){return[Se]},getClass:function(){return Ae}}),e(Fe.prototype,{visitItem:function(t){var e=t;this._counter.countSegment(e.getCoordinate(0),e.getCoordinate(1))},interfaces_:function(){return[Ce]},getClass:function(){return Fe}}),e(Ge.prototype,{init:function(t){for(var e=be.getLines(t).iterator();e.hasNext();){var n=e.next().getCoordinates();this.addLine(n)}},addLine:function(t){for(var e=1;e<t.length;e++){var n=new ge(t[e-1],t[e]),i=Math.min(n.p0.y,n.p1.y),r=Math.max(n.p0.y,n.p1.y);this._index.insert(i,r,n)}},query:function(){if(2===arguments.length){var t=arguments[0],e=arguments[1],n=new Me;return this._index.query(t,e,n),n.getItems()}if(3===arguments.length){var i=arguments[0],r=arguments[1],s=arguments[2];this._index.query(i,r,s)}},interfaces_:function(){return[]},getClass:function(){return Ge}}),Ae.SegmentVisitor=Fe,Ae.IntervalIndexedGeometry=Ge,e(qe.prototype,{interfaces_:function(){return[]},getClass:function(){return qe}}),qe.isOnLine=function(){if(arguments[0]instanceof E&&N(arguments[1],H)){for(var t=arguments[0],e=arguments[1],n=new fe,i=new E,r=new E,s=e.size(),o=1;o<s;o++)if(e.getCoordinate(o-1,i),e.getCoordinate(o,r),n.computeIntersection(t,i,r),n.hasIntersection())return!0;return!1}if(arguments[0]instanceof E&&arguments[1]instanceof Array){var a=arguments[0],u=arguments[1];for(n=new fe,o=1;o<u.length;o++){i=u[o-1],r=u[o];if(n.computeIntersection(a,i,r),n.hasIntersection())return!0}return!1}},qe.locateInRing=function(t,e){return De.locatePointInRing(t,e)},qe.isInRing=function(t,e){return qe.locateInRing(t,e)!==de.EXTERIOR},e(Be.prototype,{next:function(){if(this._atStart)return this._atStart=!1,Be.isAtomic(this._parent)&&this._index++,this._parent;if(null!==this._subcollectionIterator){if(this._subcollectionIterator.hasNext())return this._subcollectionIterator.next();this._subcollectionIterator=null}if(this._index>=this._max)throw new R;var t=this._parent.getGeometryN(this._index++);return t instanceof Lt?(this._subcollectionIterator=new Be(t),this._subcollectionIterator.next()):t},remove:function(){throw new UnsupportedOperationException(this.getClass().getName())},hasNext:function(){if(this._atStart)return!0;if(null!==this._subcollectionIterator){if(this._subcollectionIterator.hasNext())return!0;this._subcollectionIterator=null}return!(this._index>=this._max)},interfaces_:function(){return[C]},getClass:function(){return Be}}),Be.isAtomic=function(t){return!(t instanceof Lt)},e(Ve.prototype,{locate:function(t){return Ve.locate(t,this._geom)},interfaces_:function(){return[Se]},getClass:function(){return Ve}}),Ve.locatePointInPolygon=function(t,e){if(e.isEmpty())return de.EXTERIOR;var n=e.getExteriorRing(),i=Ve.locatePointInRing(t,n);if(i!==de.INTERIOR)return i;for(var r=0;r<e.getNumInteriorRing();r++){var s=e.getInteriorRingN(r),o=Ve.locatePointInRing(t,s);if(o===de.BOUNDARY)return de.BOUNDARY;if(o===de.INTERIOR)return de.EXTERIOR}return de.INTERIOR},Ve.locatePointInRing=function(t,e){return e.getEnvelopeInternal().intersects(t)?qe.locateInRing(t,e.getCoordinates()):de.EXTERIOR},Ve.containsPointInPolygon=function(t,e){return de.EXTERIOR!==Ve.locatePointInPolygon(t,e)},Ve.locateInGeometry=function(t,e){if(e instanceof Vt)return Ve.locatePointInPolygon(t,e);if(e instanceof Lt)for(var n=new Be(e);n.hasNext();){var i=n.next();if(i!==e){var r=Ve.locateInGeometry(t,i);if(r!==de.EXTERIOR)return r}}return de.EXTERIOR},Ve.locate=function(t,e){return e.isEmpty()?de.EXTERIOR:Ve.locateInGeometry(t,e)},e(ze.prototype,{measure:function(t,e){},interfaces_:function(){return[]},getClass:function(){return ze}}),e(Ye.prototype,{measure:function(t,e){return t.intersection(e).getArea()/t.union(e).getArea()},interfaces_:function(){return[ze]},getClass:function(){return Ye}}),e(ke.prototype,{measure:function(t,e){var n=Ee.distance(t,e,ke.DENSIFY_FRACTION),i=new M(t.getEnvelopeInternal());i.expandToInclude(e.getEnvelopeInternal());var r=1-n/ke.diagonalSize(i);return r},interfaces_:function(){return[ze]},getClass:function(){return ke}}),ke.diagonalSize=function(t){if(t.isNull())return 0;var e=t.getWidth(),n=t.getHeight();return Math.sqrt(e*e+n*n)},ke.DENSIFY_FRACTION=.25,e(Ue.prototype,{interfaces_:function(){return[]},getClass:function(){return Ue}}),Ue.combine=function(t,e){return Math.min(t,e)},e(Xe.prototype,{setAreaBasePoint:function(t){this._areaBasePt=t},addPoint:function(t){this._ptCount+=1,this._ptCentSum.x+=t.x,this._ptCentSum.y+=t.y},addLineSegments:function(t){for(var e=0,n=0;n<t.length-1;n++){var i=t[n].distance(t[n+1]);if(0!==i){e+=i;var r=(t[n].x+t[n+1].x)/2;this._lineCentSum.x+=i*r;var s=(t[n].y+t[n+1].y)/2;this._lineCentSum.y+=i*s}}this._totalLength+=e,0===e&&t.length>0&&this.addPoint(t[0])},addHole:function(t){for(var e=z.isCCW(t),n=0;n<t.length-1;n++)this.addTriangle(this._areaBasePt,t[n],t[n+1],e);this.addLineSegments(t)},getCentroid:function(){var t=new E;if(Math.abs(this._areasum2)>0)t.x=this._cg3.x/3/this._areasum2,t.y=this._cg3.y/3/this._areasum2;else if(this._totalLength>0)t.x=this._lineCentSum.x/this._totalLength,t.y=this._lineCentSum.y/this._totalLength;else{if(!(this._ptCount>0))return null;t.x=this._ptCentSum.x/this._ptCount,t.y=this._ptCentSum.y/this._ptCount}return t},addShell:function(t){t.length>0&&this.setAreaBasePoint(t[0]);for(var e=!z.isCCW(t),n=0;n<t.length-1;n++)this.addTriangle(this._areaBasePt,t[n],t[n+1],e);this.addLineSegments(t)},addTriangle:function(t,e,n,i){var r=i?1:-1;Xe.centroid3(t,e,n,this._triangleCent3);var s=Xe.area2(t,e,n);this._cg3.x+=r*s*this._triangleCent3.x,this._cg3.y+=r*s*this._triangleCent3.y,this._areasum2+=r*s},add:function(){if(arguments[0]instanceof Vt){var t=arguments[0];this.addShell(t.getExteriorRing().getCoordinates());for(var e=0;e<t.getNumInteriorRing();e++)this.addHole(t.getInteriorRingN(e).getCoordinates())}else if(arguments[0]instanceof K){var n=arguments[0];if(n.isEmpty())return null;if(n instanceof Gt)this.addPoint(n.getCoordinate());else if(n instanceof At)this.addLineSegments(n.getCoordinates());else if(n instanceof Vt){var i=n;this.add(i)}else if(n instanceof Lt){var r=n;for(e=0;e<r.getNumGeometries();e++)this.add(r.getGeometryN(e))}}},interfaces_:function(){return[]},getClass:function(){return Xe}}),Xe.area2=function(t,e,n){return(e.x-t.x)*(n.y-t.y)-(n.x-t.x)*(e.y-t.y)},Xe.centroid3=function(t,e,n,i){return i.x=t.x+e.x+n.x,i.y=t.y+e.y+n.y,null},Xe.getCentroid=function(t){return new Xe(t).getCentroid()},e(He.prototype,{interfaces_:function(){return[]},getClass:function(){return He}}),He.orientationIndex=function(t,e,n){return V.orientationIndex(t,e,n)},He.signedArea=function(){if(arguments[0]instanceof Array){var t=arguments[0];if(t.length<3)return 0;for(var e=0,n=t[0].x,i=1;i<t.length-1;i++){var r=t[i].x-n,s=t[i+1].y;e+=r*(t[i-1].y-s)}return e/2}if(N(arguments[0],H)){var o=arguments[0],a=o.size();if(a<3)return 0;var u=new E,l=new E,h=new E;o.getCoordinate(0,l),o.getCoordinate(1,h);n=l.x;h.x-=n;for(e=0,i=1;i<a-1;i++)u.y=l.y,l.x=h.x,l.y=h.y,o.getCoordinate(i+1,h),h.x-=n,e+=l.x*(u.y-h.y);return e/2}},He.distanceLineLine=function(t,e,n,i){if(t.equals(e))return He.distancePointLine(t,n,i);if(n.equals(i))return He.distancePointLine(i,t,e);var r=!1;if(M.intersects(t,e,n,i)){var s=(e.x-t.x)*(i.y-n.y)-(e.y-t.y)*(i.x-n.x);if(0===s)r=!0;else{var o=(t.y-n.y)*(i.x-n.x)-(t.x-n.x)*(i.y-n.y),a=((t.y-n.y)*(e.x-t.x)-(t.x-n.x)*(e.y-t.y))/s,u=o/s;(u<0||u>1||a<0||a>1)&&(r=!0)}}else r=!0;return r?U.min(He.distancePointLine(t,n,i),He.distancePointLine(e,n,i),He.distancePointLine(n,t,e),He.distancePointLine(i,t,e)):0},He.isPointInRing=function(t,e){return He.locatePointInRing(t,e)!==de.EXTERIOR},He.computeLength=function(t){var e=t.size();if(e<=1)return 0;var n=0,i=new E;t.getCoordinate(0,i);for(var r=i.x,s=i.y,o=1;o<e;o++){t.getCoordinate(o,i);var a=i.x,u=i.y,l=a-r,h=u-s;n+=Math.sqrt(l*l+h*h),r=a,s=u}return n},He.isCCW=function(t){var e=t.length-1;if(e<3)throw new i("Ring has fewer than 4 points, so orientation cannot be determined");for(var n=t[0],r=0,s=1;s<=e;s++){var o=t[s];o.y>n.y&&(n=o,r=s)}var a=r;do{(a-=1)<0&&(a=e)}while(t[a].equals2D(n)&&a!==r);var u=r;do{u=(u+1)%e}while(t[u].equals2D(n)&&u!==r);var l=t[a],h=t[u];if(l.equals2D(n)||h.equals2D(n)||l.equals2D(h))return!1;var c=He.computeOrientation(l,n,h);return 0===c?l.x>h.x:c>0},He.locatePointInRing=function(t,e){return De.locatePointInRing(t,e)},He.distancePointLinePerpendicular=function(t,e,n){var i=(n.x-e.x)*(n.x-e.x)+(n.y-e.y)*(n.y-e.y),r=((e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y))/i;return Math.abs(r)*Math.sqrt(i)},He.computeOrientation=function(t,e,n){return He.orientationIndex(t,e,n)},He.distancePointLine=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1];if(0===e.length)throw new i("Line array must contain at least one vertex");for(var n=t.distance(e[0]),r=0;r<e.length-1;r++){var s=He.distancePointLine(t,e[r],e[r+1]);s<n&&(n=s)}return n}if(3===arguments.length){var o=arguments[0],a=arguments[1],u=arguments[2];if(a.x===u.x&&a.y===u.y)return o.distance(a);var l=(u.x-a.x)*(u.x-a.x)+(u.y-a.y)*(u.y-a.y),h=((o.x-a.x)*(u.x-a.x)+(o.y-a.y)*(u.y-a.y))/l;if(h<=0)return o.distance(a);if(h>=1)return o.distance(u);var c=((a.y-o.y)*(u.x-a.x)-(a.x-o.x)*(u.y-a.y))/l;return Math.abs(c)*Math.sqrt(l)}},He.isOnLine=function(t,e){for(var n=new fe,i=1;i<e.length;i++){var r=e[i-1],s=e[i];if(n.computeIntersection(t,r,s),n.hasIntersection())return!0}return!1},He.CLOCKWISE=-1,He.RIGHT=He.CLOCKWISE,He.COUNTERCLOCKWISE=1,He.LEFT=He.COUNTERCLOCKWISE,He.COLLINEAR=0,He.STRAIGHT=He.COLLINEAR,We.prototype=new Error,We.prototype.name="EmptyStackException",je.prototype=new w,je.prototype.add=function(t){return this.array_.push(t),!0},je.prototype.get=function(t){if(t<0||t>=this.size())throw new IndexOutOfBoundsException;return this.array_[t]},je.prototype.push=function(t){return this.array_.push(t),t},je.prototype.pop=function(t){if(0===this.array_.length)throw new We;return this.array_.pop()},je.prototype.peek=function(){if(0===this.array_.length)throw new We;return this.array_[this.array_.length-1]},je.prototype.empty=function(){return 0===this.array_.length},je.prototype.isEmpty=function(){return this.empty()},je.prototype.search=function(t){return this.array_.indexOf(t)},je.prototype.size=function(){return this.array_.length},je.prototype.toArray=function(){for(var t=[],e=0,n=this.array_.length;e<n;e++)t.push(this.array_[e]);return t},e(Ke.prototype,{filter:function(t){this.treeSet.contains(t)||(this.list.add(t),this.treeSet.add(t))},getCoordinates:function(){var t=new Array(this.list.size()).fill(null);return this.list.toArray(t)},interfaces_:function(){return[Z]},getClass:function(){return Ke}}),Ke.filterCoordinates=function(t){for(var e=new Ke,n=0;n<t.length;n++)e.filter(t[n]);return e.getCoordinates()},e(Ze.prototype,{preSort:function(t){for(var e=null,n=1;n<t.length;n++)(t[n].y<t[0].y||t[n].y===t[0].y&&t[n].x<t[0].x)&&(e=t[0],t[0]=t[n],t[n]=e);return It.sort(t,1,t.length,new Qe(t[0])),t},computeOctRing:function(t){var e=this.computeOctPts(t),n=new b;return n.add(e,!1),n.size()<3?null:(n.closeRing(),n.toCoordinateArray())},lineOrPolygon:function(t){if(3===(t=this.cleanRing(t)).length)return this._geomFactory.createLineString([t[0],t[1]]);var e=this._geomFactory.createLinearRing(t);return this._geomFactory.createPolygon(e)},cleanRing:function(t){x.equals(t[0],t[t.length-1]);for(var e=new P,n=null,i=0;i<=t.length-2;i++){var r=t[i],s=t[i+1];r.equals(s)||(null!==n&&this.isBetween(n,r,s)||(e.add(r),n=r))}e.add(t[t.length-1]);var o=new Array(e.size()).fill(null);return e.toArray(o)},isBetween:function(t,e,n){if(0!==z.index(t,e,n))return!1;if(t.x!==n.x){if(t.x<=e.x&&e.x<=n.x)return!0;if(n.x<=e.x&&e.x<=t.x)return!0}if(t.y!==n.y){if(t.y<=e.y&&e.y<=n.y)return!0;if(n.y<=e.y&&e.y<=t.y)return!0}return!1},reduce:function(t){var e=this.computeOctRing(t);if(null===e)return t;for(var n=new yt,i=0;i<e.length;i++)n.add(e[i]);for(i=0;i<t.length;i++)qe.isInRing(t[i],e)||n.add(t[i]);var r=nt.toCoordinateArray(n);return r.length<3?this.padArray3(r):r},getConvexHull:function(){if(0===this._inputPts.length)return this._geomFactory.createGeometryCollection();if(1===this._inputPts.length)return this._geomFactory.createPoint(this._inputPts[0]);if(2===this._inputPts.length)return this._geomFactory.createLineString(this._inputPts);var t=this._inputPts;this._inputPts.length>50&&(t=this.reduce(this._inputPts));var e=this.preSort(t),n=this.grahamScan(e),i=this.toCoordinateArray(n);return this.lineOrPolygon(i)},padArray3:function(t){for(var e=new Array(3).fill(null),n=0;n<e.length;n++)n<t.length?e[n]=t[n]:e[n]=t[0];return e},computeOctPts:function(t){for(var e=new Array(8).fill(null),n=0;n<e.length;n++)e[n]=t[0];for(var i=1;i<t.length;i++)t[i].x<e[0].x&&(e[0]=t[i]),t[i].x-t[i].y<e[1].x-e[1].y&&(e[1]=t[i]),t[i].y>e[2].y&&(e[2]=t[i]),t[i].x+t[i].y>e[3].x+e[3].y&&(e[3]=t[i]),t[i].x>e[4].x&&(e[4]=t[i]),t[i].x-t[i].y>e[5].x-e[5].y&&(e[5]=t[i]),t[i].y<e[6].y&&(e[6]=t[i]),t[i].x+t[i].y<e[7].x+e[7].y&&(e[7]=t[i]);return e},toCoordinateArray:function(t){for(var e=new Array(t.size()).fill(null),n=0;n<t.size();n++){var i=t.get(n);e[n]=i}return e},grahamScan:function(t){var e=null,n=new je;n.push(t[0]),n.push(t[1]),n.push(t[2]);for(var i=3;i<t.length;i++){for(e=n.pop();!n.empty()&&z.index(n.peek(),e,t[i])>0;)e=n.pop();n.push(e),n.push(t[i])}return n.push(t[0]),n},interfaces_:function(){return[]},getClass:function(){return Ze}}),Ze.extractCoordinates=function(t){var e=new Ke;return t.apply(e),e.getCoordinates()},e(Qe.prototype,{compare:function(t,e){var n=t,i=e;return Qe.polarCompare(this._origin,n,i)},interfaces_:function(){return[_]},getClass:function(){return Qe}}),Qe.polarCompare=function(t,e,n){var i=e.x-t.x,r=e.y-t.y,s=n.x-t.x,o=n.y-t.y,a=z.index(t,e,n);if(a===z.COUNTERCLOCKWISE)return 1;if(a===z.CLOCKWISE)return-1;var u=i*i+r*r,l=s*s+o*o;return u<l?-1:u>l?1:0},Ze.RadialComparator=Qe,e(Je.prototype,{addPolygon:function(t){if(t.isEmpty())return null;var e=null,n=null,i=this.horizontalBisector(t);if(0===i.getLength())n=0,e=i.getCoordinate();else{var r=i.intersection(t),s=this.widestGeometry(r);n=s.getEnvelopeInternal().getWidth(),e=Je.centre(s.getEnvelopeInternal())}(null===this._interiorPoint||n>this._maxWidth)&&(this._interiorPoint=e,this._maxWidth=n)},getInteriorPoint:function(){return this._interiorPoint},widestGeometry:function(){if(arguments[0]instanceof Lt){var t=arguments[0];if(t.isEmpty())return t;for(var e=t.getGeometryN(0),n=1;n<t.getNumGeometries();n++)t.getGeometryN(n).getEnvelopeInternal().getWidth()>e.getEnvelopeInternal().getWidth()&&(e=t.getGeometryN(n));return e}if(arguments[0]instanceof K){var i=arguments[0];return i instanceof Lt?this.widestGeometry(i):i}},horizontalBisector:function(t){var e=t.getEnvelopeInternal(),n=$e.getBisectorY(t);return this._factory.createLineString([new E(e.getMinX(),n),new E(e.getMaxX(),n)])},add:function(t){if(t instanceof Vt)this.addPolygon(t);else if(t instanceof Lt)for(var e=t,n=0;n<e.getNumGeometries();n++)this.add(e.getGeometryN(n))},interfaces_:function(){return[]},getClass:function(){return Je}}),Je.centre=function(t){return new E(Je.avg(t.getMinX(),t.getMaxX()),Je.avg(t.getMinY(),t.getMaxY()))},Je.avg=function(t,e){return(t+e)/2},e($e.prototype,{updateInterval:function(t){t<=this._centreY?t>this._loY&&(this._loY=t):t>this._centreY&&t<this._hiY&&(this._hiY=t)},getBisectorY:function(){this.process(this._poly.getExteriorRing());for(var t=0;t<this._poly.getNumInteriorRing();t++)this.process(this._poly.getInteriorRingN(t));return Je.avg(this._hiY,this._loY)},process:function(t){for(var e=t.getCoordinateSequence(),n=0;n<e.size();n++){var i=e.getY(n);this.updateInterval(i)}},interfaces_:function(){return[]},getClass:function(){return $e}}),$e.getBisectorY=function(t){return new $e(t).getBisectorY()},Je.SafeBisectorFinder=$e,e(tn.prototype,{addEndpoints:function(){if(arguments[0]instanceof K){var t=arguments[0];if(t instanceof At)this.addEndpoints(t.getCoordinates());else if(t instanceof Lt)for(var e=t,n=0;n<e.getNumGeometries();n++)this.addEndpoints(e.getGeometryN(n))}else if(arguments[0]instanceof Array){var i=arguments[0];this.add(i[0]),this.add(i[i.length-1])}},getInteriorPoint:function(){return this._interiorPoint},addInterior:function(){if(arguments[0]instanceof K){var t=arguments[0];if(t instanceof At)this.addInterior(t.getCoordinates());else if(t instanceof Lt)for(var e=t,n=0;n<e.getNumGeometries();n++)this.addInterior(e.getGeometryN(n))}else if(arguments[0]instanceof Array){var i=arguments[0];for(n=1;n<i.length-1;n++)this.add(i[n])}},add:function(t){var e=t.distance(this._centroid);e<this._minDistance&&(this._interiorPoint=new E(t),this._minDistance=e)},interfaces_:function(){return[]},getClass:function(){return tn}}),e(en.prototype,{getInteriorPoint:function(){return this._interiorPoint},add:function(){if(arguments[0]instanceof K){var t=arguments[0];if(t instanceof Gt)this.add(t.getCoordinate());else if(t instanceof Lt)for(var e=t,n=0;n<e.getNumGeometries();n++)this.add(e.getGeometryN(n))}else if(arguments[0]instanceof E){var i=arguments[0],r=i.distance(this._centroid);r<this._minDistance&&(this._interiorPoint=new E(i),this._minDistance=r)}},interfaces_:function(){return[]},getClass:function(){return en}}),e(nn.prototype,{select:function(){if(1===arguments.length);else if(2===arguments.length){var t=arguments[0],e=arguments[1];t.getLineSegment(e,this.selectedSegment),this.select(this.selectedSegment)}},interfaces_:function(){return[]},getClass:function(){return nn}}),e(rn.prototype,{hasChildren:function(){for(var t=0;t<2;t++)if(null!==this._subnode[t])return!0;return!1},isPrunable:function(){return!(this.hasChildren()||this.hasItems())},addAllItems:function(t){t.addAll(this._items);for(var e=0;e<2;e++)null!==this._subnode[e]&&this._subnode[e].addAllItems(t);return t},size:function(){for(var t=0,e=0;e<2;e++)null!==this._subnode[e]&&(t+=this._subnode[e].size());return t+this._items.size()},addAllItemsFromOverlapping:function(t,e){if(null!==t&&!this.isSearchMatch(t))return null;e.addAll(this._items),null!==this._subnode[0]&&this._subnode[0].addAllItemsFromOverlapping(t,e),null!==this._subnode[1]&&this._subnode[1].addAllItemsFromOverlapping(t,e)},hasItems:function(){return!this._items.isEmpty()},remove:function(t,e){if(!this.isSearchMatch(t))return!1;for(var n=!1,i=0;i<2;i++)if(null!==this._subnode[i]&&(n=this._subnode[i].remove(t,e))){this._subnode[i].isPrunable()&&(this._subnode[i]=null);break}return n||(n=this._items.remove(e))},getItems:function(){return this._items},depth:function(){for(var t=0,e=0;e<2;e++)if(null!==this._subnode[e]){var n=this._subnode[e].depth();n>t&&(t=n)}return t+1},nodeSize:function(){for(var t=0,e=0;e<2;e++)null!==this._subnode[e]&&(t+=this._subnode[e].nodeSize());return t+1},add:function(t){this._items.add(t)},interfaces_:function(){return[]},getClass:function(){return rn}}),rn.getSubnodeIndex=function(t,e){var n=-1;return t.min>=e&&(n=1),t.max<=e&&(n=0),n},e(sn.prototype,{expandToInclude:function(t){t.max>this.max&&(this.max=t.max),t.min<this.min&&(this.min=t.min)},getWidth:function(){return this.max-this.min},overlaps:function(){if(1===arguments.length){var t=arguments[0];return this.overlaps(t.min,t.max)}if(2===arguments.length){var e=arguments[0],n=arguments[1];return!(this.min>n||this.max<e)}},getMin:function(){return this.min},toString:function(){return"["+this.min+", "+this.max+"]"},contains:function(){if(1===arguments.length){if(arguments[0]instanceof sn){var t=arguments[0];return this.contains(t.min,t.max)}if("number"==typeof arguments[0]){var e=arguments[0];return e>=this.min&&e<=this.max}}else if(2===arguments.length){var n=arguments[0],i=arguments[1];return n>=this.min&&i<=this.max}},init:function(t,e){this.min=t,this.max=e,t>e&&(this.min=e,this.max=t)},getMax:function(){return this.max},interfaces_:function(){return[]},getClass:function(){return sn}}),on.exponent=function(t){return function(t,e){var n,i,r,s,o={32:8,64:11}[t];s||(n=e<0||1/e<0,isFinite(e)||(s={32:{d:127,c:128,b:0,a:0},64:{d:32752,c:0,b:0,a:0}}[t],n&&(s.d+=1<<t/4-1),i=Math.pow(2,o)-1,r=0));if(!s){for(i={32:127,64:1023}[t],r=Math.abs(e);r>=2;)i++,r/=2;for(;r<1&&i>0;)i--,r*=2;i<=0&&(r/=2),32===t&&i>254&&(s={d:n?255:127,c:128,b:0,a:0},i=Math.pow(2,o)-1,r=0)}return i}(64,t)-1023},on.powerOf2=function(t){return Math.pow(2,t)},e(an.prototype,{getInterval:function(){return this._interval},getLevel:function(){return this._level},computeKey:function(t){for(this._level=an.computeLevel(t),this._interval=new sn,this.computeInterval(this._level,t);!this._interval.contains(t);)this._level+=1,this.computeInterval(this._level,t)},computeInterval:function(t,e){var n=on.powerOf2(t);this._pt=Math.floor(e.getMin()/n)*n,this._interval.init(this._pt,this._pt+n)},getPoint:function(){return this._pt},interfaces_:function(){return[]},getClass:function(){return an}}),an.computeLevel=function(t){var e=t.getWidth();return on.exponent(e)+1},v(un,rn),e(un.prototype,{getInterval:function(){return this._interval},find:function(t){var e=rn.getSubnodeIndex(t,this._centre);return-1===e?this:null!==this._subnode[e]?this._subnode[e].find(t):this},insert:function(t){x.isTrue(null===this._interval||this._interval.contains(t._interval));var e=rn.getSubnodeIndex(t._interval,this._centre);if(t._level===this._level-1)this._subnode[e]=t;else{var n=this.createSubnode(e);n.insert(t),this._subnode[e]=n}},isSearchMatch:function(t){return t.overlaps(this._interval)},getSubnode:function(t){return null===this._subnode[t]&&(this._subnode[t]=this.createSubnode(t)),this._subnode[t]},getNode:function(t){var e=rn.getSubnodeIndex(t,this._centre);return-1!==e?this.getSubnode(e).getNode(t):this},createSubnode:function(t){var e=0,n=0;switch(t){case 0:e=this._interval.getMin(),n=this._centre;break;case 1:e=this._centre,n=this._interval.getMax()}return new un(new sn(e,n),this._level-1)},interfaces_:function(){return[]},getClass:function(){return un}}),un.createNode=function(t){var e=new an(t);return new un(e.getInterval(),e.getLevel())},un.createExpanded=function(t,e){var n=new sn(e);null!==t&&n.expandToInclude(t._interval);var i=un.createNode(n);return null!==t&&i.insert(t),i},e(ln.prototype,{interfaces_:function(){return[]},getClass:function(){return ln}}),ln.isZeroWidth=function(t,e){var n=e-t;if(0===n)return!0;var i=n/Math.max(Math.abs(t),Math.abs(e));return on.exponent(i)<=ln.MIN_BINARY_EXPONENT},ln.MIN_BINARY_EXPONENT=-50,v(hn,rn),e(hn.prototype,{insert:function(t,e){var n=rn.getSubnodeIndex(t,hn.origin);if(-1===n)return this.add(e),null;var i=this._subnode[n];if(null===i||!i.getInterval().contains(t)){var r=un.createExpanded(i,t);this._subnode[n]=r}this.insertContained(this._subnode[n],t,e)},isSearchMatch:function(t){return!0},insertContained:function(t,e,n){x.isTrue(t.getInterval().contains(e));(ln.isZeroWidth(e.getMin(),e.getMax())?t.find(e):t.getNode(e)).add(n)},interfaces_:function(){return[]},getClass:function(){return hn}}),hn.origin=0,e(cn.prototype,{size:function(){return null!==this._root?this._root.size():0},insert:function(t,e){this.collectStats(t);var n=cn.ensureExtent(t,this._minExtent);this._root.insert(n,e)},query:function(){if(1===arguments.length){if("number"==typeof arguments[0]){var t=arguments[0];return this.query(new sn(t,t))}if(arguments[0]instanceof sn){var e=arguments[0],n=new P;return this.query(e,n),n}}else if(2===arguments.length){var i=arguments[0],r=arguments[1];this._root.addAllItemsFromOverlapping(i,r)}},iterator:function(){var t=new P;return this._root.addAllItems(t),t.iterator()},remove:function(t,e){var n=cn.ensureExtent(t,this._minExtent);return this._root.remove(n,e)},collectStats:function(t){var e=t.getWidth();e<this._minExtent&&e>0&&(this._minExtent=e)},depth:function(){return null!==this._root?this._root.depth():0},nodeSize:function(){return null!==this._root?this._root.nodeSize():0},interfaces_:function(){return[]},getClass:function(){return cn}}),cn.ensureExtent=function(t,e){var n=t.getMin(),i=t.getMax();return n!==i?t:(n===i&&(i=(n-=e/2)+e/2),new sn(n,i))},e(fn.prototype,{getLineSegment:function(t,e){e.p0=this._pts[t],e.p1=this._pts[t+1]},computeSelect:function(t,e,n,i){var r=this._pts[e],s=this._pts[n];if(n-e==1)return i.select(this,e),null;if(!t.intersects(r,s))return null;var o=Math.trunc((e+n)/2);e<o&&this.computeSelect(t,e,o,i),o<n&&this.computeSelect(t,o,n,i)},getCoordinates:function(){for(var t=new Array(this._end-this._start+1).fill(null),e=0,n=this._start;n<=this._end;n++)t[e++]=this._pts[n];return t},computeOverlaps:function(){if(2===arguments.length){var t=arguments[0],e=arguments[1];this.computeOverlaps(this._start,this._end,t,t._start,t._end,e)}else if(6===arguments.length){var n=arguments[0],i=arguments[1],r=arguments[2],s=arguments[3],o=arguments[4],a=arguments[5];if(i-n==1&&o-s==1)return a.overlap(this,n,r,s),null;if(!this.overlaps(n,i,r,s,o))return null;var u=Math.trunc((n+i)/2),l=Math.trunc((s+o)/2);n<u&&(s<l&&this.computeOverlaps(n,u,r,s,l,a),l<o&&this.computeOverlaps(n,u,r,l,o,a)),u<i&&(s<l&&this.computeOverlaps(u,i,r,s,l,a),l<o&&this.computeOverlaps(u,i,r,l,o,a))}},setId:function(t){this._id=t},select:function(t,e){this.computeSelect(t,this._start,this._end,e)},getEnvelope:function(){if(null===this._env){var t=this._pts[this._start],e=this._pts[this._end];this._env=new M(t,e)}return this._env},overlaps:function(t,e,n,i,r){return M.intersects(this._pts[t],this._pts[e],n._pts[i],n._pts[r])},getEndIndex:function(){return this._end},getStartIndex:function(){return this._start},getContext:function(){return this._context},getId:function(){return this._id},interfaces_:function(){return[]},getClass:function(){return fn}}),e(gn.prototype,{interfaces_:function(){return[]},getClass:function(){return gn}}),gn.isNorthern=function(t){return t===gn.NE||t===gn.NW},gn.isOpposite=function(t,e){return t!==e&&2===(t-e+4)%4},gn.commonHalfPlane=function(t,e){if(t===e)return t;if(2===(t-e+4)%4)return-1;var n=t<e?t:e;return 0===n&&3===(t>e?t:e)?3:n},gn.isInHalfPlane=function(t,e){return e===gn.SE?t===gn.SE||t===gn.SW:t===e||t===e+1},gn.quadrant=function(){if("number"==typeof arguments[0]&&"number"==typeof arguments[1]){var t=arguments[0],e=arguments[1];if(0===t&&0===e)throw new i("Cannot compute the quadrant for point ( "+t+", "+e+" )");return t>=0?e>=0?gn.NE:gn.SE:e>=0?gn.NW:gn.SW}if(arguments[0]instanceof E&&arguments[1]instanceof E){var n=arguments[0],r=arguments[1];if(r.x===n.x&&r.y===n.y)throw new i("Cannot compute the quadrant for two identical points "+n);return r.x>=n.x?r.y>=n.y?gn.NE:gn.SE:r.y>=n.y?gn.NW:gn.SW}},gn.NE=0,gn.NW=1,gn.SW=2,gn.SE=3,e(dn.prototype,{interfaces_:function(){return[]},getClass:function(){return dn}}),dn.getChainStartIndices=function(t){var e=0,n=new P;n.add(new G(e));do{var i=dn.findChainEnd(t,e);n.add(new G(i)),e=i}while(e<t.length-1);return dn.toIntArray(n)},dn.findChainEnd=function(t,e){for(var n=e;n<t.length-1&&t[n].equals2D(t[n+1]);)n++;if(n>=t.length-1)return t.length-1;for(var i=gn.quadrant(t[n],t[n+1]),r=e+1;r<t.length;){if(!t[r-1].equals2D(t[r]))if(gn.quadrant(t[r-1],t[r])!==i)break;r++}return r-1},dn.getChains=function(){if(1===arguments.length){var t=arguments[0];return dn.getChains(t,null)}if(2===arguments.length){for(var e=arguments[0],n=arguments[1],i=new P,r=dn.getChainStartIndices(e),s=0;s<r.length-1;s++){var o=new fn(e,r[s],r[s+1],n);i.add(o)}return i}},dn.toIntArray=function(t){for(var e=new Array(t.size()).fill(null),n=0;n<e.length;n++)e[n]=t.get(n).intValue();return e},e(_n.prototype,{interfaces_:function(){return[]},getClass:function(){return _n}}),_n.orientationIndex=function(t,e,n){var i=e.x-t.x,r=e.y-t.y,s=n.x-e.x,o=n.y-e.y;return _n.signOfDet2x2(i,r,s,o)},_n.signOfDet2x2=function(t,e,n,i){var r=null,s=null,o=null;if(r=1,0===t||0===i)return 0===e||0===n?0:e>0?n>0?-r:r:n>0?r:-r;if(0===e||0===n)return i>0?t>0?r:-r:t>0?-r:r;if(0<e?0<i?e<=i||(r=-r,s=t,t=n,n=s,s=e,e=i,i=s):e<=-i?(r=-r,n=-n,i=-i):(s=t,t=-n,n=s,s=e,e=-i,i=s):0<i?-e<=i?(r=-r,t=-t,e=-e):(s=-t,t=n,n=s,s=-e,e=i,i=s):e>=i?(t=-t,e=-e,n=-n,i=-i):(r=-r,s=-t,t=-n,n=s,s=-e,e=-i,i=s),0<t){if(!(0<n))return r;if(!(t<=n))return r}else{if(0<n)return-r;if(!(t>=n))return-r;r=-r,t=-t,n=-n}for(;;){if(n-=(o=Math.floor(n/t))*t,(i-=o*e)<0)return-r;if(i>e)return r;if(t>n+n){if(e<i+i)return r}else{if(e>i+i)return-r;n=t-n,i=e-i,r=-r}if(0===i)return 0===n?0:-r;if(0===n)return r;if(t-=(o=Math.floor(t/n))*n,(e-=o*i)<0)return r;if(e>i)return-r;if(n>t+t){if(i<e+e)return-r}else{if(i>e+e)return r;t=n-t,e=i-e,r=-r}if(0===e)return 0===t?0:r;if(0===t)return-r}},e(pn.prototype,{isInside:function(t){},interfaces_:function(){return[]},getClass:function(){return pn}}),e(mn.prototype,{testLineSegment:function(t,e){var n,i,r,s,o=e.p0,a=e.p1;n=o.x-t.x,i=o.y-t.y,r=a.x-t.x,s=a.y-t.y,(i>0&&s<=0||s>0&&i<=0)&&0<_n.signOfDet2x2(n,i,r,s)/(s-i)&&this._crossings++},buildIndex:function(){this._tree=new cn;for(var t=nt.removeRepeatedPoints(this._ring.getCoordinates()),e=dn.getChains(t),n=0;n<e.size();n++){var i=e.get(n),r=i.getEnvelope();this._interval.min=r.getMinY(),this._interval.max=r.getMaxY(),this._tree.insert(this._interval,i)}},testMonotoneChain:function(t,e,n){n.select(t,e)},isInside:function(t){this._crossings=0;var e=new M(s.NEGATIVE_INFINITY,s.POSITIVE_INFINITY,t.y,t.y);this._interval.min=t.y,this._interval.max=t.y;for(var n=this._tree.query(this._interval),i=new vn(this,t),r=n.iterator();r.hasNext();){var o=r.next();this.testMonotoneChain(e,i,o)}return this._crossings%2==1},interfaces_:function(){return[pn]},getClass:function(){return mn}}),v(vn,nn),e(vn.prototype,{select:function(){if(1!==arguments.length)return nn.prototype.select.apply(this,arguments);var t=arguments[0];this.mcp.testLineSegment(this.p,t)},interfaces_:function(){return[]},getClass:function(){return vn}}),mn.MCSelecter=vn,e(yn.prototype,{getRadius:function(){return this.compute(),this._radius},getDiameter:function(){switch(this.compute(),this._extremalPts.length){case 0:return this._input.getFactory().createLineString();case 1:return this._input.getFactory().createPoint(this._centre)}var t=this._extremalPts[0],e=this._extremalPts[1];return this._input.getFactory().createLineString([t,e])},getExtremalPoints:function(){return this.compute(),this._extremalPts},computeCirclePoints:function(){if(this._input.isEmpty())return this._extremalPts=new Array(0).fill(null),null;if(1===this._input.getNumPoints()){var t=this._input.getCoordinates();return this._extremalPts=[new E(t[0])],null}var e=this._input.convexHull().getCoordinates();t=e;if(e[0].equals2D(e[e.length-1])&&(t=new Array(e.length-1).fill(null),nt.copyDeep(e,0,t,0,e.length-1)),t.length<=2)return this._extremalPts=nt.copyDeep(t),null;for(var n=yn.lowestPoint(t),i=yn.pointWitMinAngleWithX(t,n),r=0;r<t.length;r++){var s=yn.pointWithMinAngleWithSegment(t,n,i);if(pe.isObtuse(n,s,i))return this._extremalPts=[new E(n),new E(i)],null;if(pe.isObtuse(s,n,i))n=s;else{if(!pe.isObtuse(s,i,n))return this._extremalPts=[new E(n),new E(i),new E(s)],null;i=s}}x.shouldNeverReachHere("Logic failure in Minimum Bounding Circle algorithm!")},compute:function(){if(null!==this._extremalPts)return null;this.computeCirclePoints(),this.computeCentre(),null!==this._centre&&(this._radius=this._centre.distance(this._extremalPts[0]))},getFarthestPoints:function(){switch(this.compute(),this._extremalPts.length){case 0:return this._input.getFactory().createLineString();case 1:return this._input.getFactory().createPoint(this._centre)}var t=this._extremalPts[0],e=this._extremalPts[this._extremalPts.length-1];return this._input.getFactory().createLineString([t,e])},getCircle:function(){if(this.compute(),null===this._centre)return this._input.getFactory().createPolygon();var t=this._input.getFactory().createPoint(this._centre);return 0===this._radius?t:t.buffer(this._radius)},getCentre:function(){return this.compute(),this._centre},computeCentre:function(){switch(this._extremalPts.length){case 0:this._centre=null;break;case 1:this._centre=this._extremalPts[0];break;case 2:this._centre=new E((this._extremalPts[0].x+this._extremalPts[1].x)/2,(this._extremalPts[0].y+this._extremalPts[1].y)/2);break;case 3:this._centre=me.circumcentre(this._extremalPts[0],this._extremalPts[1],this._extremalPts[2])}},interfaces_:function(){return[]},getClass:function(){return yn}}),yn.pointWitMinAngleWithX=function(t,e){for(var n=s.MAX_VALUE,i=null,r=0;r<t.length;r++){var o=t[r];if(o!==e){var a=o.x-e.x,u=o.y-e.y;u<0&&(u=-u);var l=u/Math.sqrt(a*a+u*u);l<n&&(n=l,i=o)}}return i},yn.lowestPoint=function(t){for(var e=t[0],n=1;n<t.length;n++)t[n].y<e.y&&(e=t[n]);return e},yn.pointWithMinAngleWithSegment=function(t,e,n){for(var i=s.MAX_VALUE,r=null,o=0;o<t.length;o++){var a=t[o];if(a!==e&&a!==n){var u=pe.angleBetween(e,a,n);u<i&&(i=u,r=a)}}return r},e(xn.prototype,{getWidthCoordinate:function(){return this.computeMinimumDiameter(),this._minWidthPt},getSupportingSegment:function(){return this.computeMinimumDiameter(),this._inputGeom.getFactory().createLineString([this._minBaseSeg.p0,this._minBaseSeg.p1])},getDiameter:function(){if(this.computeMinimumDiameter(),null===this._minWidthPt)return this._inputGeom.getFactory().createLineString();var t=this._minBaseSeg.project(this._minWidthPt);return this._inputGeom.getFactory().createLineString([t,this._minWidthPt])},computeWidthConvex:function(t){this._convexHullPts=t instanceof Vt?t.getExteriorRing().getCoordinates():t.getCoordinates(),0===this._convexHullPts.length?(this._minWidth=0,this._minWidthPt=null,this._minBaseSeg=null):1===this._convexHullPts.length?(this._minWidth=0,this._minWidthPt=this._convexHullPts[0],this._minBaseSeg.p0=this._convexHullPts[0],this._minBaseSeg.p1=this._convexHullPts[0]):2===this._convexHullPts.length||3===this._convexHullPts.length?(this._minWidth=0,this._minWidthPt=this._convexHullPts[0],this._minBaseSeg.p0=this._convexHullPts[0],this._minBaseSeg.p1=this._convexHullPts[1]):this.computeConvexRingMinDiameter(this._convexHullPts)},computeConvexRingMinDiameter:function(t){this._minWidth=s.MAX_VALUE;for(var e=1,n=new ge,i=0;i<t.length-1;i++)n.p0=t[i],n.p1=t[i+1],e=this.findMaxPerpDistance(t,n,e)},computeMinimumDiameter:function(){if(null!==this._minWidthPt)return null;if(this._isConvex)this.computeWidthConvex(this._inputGeom);else{var t=new Ze(this._inputGeom).getConvexHull();this.computeWidthConvex(t)}},getLength:function(){return this.computeMinimumDiameter(),this._minWidth},findMaxPerpDistance:function(t,e,n){for(var i=e.distancePerpendicular(t[n]),r=i,s=n,o=s;r>=i;)i=r,s=o,o=xn.nextIndex(t,s),r=e.distancePerpendicular(t[o]);return i<this._minWidth&&(this._minPtIndex=s,this._minWidth=i,this._minWidthPt=t[this._minPtIndex],this._minBaseSeg=new ge(e)),s},getMinimumRectangle:function(){if(this.computeMinimumDiameter(),0===this._minWidth)return this._minBaseSeg.p0.equals2D(this._minBaseSeg.p1)?this._inputGeom.getFactory().createPoint(this._minBaseSeg.p0):this._minBaseSeg.toGeometry(this._inputGeom.getFactory());for(var t=this._minBaseSeg.p1.x-this._minBaseSeg.p0.x,e=this._minBaseSeg.p1.y-this._minBaseSeg.p0.y,n=s.MAX_VALUE,i=-s.MAX_VALUE,r=s.MAX_VALUE,o=-s.MAX_VALUE,a=0;a<this._convexHullPts.length;a++){var u=xn.computeC(t,e,this._convexHullPts[a]);u>i&&(i=u),u<n&&(n=u);var l=xn.computeC(-e,t,this._convexHullPts[a]);l>o&&(o=l),l<r&&(r=l)}var h=xn.computeSegmentForLine(-t,-e,o),c=xn.computeSegmentForLine(-t,-e,r),f=xn.computeSegmentForLine(-e,t,i),g=xn.computeSegmentForLine(-e,t,n),d=f.lineIntersection(h),_=g.lineIntersection(h),p=g.lineIntersection(c),m=f.lineIntersection(c),v=this._inputGeom.getFactory().createLinearRing([d,_,p,m,d]);return this._inputGeom.getFactory().createPolygon(v)},interfaces_:function(){return[]},getClass:function(){return xn}}),xn.nextIndex=function(t,e){return++e>=t.length&&(e=0),e},xn.computeC=function(t,e,n){return t*n.y-e*n.x},xn.getMinimumDiameter=function(t){return new xn(t).getDiameter()},xn.getMinimumRectangle=function(t){return new xn(t).getMinimumRectangle()},xn.computeSegmentForLine=function(t,e,n){var i=null,r=null;return Math.abs(e)>Math.abs(t)?(i=new E(0,n/e),r=new E(1,n/e-t/e)):(i=new E(n/t,0),r=new E(n/t-e/t,1)),new ge(i,r)};var En=Object.freeze({Angle:pe,Centroid:Xe,CGAlgorithms:He,ConvexHull:Ze,Distance:X,InteriorPointArea:Je,InteriorPointLine:tn,InteriorPointPoint:en,RobustLineIntersector:fe,MCPointInRing:mn,MinimumBoundingCircle:yn,MinimumDiameter:xn});function In(){this._inputGeom=null,this._factory=null,this._pruneEmptyGeometry=!0,this._preserveGeometryCollectionType=!0,this._preserveCollections=!1,this._preserveType=!1}function Nn(){this._inputGeom=null,this._distanceTolerance=null;var t=arguments[0];this._inputGeom=t}function Cn(){In.apply(this),this.distanceTolerance=null;var t=arguments[0];this.distanceTolerance=t}e(In.prototype,{transformPoint:function(t,e){return this._factory.createPoint(this.transformCoordinates(t.getCoordinateSequence(),t))},transformPolygon:function(t,e){var n=!0,i=this.transformLinearRing(t.getExteriorRing(),t);null!==i&&i instanceof Yt&&!i.isEmpty()||(n=!1);for(var r=new P,s=0;s<t.getNumInteriorRing();s++){var o=this.transformLinearRing(t.getInteriorRingN(s),t);null===o||o.isEmpty()||(o instanceof Yt||(n=!1),r.add(o))}if(n)return this._factory.createPolygon(i,r.toArray([]));var a=new P;return null!==i&&a.add(i),a.addAll(r),this._factory.buildGeometry(a)},createCoordinateSequence:function(t){return this._factory.getCoordinateSequenceFactory().create(t)},getInputGeometry:function(){return this._inputGeom},transformMultiLineString:function(t,e){for(var n=new P,i=0;i<t.getNumGeometries();i++){var r=this.transformLineString(t.getGeometryN(i),t);null!==r&&(r.isEmpty()||n.add(r))}return this._factory.buildGeometry(n)},transformCoordinates:function(t,e){return this.copy(t)},transformLineString:function(t,e){return this._factory.createLineString(this.transformCoordinates(t.getCoordinateSequence(),t))},transformMultiPoint:function(t,e){for(var n=new P,i=0;i<t.getNumGeometries();i++){var r=this.transformPoint(t.getGeometryN(i),t);null!==r&&(r.isEmpty()||n.add(r))}return this._factory.buildGeometry(n)},transformMultiPolygon:function(t,e){for(var n=new P,i=0;i<t.getNumGeometries();i++){var r=this.transformPolygon(t.getGeometryN(i),t);null!==r&&(r.isEmpty()||n.add(r))}return this._factory.buildGeometry(n)},copy:function(t){return t.copy()},transformGeometryCollection:function(t,e){for(var n=new P,i=0;i<t.getNumGeometries();i++){var r=this.transform(t.getGeometryN(i));null!==r&&(this._pruneEmptyGeometry&&r.isEmpty()||n.add(r))}return this._preserveGeometryCollectionType?this._factory.createGeometryCollection(se.toGeometryArray(n)):this._factory.buildGeometry(n)},transform:function(t){if(this._inputGeom=t,this._factory=t.getFactory(),t instanceof Gt)return this.transformPoint(t,null);if(t instanceof zt)return this.transformMultiPoint(t,null);if(t instanceof Yt)return this.transformLinearRing(t,null);if(t instanceof At)return this.transformLineString(t,null);if(t instanceof wt)return this.transformMultiLineString(t,null);if(t instanceof Vt)return this.transformPolygon(t,null);if(t instanceof kt)return this.transformMultiPolygon(t,null);if(t instanceof Lt)return this.transformGeometryCollection(t,null);throw new i("Unknown Geometry subtype: "+t.getClass().getName())},transformLinearRing:function(t,e){var n=this.transformCoordinates(t.getCoordinateSequence(),t);if(null===n)return this._factory.createLinearRing(null);var i=n.size();return i>0&&i<4&&!this._preserveType?this._factory.createLineString(n):this._factory.createLinearRing(n)},interfaces_:function(){return[]},getClass:function(){return In}}),e(Nn.prototype,{getResultGeometry:function(){return new Cn(this._distanceTolerance).transform(this._inputGeom)},setDistanceTolerance:function(t){if(t<=0)throw new i("Tolerance must be positive");this._distanceTolerance=t},interfaces_:function(){return[]},getClass:function(){return Nn}}),Nn.densifyPoints=function(t,e,n){for(var i=new ge,r=new b,s=0;s<t.length-1;s++){i.p0=t[s],i.p1=t[s+1],r.add(i.p0,!1);var o=i.getLength(),a=Math.trunc(o/e)+1;if(a>1)for(var u=o/a,l=1;l<a;l++){var h=l*u/o,c=i.pointAlong(h);n.makePrecise(c),r.add(c,!1)}}return r.add(t[t.length-1],!1),r.toCoordinateArray()},Nn.densify=function(t,e){var n=new Nn(t);return n.setDistanceTolerance(e),n.getResultGeometry()},v(Cn,In),e(Cn.prototype,{transformMultiPolygon:function(t,e){var n=In.prototype.transformMultiPolygon.call(this,t,e);return this.createValidArea(n)},transformPolygon:function(t,e){var n=In.prototype.transformPolygon.call(this,t,e);return e instanceof kt?n:this.createValidArea(n)},transformCoordinates:function(t,e){var n=t.toCoordinateArray(),i=Nn.densifyPoints(n,this.distanceTolerance,e.getPrecisionModel());return e instanceof At&&1===i.length&&(i=new Array(0).fill(null)),this._factory.getCoordinateSequenceFactory().create(i)},createValidArea:function(t){return t.buffer(0)},interfaces_:function(){return[]},getClass:function(){return Cn}}),Nn.DensifyTransformer=Cn;var Sn=Object.freeze({Densifier:Nn});function Ln(){this._orig=null,this._sym=null,this._next=null;var t=arguments[0];this._orig=t}function wn(){this._isMarked=!1;var t=arguments[0];Ln.call(this,t)}function Rn(){this._vertexMap=new ne}function Tn(){this._isStart=!1;var t=arguments[0];wn.call(this,t)}function Pn(){Rn.apply(this)}function On(){this._result=null,this._factory=null,this._graph=null,this._lines=new P,this._nodeEdgeStack=new je,this._ringStartEdge=null,this._graph=new Pn}e(Ln.prototype,{find:function(t){var e=this;do{if(null===e)return null;if(e.dest().equals2D(t))return e;e=e.oNext()}while(e!==this);return null},dest:function(){return this._sym._orig},oNext:function(){return this._sym._next},insert:function(t){if(this.oNext()===this)return this.insertAfter(t),null;var e=this.compareTo(t),n=this;do{var i=n.oNext();if(i.compareTo(t)!==e||i===this)return n.insertAfter(t),null;n=i}while(n!==this);x.shouldNeverReachHere()},insertAfter:function(t){x.equals(this._orig,t.orig());var e=this.oNext();this._sym.setNext(t),t.sym().setNext(e)},degree:function(){var t=0,e=this;do{t++,e=e.oNext()}while(e!==this);return t},equals:function(){if(2===arguments.length&&arguments[1]instanceof E&&arguments[0]instanceof E){var t=arguments[0],e=arguments[1];return this._orig.equals2D(t)&&this._sym._orig.equals(e)}},deltaY:function(){return this._sym._orig.y-this._orig.y},sym:function(){return this._sym},prev:function(){return this._sym.next()._sym},compareAngularDirection:function(t){var e=this.deltaX(),n=this.deltaY(),i=t.deltaX(),r=t.deltaY();if(e===i&&n===r)return 0;var s=gn.quadrant(e,n),o=gn.quadrant(i,r);return s>o?1:s<o?-1:z.index(t._orig,t.dest(),this.dest())},prevNode:function(){for(var t=this;2===t.degree();)if((t=t.prev())===this)return null;return t},compareTo:function(t){var e=t;return this.compareAngularDirection(e)},next:function(){return this._next},setSym:function(t){this._sym=t},orig:function(){return this._orig},toString:function(){return"HE("+this._orig.x+" "+this._orig.y+", "+this._sym._orig.x+" "+this._sym._orig.y+")"},setNext:function(t){this._next=t},init:function(t){this.setSym(t),t.setSym(this),this.setNext(t),t.setNext(this)},deltaX:function(){return this._sym._orig.x-this._orig.x},interfaces_:function(){return[]},getClass:function(){return Ln}}),Ln.init=function(t,e){if(null!==t._sym||null!==e._sym||null!==t._next||null!==e._next)throw new IllegalStateException("Edges are already initialized");return t.init(e),t},Ln.create=function(t,e){var n=new Ln(t),i=new Ln(e);return n.init(i),n},v(wn,Ln),e(wn.prototype,{mark:function(){this._isMarked=!0},setMark:function(t){this._isMarked=t},isMarked:function(){return this._isMarked},interfaces_:function(){return[]},getClass:function(){return wn}}),wn.setMarkBoth=function(t,e){t.setMark(e),t.sym().setMark(e)},wn.isMarked=function(t){return t.isMarked()},wn.setMark=function(t,e){t.setMark(e)},wn.markBoth=function(t){t.mark(),t.sym().mark()},wn.mark=function(t){t.mark()},e(Rn.prototype,{insert:function(t,e,n){var i=this.create(t,e);null!==n?n.insert(i):this._vertexMap.put(t,i);var r=this._vertexMap.get(e);return null!==r?r.insert(i.sym()):this._vertexMap.put(e,i.sym()),i},create:function(t,e){var n=this.createEdge(t),i=this.createEdge(e);return Ln.init(n,i),n},createEdge:function(t){return new Ln(t)},addEdge:function(t,e){if(!Rn.isValidEdge(t,e))return null;var n=this._vertexMap.get(t),i=null;return null!==n&&(i=n.find(e)),null!==i?i:this.insert(t,e,n)},getVertexEdges:function(){return this._vertexMap.values()},findEdge:function(t,e){var n=this._vertexMap.get(t);return null===n?null:n.find(e)},interfaces_:function(){return[]},getClass:function(){return Rn}}),Rn.isValidEdge=function(t,e){return 0!==e.compareTo(t)},v(Tn,wn),e(Tn.prototype,{setStart:function(){this._isStart=!0},isStart:function(){return this._isStart},interfaces_:function(){return[]},getClass:function(){return Tn}}),v(Pn,Rn),e(Pn.prototype,{createEdge:function(t){return new Tn(t)},interfaces_:function(){return[]},getClass:function(){return Pn}}),e(On.prototype,{addLine:function(t){this._lines.add(this._factory.createLineString(t.toCoordinateArray()))},updateRingStartEdge:function(t){return t.isStart()||(t=t.sym()).isStart()?null===this._ringStartEdge?(this._ringStartEdge=t,null):void(t.orig().compareTo(this._ringStartEdge.orig())<0&&(this._ringStartEdge=t)):null},getResult:function(){return null===this._result&&this.computeResult(),this._result},process:function(t){var e=t.prevNode();null===e&&(e=t),this.stackEdges(e),this.buildLines()},buildRing:function(t){var e=new b,n=t;for(e.add(n.orig().copy(),!1);2===n.sym().degree();){var i=n.next();if(i===t)break;e.add(i.orig().copy(),!1),n=i}e.add(n.dest().copy(),!1),this.addLine(e)},buildLine:function(t){var e=new b,n=t;for(this._ringStartEdge=null,wn.markBoth(n),e.add(n.orig().copy(),!1);2===n.sym().degree();){this.updateRingStartEdge(n);var i=n.next();if(i===t)return this.buildRing(this._ringStartEdge),null;e.add(i.orig().copy(),!1),n=i,wn.markBoth(n)}e.add(n.dest().clone(),!1),this.stackEdges(n.sym()),this.addLine(e)},stackEdges:function(t){var e=t;do{wn.isMarked(e)||this._nodeEdgeStack.add(e),e=e.oNext()}while(e!==t)},computeResult:function(){for(var t=this._graph.getVertexEdges().iterator();t.hasNext();){var e=t.next();wn.isMarked(e)||this.process(e)}this._result=this._factory.buildGeometry(this._lines)},buildLines:function(){for(;!this._nodeEdgeStack.empty();){var t=this._nodeEdgeStack.pop();wn.isMarked(t)||this.buildLine(t)}},add:function(){if(arguments[0]instanceof K)arguments[0].apply({interfaces_:function(){return[j]},filter:function(t){t instanceof At&&this.add(t)}});else if(N(arguments[0],S))for(var t=arguments[0].iterator();t.hasNext();){var e=t.next();this.add(e)}else if(arguments[0]instanceof At){var n=arguments[0];null===this._factory&&(this._factory=n.getFactory());var i=n.getCoordinateSequence(),r=!1;for(t=1;t<i.size();t++){var s=this._graph.addEdge(i.getCoordinate(t-1),i.getCoordinate(t));null!==s&&(r||(s.setStart(),r=!0))}}},interfaces_:function(){return[]},getClass:function(){return On}}),On.dissolve=function(t){var e=new On;return e.add(t),e.getResult()};var bn=Object.freeze({LineDissolver:On});function Mn(){if(this._boundaryRule=Q.OGC_SFS_BOUNDARY_RULE,this._isIn=null,this._numBoundaries=null,0===arguments.length);else if(1===arguments.length){var t=arguments[0];if(null===t)throw new i("Rule must be non-null");this._boundaryRule=t}}function Dn(){}function An(){this.mce=null,this.chainIndex=null;var t=arguments[0],e=arguments[1];this.mce=t,this.chainIndex=e}function Fn(){if(this._label=null,this._xValue=null,this._eventType=null,this._insertEvent=null,this._deleteEventIndex=null,this._obj=null,2===arguments.length){var t=arguments[0],e=arguments[1];this._eventType=Fn.DELETE,this._xValue=t,this._insertEvent=e}else if(3===arguments.length){var n=arguments[0],i=arguments[1],r=arguments[2];this._eventType=Fn.INSERT,this._label=n,this._xValue=i,this._obj=r}}function Gn(){}function qn(){this._hasIntersection=!1,this._hasProper=!1,this._hasProperInterior=!1,this._properIntersectionPoint=null,this._li=null,this._includeProper=null,this._recordIsolated=null,this._isSelfIntersection=null,this._numIntersections=0,this.numTests=0,this._bdyNodes=null,this._isDone=!1,this._isDoneWhenProperInt=!1;var t=arguments[0],e=arguments[1],n=arguments[2];this._li=t,this._includeProper=e,this._recordIsolated=n}function Bn(){Gn.apply(this),this.events=new P,this.nOverlaps=null}function Vn(){if(this.location=null,1===arguments.length){if(arguments[0]instanceof Array){var t=arguments[0];this.init(t.length)}else if(Number.isInteger(arguments[0])){var e=arguments[0];this.init(1),this.location[Dn.ON]=e}else if(arguments[0]instanceof Vn){var n=arguments[0];if(this.init(n.location.length),null!==n)for(var i=0;i<this.location.length;i++)this.location[i]=n.location[i]}}else if(3===arguments.length){var r=arguments[0],s=arguments[1],o=arguments[2];this.init(3),this.location[Dn.ON]=r,this.location[Dn.LEFT]=s,this.location[Dn.RIGHT]=o}}function zn(){if(this.elt=new Array(2).fill(null),1===arguments.length){if(Number.isInteger(arguments[0])){var t=arguments[0];this.elt[0]=new Vn(t),this.elt[1]=new Vn(t)}else if(arguments[0]instanceof zn){var e=arguments[0];this.elt[0]=new Vn(e.elt[0]),this.elt[1]=new Vn(e.elt[1])}}else if(2===arguments.length){var n=arguments[0],i=arguments[1];this.elt[0]=new Vn(de.NONE),this.elt[1]=new Vn(de.NONE),this.elt[n].setLocation(i)}else if(3===arguments.length){var r=arguments[0],s=arguments[1],o=arguments[2];this.elt[0]=new Vn(r,s,o),this.elt[1]=new Vn(r,s,o)}else if(4===arguments.length){var a=arguments[0],u=arguments[1],l=arguments[2],h=arguments[3];this.elt[0]=new Vn(de.NONE,de.NONE,de.NONE),this.elt[1]=new Vn(de.NONE,de.NONE,de.NONE),this.elt[a].setLocations(u,l,h)}}function Yn(){this.coord=null,this.segmentIndex=null,this.dist=null;var t=arguments[0],e=arguments[1],n=arguments[2];this.coord=new E(t),this.segmentIndex=e,this.dist=n}function kn(){this._nodeMap=new pt,this.edge=null;var t=arguments[0];this.edge=t}function Un(){}function Xn(){this.e=null,this.pts=null,this.startIndex=null;var t=arguments[0];this.e=t,this.pts=t.getCoordinates();var e=new Un;this.startIndex=e.getChainStartIndices(this.pts)}function Hn(){this._depth=Array(2).fill().map(function(){return Array(3)});for(var t=0;t<2;t++)for(var e=0;e<3;e++)this._depth[t][e]=Hn.NULL_VALUE}function Wn(){if(this._label=null,this._isInResult=!1,this._isCovered=!1,this._isCoveredSet=!1,this._isVisited=!1,0===arguments.length);else if(1===arguments.length){var t=arguments[0];this._label=t}}function jn(){if(Wn.apply(this),this.pts=null,this._env=null,this.eiList=new kn(this),this._name=null,this._mce=null,this._isIsolated=!0,this._depth=new Hn,this._depthDelta=0,1===arguments.length){var t=arguments[0];jn.call(this,t,null)}else if(2===arguments.length){var e=arguments[0],n=arguments[1];this.pts=e,this._label=n}}function Kn(){Wn.apply(this),this._coord=null,this._edges=null;var t=arguments[0],e=arguments[1];this._coord=t,this._edges=e,this._label=new zn(0,de.NONE)}function Zn(){this.nodeMap=new pt,this.nodeFact=null;var t=arguments[0];this.nodeFact=t}function Qn(){if(this._edge=null,this._label=null,this._node=null,this._p0=null,this._p1=null,this._dx=null,this._dy=null,this._quadrant=null,1===arguments.length){var t=arguments[0];this._edge=t}else if(3===arguments.length){var e=arguments[0],n=arguments[1],i=arguments[2];Qn.call(this,e,n,i,null)}else if(4===arguments.length){var r=arguments[0],s=arguments[1],o=arguments[2],a=arguments[3];Qn.call(this,r),this.init(s,o),this._label=a}}function Jn(){if(this.pt=null,1===arguments.length){var t=arguments[0];m.call(this,t)}else if(2===arguments.length){var e=arguments[0],n=arguments[1];m.call(this,Jn.msgWithCoord(e,n)),this.name="TopologyException",this.pt=new E(n)}}function $n(){this._isForward=null,this._isInResult=!1,this._isVisited=!1,this._sym=null,this._next=null,this._nextMin=null,this._edgeRing=null,this._minEdgeRing=null,this._depth=[0,-999,-999];var t=arguments[0],e=arguments[1];if(Qn.call(this,t),this._isForward=e,e)this.init(t.getCoordinate(0),t.getCoordinate(1));else{var n=t.getNumPoints()-1;this.init(t.getCoordinate(n),t.getCoordinate(n-1))}this.computeDirectedLabel()}function ti(){}function ei(){if(this._edges=new P,this._nodes=null,this._edgeEndList=new P,0===arguments.length)this._nodes=new Zn(new ti);else if(1===arguments.length){var t=arguments[0];this._nodes=new Zn(t)}}function ni(){if(ei.apply(this),this._parentGeom=null,this._lineEdgeMap=new ne,this._boundaryNodeRule=null,this._useBoundaryDeterminationRule=!0,this._argIndex=null,this._boundaryNodes=null,this._hasTooFewPoints=!1,this._invalidPoint=null,this._areaPtLocator=null,this._ptLocator=new Mn,2===arguments.length){var t=arguments[0],e=arguments[1];ni.call(this,t,e,Q.OGC_SFS_BOUNDARY_RULE)}else if(3===arguments.length){var n=arguments[0],i=arguments[1],r=arguments[2];this._argIndex=n,this._parentGeom=i,this._boundaryNodeRule=r,null!==i&&this.add(i)}}e(Mn.prototype,{locateInPolygonRing:function(t,e){return e.getEnvelopeInternal().intersects(t)?qe.locateInRing(t,e.getCoordinates()):de.EXTERIOR},intersects:function(t,e){return this.locate(t,e)!==de.EXTERIOR},updateLocationInfo:function(t){t===de.INTERIOR&&(this._isIn=!0),t===de.BOUNDARY&&this._numBoundaries++},computeLocation:function(t,e){if(e instanceof Gt&&this.updateLocationInfo(this.locateOnPoint(t,e)),e instanceof At)this.updateLocationInfo(this.locateOnLineString(t,e));else if(e instanceof Vt)this.updateLocationInfo(this.locateInPolygon(t,e));else if(e instanceof wt)for(var n=e,i=0;i<n.getNumGeometries();i++){var r=n.getGeometryN(i);this.updateLocationInfo(this.locateOnLineString(t,r))}else if(e instanceof kt){var s=e;for(i=0;i<s.getNumGeometries();i++){var o=s.getGeometryN(i);this.updateLocationInfo(this.locateInPolygon(t,o))}}else if(e instanceof Lt)for(var a=new Be(e);a.hasNext();){var u=a.next();u!==e&&this.computeLocation(t,u)}},locateOnPoint:function(t,e){return e.getCoordinate().equals2D(t)?de.INTERIOR:de.EXTERIOR},locateOnLineString:function(t,e){if(!e.getEnvelopeInternal().intersects(t))return de.EXTERIOR;var n=e.getCoordinateSequence();return e.isClosed()||!t.equals(n.getCoordinate(0))&&!t.equals(n.getCoordinate(n.size()-1))?qe.isOnLine(t,n)?de.INTERIOR:de.EXTERIOR:de.BOUNDARY},locateInPolygon:function(t,e){if(e.isEmpty())return de.EXTERIOR;var n=e.getExteriorRing(),i=this.locateInPolygonRing(t,n);if(i===de.EXTERIOR)return de.EXTERIOR;if(i===de.BOUNDARY)return de.BOUNDARY;for(var r=0;r<e.getNumInteriorRing();r++){var s=e.getInteriorRingN(r),o=this.locateInPolygonRing(t,s);if(o===de.INTERIOR)return de.EXTERIOR;if(o===de.BOUNDARY)return de.BOUNDARY}return de.INTERIOR},locate:function(t,e){return e.isEmpty()?de.EXTERIOR:e instanceof At?this.locateOnLineString(t,e):e instanceof Vt?this.locateInPolygon(t,e):(this._isIn=!1,this._numBoundaries=0,this.computeLocation(t,e),this._boundaryRule.isInBoundary(this._numBoundaries)?de.BOUNDARY:this._numBoundaries>0||this._isIn?de.INTERIOR:de.EXTERIOR)},interfaces_:function(){return[]},getClass:function(){return Mn}}),e(Dn.prototype,{interfaces_:function(){return[]},getClass:function(){return Dn}}),Dn.opposite=function(t){return t===Dn.LEFT?Dn.RIGHT:t===Dn.RIGHT?Dn.LEFT:t},Dn.ON=0,Dn.LEFT=1,Dn.RIGHT=2,e(An.prototype,{computeIntersections:function(t,e){this.mce.computeIntersectsForChain(this.chainIndex,t.mce,t.chainIndex,e)},interfaces_:function(){return[]},getClass:function(){return An}}),e(Fn.prototype,{isDelete:function(){return this._eventType===Fn.DELETE},setDeleteEventIndex:function(t){this._deleteEventIndex=t},getObject:function(){return this._obj},compareTo:function(t){var e=t;return this._xValue<e._xValue?-1:this._xValue>e._xValue?1:this._eventType<e._eventType?-1:this._eventType>e._eventType?1:0},getInsertEvent:function(){return this._insertEvent},isInsert:function(){return this._eventType===Fn.INSERT},isSameLabel:function(t){return null!==this._label&&this._label===t._label},getDeleteEventIndex:function(){return this._deleteEventIndex},interfaces_:function(){return[g]},getClass:function(){return Fn}}),Fn.INSERT=1,Fn.DELETE=2,e(Gn.prototype,{interfaces_:function(){return[]},getClass:function(){return Gn}}),e(qn.prototype,{isTrivialIntersection:function(t,e,n,i){if(t===n&&1===this._li.getIntersectionNum()){if(qn.isAdjacentSegments(e,i))return!0;if(t.isClosed()){var r=t.getNumPoints()-1;if(0===e&&i===r||0===i&&e===r)return!0}}return!1},getProperIntersectionPoint:function(){return this._properIntersectionPoint},setIsDoneIfProperInt:function(t){this._isDoneWhenProperInt=t},hasProperInteriorIntersection:function(){return this._hasProperInterior},isBoundaryPointInternal:function(t,e){for(var n=e.iterator();n.hasNext();){var i=n.next().getCoordinate();if(t.isIntersection(i))return!0}return!1},hasProperIntersection:function(){return this._hasProper},hasIntersection:function(){return this._hasIntersection},isDone:function(){return this._isDone},isBoundaryPoint:function(t,e){return null!==e&&(!!this.isBoundaryPointInternal(t,e[0])||!!this.isBoundaryPointInternal(t,e[1]))},setBoundaryNodes:function(t,e){this._bdyNodes=new Array(2).fill(null),this._bdyNodes[0]=t,this._bdyNodes[1]=e},addIntersections:function(t,e,n,i){if(t===n&&e===i)return null;this.numTests++;var r=t.getCoordinates()[e],s=t.getCoordinates()[e+1],o=n.getCoordinates()[i],a=n.getCoordinates()[i+1];this._li.computeIntersection(r,s,o,a),this._li.hasIntersection()&&(this._recordIsolated&&(t.setIsolated(!1),n.setIsolated(!1)),this._numIntersections++,this.isTrivialIntersection(t,e,n,i)||(this._hasIntersection=!0,!this._includeProper&&this._li.isProper()||(t.addIntersections(this._li,e,0),n.addIntersections(this._li,i,1)),this._li.isProper()&&(this._properIntersectionPoint=this._li.getIntersection(0).copy(),this._hasProper=!0,this._isDoneWhenProperInt&&(this._isDone=!0),this.isBoundaryPoint(this._li,this._bdyNodes)||(this._hasProperInterior=!0))))},interfaces_:function(){return[]},getClass:function(){return qn}}),qn.isAdjacentSegments=function(t,e){return 1===Math.abs(t-e)},v(Bn,Gn),e(Bn.prototype,{prepareEvents:function(){Te.sort(this.events);for(var t=0;t<this.events.size();t++){var e=this.events.get(t);e.isDelete()&&e.getInsertEvent().setDeleteEventIndex(t)}},computeIntersections:function(){if(1===arguments.length){var t=arguments[0];this.nOverlaps=0,this.prepareEvents();for(var e=0;e<this.events.size();e++){var n=this.events.get(e);if(n.isInsert()&&this.processOverlaps(e,n.getDeleteEventIndex(),n,t),t.isDone())break}}else if(3===arguments.length)if(arguments[2]instanceof qn&&N(arguments[0],w)&&N(arguments[1],w)){var i=arguments[0],r=arguments[1],s=arguments[2];this.addEdges(i,i),this.addEdges(r,r),this.computeIntersections(s)}else if("boolean"==typeof arguments[2]&&N(arguments[0],w)&&arguments[1]instanceof qn){var o=arguments[0],a=arguments[1];arguments[2]?this.addEdges(o,null):this.addEdges(o),this.computeIntersections(a)}},addEdge:function(t,e){for(var n=t.getMonotoneChainEdge(),i=n.getStartIndexes(),r=0;r<i.length-1;r++){var s=new An(n,r),o=new Fn(e,n.getMinX(r),s);this.events.add(o),this.events.add(new Fn(n.getMaxX(r),o))}},processOverlaps:function(t,e,n,i){for(var r=n.getObject(),s=t;s<e;s++){var o=this.events.get(s);if(o.isInsert()){var a=o.getObject();n.isSameLabel(o)||(r.computeIntersections(a,i),this.nOverlaps++)}}},addEdges:function(){if(1===arguments.length)for(var t=arguments[0].iterator();t.hasNext();){var e=t.next();this.addEdge(e,e)}else if(2===arguments.length){var n=arguments[0],i=arguments[1];for(t=n.iterator();t.hasNext();){e=t.next();this.addEdge(e,i)}}},interfaces_:function(){return[]},getClass:function(){return Bn}}),e(Vn.prototype,{setAllLocations:function(t){for(var e=0;e<this.location.length;e++)this.location[e]=t},isNull:function(){for(var t=0;t<this.location.length;t++)if(this.location[t]!==de.NONE)return!1;return!0},setAllLocationsIfNull:function(t){for(var e=0;e<this.location.length;e++)this.location[e]===de.NONE&&(this.location[e]=t)},isLine:function(){return 1===this.location.length},merge:function(t){if(t.location.length>this.location.length){var e=new Array(3).fill(null);e[Dn.ON]=this.location[Dn.ON],e[Dn.LEFT]=de.NONE,e[Dn.RIGHT]=de.NONE,this.location=e}for(var n=0;n<this.location.length;n++)this.location[n]===de.NONE&&n<t.location.length&&(this.location[n]=t.location[n])},getLocations:function(){return this.location},flip:function(){if(this.location.length<=1)return null;var t=this.location[Dn.LEFT];this.location[Dn.LEFT]=this.location[Dn.RIGHT],this.location[Dn.RIGHT]=t},toString:function(){var t=new F;return this.location.length>1&&t.append(de.toLocationSymbol(this.location[Dn.LEFT])),t.append(de.toLocationSymbol(this.location[Dn.ON])),this.location.length>1&&t.append(de.toLocationSymbol(this.location[Dn.RIGHT])),t.toString()},setLocations:function(t,e,n){this.location[Dn.ON]=t,this.location[Dn.LEFT]=e,this.location[Dn.RIGHT]=n},get:function(t){return t<this.location.length?this.location[t]:de.NONE},isArea:function(){return this.location.length>1},isAnyNull:function(){for(var t=0;t<this.location.length;t++)if(this.location[t]===de.NONE)return!0;return!1},setLocation:function(){if(1===arguments.length){var t=arguments[0];this.setLocation(Dn.ON,t)}else if(2===arguments.length){var e=arguments[0],n=arguments[1];this.location[e]=n}},init:function(t){this.location=new Array(t).fill(null),this.setAllLocations(de.NONE)},isEqualOnSide:function(t,e){return this.location[e]===t.location[e]},allPositionsEqual:function(t){for(var e=0;e<this.location.length;e++)if(this.location[e]!==t)return!1;return!0},interfaces_:function(){return[]},getClass:function(){return Vn}}),e(zn.prototype,{getGeometryCount:function(){var t=0;return this.elt[0].isNull()||t++,this.elt[1].isNull()||t++,t},setAllLocations:function(t,e){this.elt[t].setAllLocations(e)},isNull:function(t){return this.elt[t].isNull()},setAllLocationsIfNull:function(){if(1===arguments.length){var t=arguments[0];this.setAllLocationsIfNull(0,t),this.setAllLocationsIfNull(1,t)}else if(2===arguments.length){var e=arguments[0],n=arguments[1];this.elt[e].setAllLocationsIfNull(n)}},isLine:function(t){return this.elt[t].isLine()},merge:function(t){for(var e=0;e<2;e++)null===this.elt[e]&&null!==t.elt[e]?this.elt[e]=new Vn(t.elt[e]):this.elt[e].merge(t.elt[e])},flip:function(){this.elt[0].flip(),this.elt[1].flip()},getLocation:function(){if(1===arguments.length){var t=arguments[0];return this.elt[t].get(Dn.ON)}if(2===arguments.length){var e=arguments[0],n=arguments[1];return this.elt[e].get(n)}},toString:function(){var t=new F;return null!==this.elt[0]&&(t.append("A:"),t.append(this.elt[0].toString())),null!==this.elt[1]&&(t.append(" B:"),t.append(this.elt[1].toString())),t.toString()},isArea:function(){if(0===arguments.length)return this.elt[0].isArea()||this.elt[1].isArea();if(1===arguments.length){var t=arguments[0];return this.elt[t].isArea()}},isAnyNull:function(t){return this.elt[t].isAnyNull()},setLocation:function(){if(2===arguments.length){var t=arguments[0],e=arguments[1];this.elt[t].setLocation(Dn.ON,e)}else if(3===arguments.length){var n=arguments[0],i=arguments[1],r=arguments[2];this.elt[n].setLocation(i,r)}},isEqualOnSide:function(t,e){return this.elt[0].isEqualOnSide(t.elt[0],e)&&this.elt[1].isEqualOnSide(t.elt[1],e)},allPositionsEqual:function(t,e){return this.elt[t].allPositionsEqual(e)},toLine:function(t){this.elt[t].isArea()&&(this.elt[t]=new Vn(this.elt[t].location[0]))},interfaces_:function(){return[]},getClass:function(){return zn}}),zn.toLineLabel=function(t){for(var e=new zn(de.NONE),n=0;n<2;n++)e.setLocation(n,t.getLocation(n));return e},e(Yn.prototype,{getSegmentIndex:function(){return this.segmentIndex},getCoordinate:function(){return this.coord},print:function(t){t.print(this.coord),t.print(" seg # = "+this.segmentIndex),t.println(" dist = "+this.dist)},compareTo:function(t){var e=t;return this.compare(e.segmentIndex,e.dist)},isEndPoint:function(t){return 0===this.segmentIndex&&0===this.dist||this.segmentIndex===t},toString:function(){return this.coord+" seg # = "+this.segmentIndex+" dist = "+this.dist},getDistance:function(){return this.dist},compare:function(t,e){return this.segmentIndex<t?-1:this.segmentIndex>t?1:this.dist<e?-1:this.dist>e?1:0},interfaces_:function(){return[g]},getClass:function(){return Yn}}),e(kn.prototype,{print:function(t){t.println("Intersections:");for(var e=this.iterator();e.hasNext();){e.next().print(t)}},iterator:function(){return this._nodeMap.values().iterator()},addSplitEdges:function(t){this.addEndpoints();for(var e=this.iterator(),n=e.next();e.hasNext();){var i=e.next(),r=this.createSplitEdge(n,i);t.add(r),n=i}},addEndpoints:function(){var t=this.edge.pts.length-1;this.add(this.edge.pts[0],0,0),this.add(this.edge.pts[t],t,0)},createSplitEdge:function(t,e){var n=e.segmentIndex-t.segmentIndex+2,i=this.edge.pts[e.segmentIndex],r=e.dist>0||!e.coord.equals2D(i);r||n--;var s=new Array(n).fill(null),o=0;s[o++]=new E(t.coord);for(var a=t.segmentIndex+1;a<=e.segmentIndex;a++)s[o++]=this.edge.pts[a];return r&&(s[o]=e.coord),new jn(s,new zn(this.edge._label))},add:function(t,e,n){var i=new Yn(t,e,n),r=this._nodeMap.get(i);return null!==r?r:(this._nodeMap.put(i,i),i)},isIntersection:function(t){for(var e=this.iterator();e.hasNext();){if(e.next().coord.equals(t))return!0}return!1},interfaces_:function(){return[]},getClass:function(){return kn}}),e(Un.prototype,{getChainStartIndices:function(t){var e=0,n=new P;n.add(new G(e));do{var i=this.findChainEnd(t,e);n.add(new G(i)),e=i}while(e<t.length-1);return Un.toIntArray(n)},findChainEnd:function(t,e){for(var n=gn.quadrant(t[e],t[e+1]),i=e+1;i<t.length;){if(gn.quadrant(t[i-1],t[i])!==n)break;i++}return i-1},interfaces_:function(){return[]},getClass:function(){return Un}}),Un.toIntArray=function(t){for(var e=new Array(t.size()).fill(null),n=0;n<e.length;n++)e[n]=t.get(n).intValue();return e},e(Xn.prototype,{getCoordinates:function(){return this.pts},getMaxX:function(t){var e=this.pts[this.startIndex[t]].x,n=this.pts[this.startIndex[t+1]].x;return e>n?e:n},getMinX:function(t){var e=this.pts[this.startIndex[t]].x,n=this.pts[this.startIndex[t+1]].x;return e<n?e:n},computeIntersectsForChain:function(){if(4===arguments.length){var t=arguments[0],e=arguments[1],n=arguments[2],i=arguments[3];this.computeIntersectsForChain(this.startIndex[t],this.startIndex[t+1],e,e.startIndex[n],e.startIndex[n+1],i)}else if(6===arguments.length){var r=arguments[0],s=arguments[1],o=arguments[2],a=arguments[3],u=arguments[4],l=arguments[5];if(s-r==1&&u-a==1)return l.addIntersections(this.e,r,o.e,a),null;if(!this.overlaps(r,s,o,a,u))return null;var h=Math.trunc((r+s)/2),c=Math.trunc((a+u)/2);r<h&&(a<c&&this.computeIntersectsForChain(r,h,o,a,c,l),c<u&&this.computeIntersectsForChain(r,h,o,c,u,l)),h<s&&(a<c&&this.computeIntersectsForChain(h,s,o,a,c,l),c<u&&this.computeIntersectsForChain(h,s,o,c,u,l))}},overlaps:function(t,e,n,i,r){return M.intersects(this.pts[t],this.pts[e],n.pts[i],n.pts[r])},getStartIndexes:function(){return this.startIndex},computeIntersects:function(t,e){for(var n=0;n<this.startIndex.length-1;n++)for(var i=0;i<t.startIndex.length-1;i++)this.computeIntersectsForChain(n,t,i,e)},interfaces_:function(){return[]},getClass:function(){return Xn}}),e(Hn.prototype,{getDepth:function(t,e){return this._depth[t][e]},setDepth:function(t,e,n){this._depth[t][e]=n},isNull:function(){if(0===arguments.length){for(var t=0;t<2;t++)for(var e=0;e<3;e++)if(this._depth[t][e]!==Hn.NULL_VALUE)return!1;return!0}if(1===arguments.length){var n=arguments[0];return this._depth[n][1]===Hn.NULL_VALUE}if(2===arguments.length){var i=arguments[0],r=arguments[1];return this._depth[i][r]===Hn.NULL_VALUE}},normalize:function(){for(var t=0;t<2;t++)if(!this.isNull(t)){var e=this._depth[t][1];this._depth[t][2]<e&&(e=this._depth[t][2]),e<0&&(e=0);for(var n=1;n<3;n++){var i=0;this._depth[t][n]>e&&(i=1),this._depth[t][n]=i}}},getDelta:function(t){return this._depth[t][Dn.RIGHT]-this._depth[t][Dn.LEFT]},getLocation:function(t,e){return this._depth[t][e]<=0?de.EXTERIOR:de.INTERIOR},toString:function(){return"A: "+this._depth[0][1]+","+this._depth[0][2]+" B: "+this._depth[1][1]+","+this._depth[1][2]},add:function(){if(1===arguments.length)for(var t=arguments[0],e=0;e<2;e++)for(var n=1;n<3;n++){var i=t.getLocation(e,n);i!==de.EXTERIOR&&i!==de.INTERIOR||(this.isNull(e,n)?this._depth[e][n]=Hn.depthAtLocation(i):this._depth[e][n]+=Hn.depthAtLocation(i))}else if(3===arguments.length){var r=arguments[0],s=arguments[1];arguments[2]===de.INTERIOR&&this._depth[r][s]++}},interfaces_:function(){return[]},getClass:function(){return Hn}}),Hn.depthAtLocation=function(t){return t===de.EXTERIOR?0:t===de.INTERIOR?1:Hn.NULL_VALUE},Hn.NULL_VALUE=-1,e(Wn.prototype,{setVisited:function(t){this._isVisited=t},setInResult:function(t){this._isInResult=t},isCovered:function(){return this._isCovered},isCoveredSet:function(){return this._isCoveredSet},setLabel:function(t){this._label=t},getLabel:function(){return this._label},setCovered:function(t){this._isCovered=t,this._isCoveredSet=!0},updateIM:function(t){x.isTrue(this._label.getGeometryCount()>=2,"found partial label"),this.computeIM(t)},isInResult:function(){return this._isInResult},isVisited:function(){return this._isVisited},interfaces_:function(){return[]},getClass:function(){return Wn}}),v(jn,Wn),e(jn.prototype,{getDepth:function(){return this._depth},getCollapsedEdge:function(){var t=new Array(2).fill(null);return t[0]=this.pts[0],t[1]=this.pts[1],new jn(t,zn.toLineLabel(this._label))},isIsolated:function(){return this._isIsolated},getCoordinates:function(){return this.pts},setIsolated:function(t){this._isIsolated=t},setName:function(t){this._name=t},equals:function(t){if(!(t instanceof jn))return!1;var e=t;if(this.pts.length!==e.pts.length)return!1;for(var n=!0,i=!0,r=this.pts.length,s=0;s<this.pts.length;s++)if(this.pts[s].equals2D(e.pts[s])||(n=!1),this.pts[s].equals2D(e.pts[--r])||(i=!1),!n&&!i)return!1;return!0},getCoordinate:function(){if(0===arguments.length)return this.pts.length>0?this.pts[0]:null;if(1===arguments.length){var t=arguments[0];return this.pts[t]}},print:function(t){t.print("edge "+this._name+": "),t.print("LINESTRING (");for(var e=0;e<this.pts.length;e++)e>0&&t.print(","),t.print(this.pts[e].x+" "+this.pts[e].y);t.print(")  "+this._label+" "+this._depthDelta)},computeIM:function(t){jn.updateIM(this._label,t)},isCollapsed:function(){return!!this._label.isArea()&&(3===this.pts.length&&!!this.pts[0].equals(this.pts[2]))},isClosed:function(){return this.pts[0].equals(this.pts[this.pts.length-1])},getMaximumSegmentIndex:function(){return this.pts.length-1},getDepthDelta:function(){return this._depthDelta},getNumPoints:function(){return this.pts.length},printReverse:function(t){t.print("edge "+this._name+": ");for(var e=this.pts.length-1;e>=0;e--)t.print(this.pts[e]+" ");t.println("")},getMonotoneChainEdge:function(){return null===this._mce&&(this._mce=new Xn(this)),this._mce},getEnvelope:function(){if(null===this._env){this._env=new M;for(var t=0;t<this.pts.length;t++)this._env.expandToInclude(this.pts[t])}return this._env},addIntersection:function(t,e,n,i){var r=new E(t.getIntersection(i)),s=e,o=t.getEdgeDistance(n,i),a=s+1;if(a<this.pts.length){var u=this.pts[a];r.equals2D(u)&&(s=a,o=0)}this.eiList.add(r,s,o)},toString:function(){var t=new Mt;t.append("edge "+this._name+": "),t.append("LINESTRING (");for(var e=0;e<this.pts.length;e++)e>0&&t.append(","),t.append(this.pts[e].x+" "+this.pts[e].y);return t.append(")  "+this._label+" "+this._depthDelta),t.toString()},isPointwiseEqual:function(t){if(this.pts.length!==t.pts.length)return!1;for(var e=0;e<this.pts.length;e++)if(!this.pts[e].equals2D(t.pts[e]))return!1;return!0},setDepthDelta:function(t){this._depthDelta=t},getEdgeIntersectionList:function(){return this.eiList},addIntersections:function(t,e,n){for(var i=0;i<t.getIntersectionNum();i++)this.addIntersection(t,e,n,i)},interfaces_:function(){return[]},getClass:function(){return jn}}),jn.updateIM=function(){if(!(2===arguments.length&&arguments[1]instanceof _e&&arguments[0]instanceof zn))return Wn.prototype.updateIM.apply(this,arguments);var t=arguments[0],e=arguments[1];e.setAtLeastIfValid(t.getLocation(0,Dn.ON),t.getLocation(1,Dn.ON),1),t.isArea()&&(e.setAtLeastIfValid(t.getLocation(0,Dn.LEFT),t.getLocation(1,Dn.LEFT),2),e.setAtLeastIfValid(t.getLocation(0,Dn.RIGHT),t.getLocation(1,Dn.RIGHT),2))},v(Kn,Wn),e(Kn.prototype,{isIncidentEdgeInResult:function(){for(var t=this.getEdges().getEdges().iterator();t.hasNext();){if(t.next().getEdge().isInResult())return!0}return!1},isIsolated:function(){return 1===this._label.getGeometryCount()},getCoordinate:function(){return this._coord},print:function(t){t.println("node "+this._coord+" lbl: "+this._label)},computeIM:function(t){},computeMergedLocation:function(t,e){var n=de.NONE;if(n=this._label.getLocation(e),!t.isNull(e)){var i=t.getLocation(e);n!==de.BOUNDARY&&(n=i)}return n},setLabel:function(){if(2!==arguments.length||!Number.isInteger(arguments[1])||!Number.isInteger(arguments[0]))return Wn.prototype.setLabel.apply(this,arguments);var t=arguments[0],e=arguments[1];null===this._label?this._label=new zn(t,e):this._label.setLocation(t,e)},getEdges:function(){return this._edges},mergeLabel:function(){if(arguments[0]instanceof Kn){var t=arguments[0];this.mergeLabel(t._label)}else if(arguments[0]instanceof zn)for(var e=arguments[0],n=0;n<2;n++){var i=this.computeMergedLocation(e,n);this._label.getLocation(n)===de.NONE&&this._label.setLocation(n,i)}},add:function(t){this._edges.insert(t),t.setNode(this)},setLabelBoundary:function(t){if(null===this._label)return null;var e=de.NONE;null!==this._label&&(e=this._label.getLocation(t));var n=null;switch(e){case de.BOUNDARY:n=de.INTERIOR;break;case de.INTERIOR:default:n=de.BOUNDARY}this._label.setLocation(t,n)},interfaces_:function(){return[]},getClass:function(){return Kn}}),e(Zn.prototype,{find:function(t){return this.nodeMap.get(t)},addNode:function(){if(arguments[0]instanceof E){var t=arguments[0];return null===(e=this.nodeMap.get(t))&&(e=this.nodeFact.createNode(t),this.nodeMap.put(t,e)),e}if(arguments[0]instanceof Kn){var e,n=arguments[0];return null===(e=this.nodeMap.get(n.getCoordinate()))?(this.nodeMap.put(n.getCoordinate(),n),n):(e.mergeLabel(n),e)}},print:function(t){for(var e=this.iterator();e.hasNext();){e.next().print(t)}},iterator:function(){return this.nodeMap.values().iterator()},values:function(){return this.nodeMap.values()},getBoundaryNodes:function(t){for(var e=new P,n=this.iterator();n.hasNext();){var i=n.next();i.getLabel().getLocation(t)===de.BOUNDARY&&e.add(i)}return e},add:function(t){var e=t.getCoordinate();this.addNode(e).add(t)},interfaces_:function(){return[]},getClass:function(){return Zn}}),e(Qn.prototype,{compareDirection:function(t){return this._dx===t._dx&&this._dy===t._dy?0:this._quadrant>t._quadrant?1:this._quadrant<t._quadrant?-1:z.index(t._p0,t._p1,this._p1)},getDy:function(){return this._dy},getCoordinate:function(){return this._p0},setNode:function(t){this._node=t},print:function(t){var e=Math.atan2(this._dy,this._dx),n=this.getClass().getName(),i=n.lastIndexOf("."),r=n.substring(i+1);t.print("  "+r+": "+this._p0+" - "+this._p1+" "+this._quadrant+":"+e+"   "+this._label)},compareTo:function(t){var e=t;return this.compareDirection(e)},getDirectedCoordinate:function(){return this._p1},getDx:function(){return this._dx},getLabel:function(){return this._label},getEdge:function(){return this._edge},getQuadrant:function(){return this._quadrant},getNode:function(){return this._node},toString:function(){var t=Math.atan2(this._dy,this._dx),e=this.getClass().getName(),n=e.lastIndexOf(".");return"  "+e.substring(n+1)+": "+this._p0+" - "+this._p1+" "+this._quadrant+":"+t+"   "+this._label},computeLabel:function(t){},init:function(t,e){this._p0=t,this._p1=e,this._dx=e.x-t.x,this._dy=e.y-t.y,this._quadrant=gn.quadrant(this._dx,this._dy),x.isTrue(!(0===this._dx&&0===this._dy),"EdgeEnd with identical endpoints found")},interfaces_:function(){return[g]},getClass:function(){return Qn}}),v(Jn,m),e(Jn.prototype,{getCoordinate:function(){return this.pt},interfaces_:function(){return[]},getClass:function(){return Jn}}),Jn.msgWithCoord=function(t,e){return null!==e?t+" [ "+e+" ]":t},v($n,Qn),e($n.prototype,{getNextMin:function(){return this._nextMin},getDepth:function(t){return this._depth[t]},setVisited:function(t){this._isVisited=t},computeDirectedLabel:function(){this._label=new zn(this._edge.getLabel()),this._isForward||this._label.flip()},getNext:function(){return this._next},setDepth:function(t,e){if(-999!==this._depth[t]&&this._depth[t]!==e)throw new Jn("assigned depths do not match",this.getCoordinate());this._depth[t]=e},isInteriorAreaEdge:function(){for(var t=!0,e=0;e<2;e++)this._label.isArea(e)&&this._label.getLocation(e,Dn.LEFT)===de.INTERIOR&&this._label.getLocation(e,Dn.RIGHT)===de.INTERIOR||(t=!1);return t},setNextMin:function(t){this._nextMin=t},print:function(t){Qn.prototype.print.call(this,t),t.print(" "+this._depth[Dn.LEFT]+"/"+this._depth[Dn.RIGHT]),t.print(" ("+this.getDepthDelta()+")"),this._isInResult&&t.print(" inResult")},setMinEdgeRing:function(t){this._minEdgeRing=t},isLineEdge:function(){var t=this._label.isLine(0)||this._label.isLine(1),e=!this._label.isArea(0)||this._label.allPositionsEqual(0,de.EXTERIOR),n=!this._label.isArea(1)||this._label.allPositionsEqual(1,de.EXTERIOR);return t&&e&&n},setEdgeRing:function(t){this._edgeRing=t},getMinEdgeRing:function(){return this._minEdgeRing},getDepthDelta:function(){var t=this._edge.getDepthDelta();return this._isForward||(t=-t),t},setInResult:function(t){this._isInResult=t},getSym:function(){return this._sym},isForward:function(){return this._isForward},getEdge:function(){return this._edge},printEdge:function(t){this.print(t),t.print(" "),this._isForward?this._edge.print(t):this._edge.printReverse(t)},setSym:function(t){this._sym=t},setVisitedEdge:function(t){this.setVisited(t),this._sym.setVisited(t)},setEdgeDepths:function(t,e){var n=this.getEdge().getDepthDelta();this._isForward||(n=-n);var i=1;t===Dn.LEFT&&(i=-1);var r=Dn.opposite(t),s=e+n*i;this.setDepth(t,e),this.setDepth(r,s)},getEdgeRing:function(){return this._edgeRing},isInResult:function(){return this._isInResult},setNext:function(t){this._next=t},isVisited:function(){return this._isVisited},interfaces_:function(){return[]},getClass:function(){return $n}}),$n.depthFactor=function(t,e){return t===de.EXTERIOR&&e===de.INTERIOR?1:t===de.INTERIOR&&e===de.EXTERIOR?-1:0},e(ti.prototype,{createNode:function(t){return new Kn(t,null)},interfaces_:function(){return[]},getClass:function(){return ti}}),e(ei.prototype,{printEdges:function(t){t.println("Edges:");for(var e=0;e<this._edges.size();e++){t.println("edge "+e+":");var n=this._edges.get(e);n.print(t),n.eiList.print(t)}},find:function(t){return this._nodes.find(t)},addNode:function(){if(arguments[0]instanceof Kn){var t=arguments[0];return this._nodes.addNode(t)}if(arguments[0]instanceof E){var e=arguments[0];return this._nodes.addNode(e)}},getNodeIterator:function(){return this._nodes.iterator()},linkResultDirectedEdges:function(){for(var t=this._nodes.iterator();t.hasNext();){t.next().getEdges().linkResultDirectedEdges()}},debugPrintln:function(t){Y.out.println(t)},isBoundaryNode:function(t,e){var n=this._nodes.find(e);if(null===n)return!1;var i=n.getLabel();return null!==i&&i.getLocation(t)===de.BOUNDARY},linkAllDirectedEdges:function(){for(var t=this._nodes.iterator();t.hasNext();){t.next().getEdges().linkAllDirectedEdges()}},matchInSameDirection:function(t,e,n,i){return!!t.equals(n)&&(z.index(t,e,i)===z.COLLINEAR&&gn.quadrant(t,e)===gn.quadrant(n,i))},getEdgeEnds:function(){return this._edgeEndList},debugPrint:function(t){Y.out.print(t)},getEdgeIterator:function(){return this._edges.iterator()},findEdgeInSameDirection:function(t,e){for(var n=0;n<this._edges.size();n++){var i=this._edges.get(n),r=i.getCoordinates();if(this.matchInSameDirection(t,e,r[0],r[1]))return i;if(this.matchInSameDirection(t,e,r[r.length-1],r[r.length-2]))return i}return null},insertEdge:function(t){this._edges.add(t)},findEdgeEnd:function(t){for(var e=this.getEdgeEnds().iterator();e.hasNext();){var n=e.next();if(n.getEdge()===t)return n}return null},addEdges:function(t){for(var e=t.iterator();e.hasNext();){var n=e.next();this._edges.add(n);var i=new $n(n,!0),r=new $n(n,!1);i.setSym(r),r.setSym(i),this.add(i),this.add(r)}},add:function(t){this._nodes.add(t),this._edgeEndList.add(t)},getNodes:function(){return this._nodes.values()},findEdge:function(t,e){for(var n=0;n<this._edges.size();n++){var i=this._edges.get(n),r=i.getCoordinates();if(t.equals(r[0])&&e.equals(r[1]))return i}return null},interfaces_:function(){return[]},getClass:function(){return ei}}),ei.linkResultDirectedEdges=function(t){for(var e=t.iterator();e.hasNext();){e.next().getEdges().linkResultDirectedEdges()}},v(ni,ei),e(ni.prototype,{insertBoundaryPoint:function(t,e){var n=this._nodes.addNode(e).getLabel(),i=1;de.NONE;n.getLocation(t,Dn.ON)===de.BOUNDARY&&i++;var r=ni.determineBoundary(this._boundaryNodeRule,i);n.setLocation(t,r)},computeSelfNodes:function(){if(2===arguments.length){var t=arguments[0],e=arguments[1];return this.computeSelfNodes(t,e,!1)}if(3===arguments.length){var n=arguments[0],i=arguments[1],r=arguments[2],s=new qn(n,!0,!1);s.setIsDoneIfProperInt(r);var o=this.createEdgeSetIntersector(),a=this._parentGeom instanceof Yt||this._parentGeom instanceof Vt||this._parentGeom instanceof kt,u=i||!a;return o.computeIntersections(this._edges,s,u),this.addSelfIntersectionNodes(this._argIndex),s}},computeSplitEdges:function(t){for(var e=this._edges.iterator();e.hasNext();){e.next().eiList.addSplitEdges(t)}},computeEdgeIntersections:function(t,e,n){var i=new qn(e,n,!0);return i.setBoundaryNodes(this.getBoundaryNodes(),t.getBoundaryNodes()),this.createEdgeSetIntersector().computeIntersections(this._edges,t._edges,i),i},getGeometry:function(){return this._parentGeom},getBoundaryNodeRule:function(){return this._boundaryNodeRule},hasTooFewPoints:function(){return this._hasTooFewPoints},addPoint:function(){if(arguments[0]instanceof Gt){var t=arguments[0].getCoordinate();this.insertPoint(this._argIndex,t,de.INTERIOR)}else if(arguments[0]instanceof E){var e=arguments[0];this.insertPoint(this._argIndex,e,de.INTERIOR)}},addPolygon:function(t){this.addPolygonRing(t.getExteriorRing(),de.EXTERIOR,de.INTERIOR);for(var e=0;e<t.getNumInteriorRing();e++){var n=t.getInteriorRingN(e);this.addPolygonRing(n,de.INTERIOR,de.EXTERIOR)}},addEdge:function(t){this.insertEdge(t);var e=t.getCoordinates();this.insertPoint(this._argIndex,e[0],de.BOUNDARY),this.insertPoint(this._argIndex,e[e.length-1],de.BOUNDARY)},addLineString:function(t){var e=nt.removeRepeatedPoints(t.getCoordinates());if(e.length<2)return this._hasTooFewPoints=!0,this._invalidPoint=e[0],null;var n=new jn(e,new zn(this._argIndex,de.INTERIOR));this._lineEdgeMap.put(t,n),this.insertEdge(n),x.isTrue(e.length>=2,"found LineString with single point"),this.insertBoundaryPoint(this._argIndex,e[0]),this.insertBoundaryPoint(this._argIndex,e[e.length-1])},getInvalidPoint:function(){return this._invalidPoint},getBoundaryPoints:function(){for(var t=this.getBoundaryNodes(),e=new Array(t.size()).fill(null),n=0,i=t.iterator();i.hasNext();){var r=i.next();e[n++]=r.getCoordinate().copy()}return e},getBoundaryNodes:function(){return null===this._boundaryNodes&&(this._boundaryNodes=this._nodes.getBoundaryNodes(this._argIndex)),this._boundaryNodes},addSelfIntersectionNode:function(t,e,n){if(this.isBoundaryNode(t,e))return null;n===de.BOUNDARY&&this._useBoundaryDeterminationRule?this.insertBoundaryPoint(t,e):this.insertPoint(t,e,n)},addPolygonRing:function(t,e,n){if(t.isEmpty())return null;var i=nt.removeRepeatedPoints(t.getCoordinates());if(i.length<4)return this._hasTooFewPoints=!0,this._invalidPoint=i[0],null;var r=e,s=n;z.isCCW(i)&&(r=n,s=e);var o=new jn(i,new zn(this._argIndex,de.BOUNDARY,r,s));this._lineEdgeMap.put(t,o),this.insertEdge(o),this.insertPoint(this._argIndex,i[0],de.BOUNDARY)},insertPoint:function(t,e,n){var i=this._nodes.addNode(e),r=i.getLabel();null===r?i._label=new zn(t,n):r.setLocation(t,n)},createEdgeSetIntersector:function(){return new Bn},addSelfIntersectionNodes:function(t){for(var e=this._edges.iterator();e.hasNext();)for(var n=e.next(),i=n.getLabel().getLocation(t),r=n.eiList.iterator();r.hasNext();){var s=r.next();this.addSelfIntersectionNode(t,s.coord,i)}},add:function(){if(!(1===arguments.length&&arguments[0]instanceof K))return ei.prototype.add.apply(this,arguments);var t=arguments[0];if(t.isEmpty())return null;if(t instanceof kt&&(this._useBoundaryDeterminationRule=!1),t instanceof Vt)this.addPolygon(t);else if(t instanceof At)this.addLineString(t);else if(t instanceof Gt)this.addPoint(t);else if(t instanceof zt)this.addCollection(t);else if(t instanceof wt)this.addCollection(t);else if(t instanceof kt)this.addCollection(t);else{if(!(t instanceof Lt))throw new UnsupportedOperationException(t.getClass().getName());this.addCollection(t)}},addCollection:function(t){for(var e=0;e<t.getNumGeometries();e++){var n=t.getGeometryN(e);this.add(n)}},locate:function(t){return N(this._parentGeom,Bt)&&this._parentGeom.getNumGeometries()>50?(null===this._areaPtLocator&&(this._areaPtLocator=new Ae(this._parentGeom)),this._areaPtLocator.locate(t)):this._ptLocator.locate(t,this._parentGeom)},findEdge:function(){if(1===arguments.length&&arguments[0]instanceof At){var t=arguments[0];return this._lineEdgeMap.get(t)}return ei.prototype.findEdge.apply(this,arguments)},interfaces_:function(){return[]},getClass:function(){return ni}}),ni.determineBoundary=function(t,e){return t.isInBoundary(e)?de.BOUNDARY:de.INTERIOR};var ii=Object.freeze({GeometryGraph:ni});function ri(){}function si(){if(this._p=null,this._data=null,this._left=null,this._right=null,this._count=null,2===arguments.length){var t=arguments[0],e=arguments[1];this._p=new E(t),this._left=null,this._right=null,this._count=1,this._data=e}else if(3===arguments.length){var n=arguments[0],i=arguments[1],r=arguments[2];this._p=new E(n,i),this._left=null,this._right=null,this._count=1,this._data=r}}function oi(){if(this._root=null,this._numberOfNodes=null,this._tolerance=null,0===arguments.length)oi.call(this,0);else if(1===arguments.length){var t=arguments[0];this._tolerance=t}}function ai(){this._tolerance=null,this._matchNode=null,this._matchDist=0,this._p=null;var t=arguments[0],e=arguments[1];this._p=t,this._tolerance=e}e(ri.prototype,{visit:function(t){},interfaces_:function(){return[]},getClass:function(){return ri}}),e(si.prototype,{isRepeated:function(){return this._count>1},getRight:function(){return this._right},getCoordinate:function(){return this._p},setLeft:function(t){this._left=t},getX:function(){return this._p.x},getData:function(){return this._data},getCount:function(){return this._count},getLeft:function(){return this._left},getY:function(){return this._p.y},increment:function(){this._count=this._count+1},setRight:function(t){this._right=t},interfaces_:function(){return[]},getClass:function(){return si}}),e(oi.prototype,{insert:function(){if(1===arguments.length){var t=arguments[0];return this.insert(t,null)}if(2===arguments.length){var e=arguments[0],n=arguments[1];if(null===this._root)return this._root=new si(e,n),this._root;if(this._tolerance>0){var i=this.findBestMatchNode(e);if(null!==i)return i.increment(),i}return this.insertExact(e,n)}},query:function(){if(1===arguments.length){var t=arguments[0],e=new P;return this.query(t,e),e}if(2===arguments.length)if(arguments[0]instanceof M&&N(arguments[1],w)){var n=arguments[0],i=arguments[1];this.queryNode(this._root,n,!0,{interfaces_:function(){return[ri]},visit:function(t){i.add(t)}})}else if(arguments[0]instanceof M&&N(arguments[1],ri)){var r=arguments[0],s=arguments[1];this.queryNode(this._root,r,!0,s)}},queryNode:function(t,e,n,i){if(null===t)return null;var r=null,s=null,o=null;n?(r=e.getMinX(),s=e.getMaxX(),o=t.getX()):(r=e.getMinY(),s=e.getMaxY(),o=t.getY());var a=o<=s;r<o&&this.queryNode(t.getLeft(),e,!n,i),e.contains(t.getCoordinate())&&i.visit(t),a&&this.queryNode(t.getRight(),e,!n,i)},findBestMatchNode:function(t){var e=new ai(t,this._tolerance);return this.query(e.queryEnvelope(),e),e.getNode()},isEmpty:function(){return null===this._root},insertExact:function(t,e){for(var n=this._root,i=this._root,r=!0,s=!0;null!==n;){if(null!==n)if(t.distance(n.getCoordinate())<=this._tolerance)return n.increment(),n;i=n,n=(s=r?t.x<n.getX():t.y<n.getY())?n.getLeft():n.getRight(),r=!r}this._numberOfNodes=this._numberOfNodes+1;var o=new si(t,e);return s?i.setLeft(o):i.setRight(o),o},interfaces_:function(){return[]},getClass:function(){return oi}}),oi.toCoordinates=function(){if(1===arguments.length){var t=arguments[0];return oi.toCoordinates(t,!1)}if(2===arguments.length){for(var e=arguments[0],n=arguments[1],i=new b,r=e.iterator();r.hasNext();)for(var s=r.next(),o=n?s.getCount():1,a=0;a<o;a++)i.add(s.getCoordinate(),!0);return i.toCoordinateArray()}},e(ai.prototype,{visit:function(t){var e=this._p.distance(t.getCoordinate());if(!(e<=this._tolerance))return null;var n=!1;(null===this._matchNode||e<this._matchDist||null!==this._matchNode&&e===this._matchDist&&t.getCoordinate().compareTo(this._matchNode.getCoordinate())<1)&&(n=!0),n&&(this._matchNode=t,this._matchDist=e)},queryEnvelope:function(){var t=new M(this._p);return t.expandBy(this._tolerance),t},getNode:function(){return this._matchNode},interfaces_:function(){return[ri]},getClass:function(){return ai}}),oi.BestMatchVisitor=ai;var ui=Object.freeze({KdTree:oi});function li(){this._items=new P,this._subnode=new Array(4).fill(null)}function hi(){this._pt=new E,this._level=0,this._env=null;var t=arguments[0];this.computeKey(t)}function ci(){li.apply(this),this._env=null,this._centrex=null,this._centrey=null,this._level=null;var t=arguments[0],e=arguments[1];this._env=t,this._level=e,this._centrex=(t.getMinX()+t.getMaxX())/2,this._centrey=(t.getMinY()+t.getMaxY())/2}function fi(){li.apply(this)}function gi(){}function di(){this._root=null,this._minExtent=1,this._root=new fi}e(li.prototype,{hasChildren:function(){for(var t=0;t<4;t++)if(null!==this._subnode[t])return!0;return!1},isPrunable:function(){return!(this.hasChildren()||this.hasItems())},addAllItems:function(t){t.addAll(this._items);for(var e=0;e<4;e++)null!==this._subnode[e]&&this._subnode[e].addAllItems(t);return t},getNodeCount:function(){for(var t=0,e=0;e<4;e++)null!==this._subnode[e]&&(t+=this._subnode[e].size());return t+1},size:function(){for(var t=0,e=0;e<4;e++)null!==this._subnode[e]&&(t+=this._subnode[e].size());return t+this._items.size()},addAllItemsFromOverlapping:function(t,e){if(!this.isSearchMatch(t))return null;e.addAll(this._items);for(var n=0;n<4;n++)null!==this._subnode[n]&&this._subnode[n].addAllItemsFromOverlapping(t,e)},visitItems:function(t,e){for(var n=this._items.iterator();n.hasNext();)e.visitItem(n.next())},hasItems:function(){return!this._items.isEmpty()},remove:function(t,e){if(!this.isSearchMatch(t))return!1;for(var n=!1,i=0;i<4;i++)if(null!==this._subnode[i]&&(n=this._subnode[i].remove(t,e))){this._subnode[i].isPrunable()&&(this._subnode[i]=null);break}return n||(n=this._items.remove(e))},visit:function(t,e){if(!this.isSearchMatch(t))return null;this.visitItems(t,e);for(var n=0;n<4;n++)null!==this._subnode[n]&&this._subnode[n].visit(t,e)},getItems:function(){return this._items},depth:function(){for(var t=0,e=0;e<4;e++)if(null!==this._subnode[e]){var n=this._subnode[e].depth();n>t&&(t=n)}return t+1},isEmpty:function(){var t=!0;if(this._items.isEmpty()){for(var e=0;e<4;e++)if(null!==this._subnode[e]&&!this._subnode[e].isEmpty()){t=!1;break}}else t=!1;return t},add:function(t){this._items.add(t)},interfaces_:function(){return[p]},getClass:function(){return li}}),li.getSubnodeIndex=function(t,e,n){var i=-1;return t.getMinX()>=e&&(t.getMinY()>=n&&(i=3),t.getMaxY()<=n&&(i=1)),t.getMaxX()<=e&&(t.getMinY()>=n&&(i=2),t.getMaxY()<=n&&(i=0)),i},e(hi.prototype,{getLevel:function(){return this._level},computeKey:function(){if(1===arguments.length){var t=arguments[0];for(this._level=hi.computeQuadLevel(t),this._env=new M,this.computeKey(this._level,t);!this._env.contains(t);)this._level+=1,this.computeKey(this._level,t)}else if(2===arguments.length){var e=arguments[0],n=arguments[1],i=on.powerOf2(e);this._pt.x=Math.floor(n.getMinX()/i)*i,this._pt.y=Math.floor(n.getMinY()/i)*i,this._env.init(this._pt.x,this._pt.x+i,this._pt.y,this._pt.y+i)}},getEnvelope:function(){return this._env},getCentre:function(){return new E((this._env.getMinX()+this._env.getMaxX())/2,(this._env.getMinY()+this._env.getMaxY())/2)},getPoint:function(){return this._pt},interfaces_:function(){return[]},getClass:function(){return hi}}),hi.computeQuadLevel=function(t){var e=t.getWidth(),n=t.getHeight(),i=e>n?e:n;return on.exponent(i)+1},v(ci,li),e(ci.prototype,{find:function(t){var e=li.getSubnodeIndex(t,this._centrex,this._centrey);return-1===e?this:null!==this._subnode[e]?this._subnode[e].find(t):this},isSearchMatch:function(t){return null!==t&&this._env.intersects(t)},getSubnode:function(t){return null===this._subnode[t]&&(this._subnode[t]=this.createSubnode(t)),this._subnode[t]},getEnvelope:function(){return this._env},getNode:function(t){var e=li.getSubnodeIndex(t,this._centrex,this._centrey);return-1!==e?this.getSubnode(e).getNode(t):this},createSubnode:function(t){var e=0,n=0,i=0,r=0;switch(t){case 0:e=this._env.getMinX(),n=this._centrex,i=this._env.getMinY(),r=this._centrey;break;case 1:e=this._centrex,n=this._env.getMaxX(),i=this._env.getMinY(),r=this._centrey;break;case 2:e=this._env.getMinX(),n=this._centrex,i=this._centrey,r=this._env.getMaxY();break;case 3:e=this._centrex,n=this._env.getMaxX(),i=this._centrey,r=this._env.getMaxY()}return new ci(new M(e,n,i,r),this._level-1)},insertNode:function(t){x.isTrue(null===this._env||this._env.contains(t._env));var e=li.getSubnodeIndex(t._env,this._centrex,this._centrey);if(t._level===this._level-1)this._subnode[e]=t;else{var n=this.createSubnode(e);n.insertNode(t),this._subnode[e]=n}},interfaces_:function(){return[]},getClass:function(){return ci}}),ci.createNode=function(t){var e=new hi(t);return new ci(e.getEnvelope(),e.getLevel())},ci.createExpanded=function(t,e){var n=new M(e);null!==t&&n.expandToInclude(t._env);var i=ci.createNode(n);return null!==t&&i.insertNode(t),i},v(fi,li),e(fi.prototype,{insert:function(t,e){var n=li.getSubnodeIndex(t,fi.origin.x,fi.origin.y);if(-1===n)return this.add(e),null;var i=this._subnode[n];if(null===i||!i.getEnvelope().contains(t)){var r=ci.createExpanded(i,t);this._subnode[n]=r}this.insertContained(this._subnode[n],t,e)},isSearchMatch:function(t){return!0},insertContained:function(t,e,n){x.isTrue(t.getEnvelope().contains(e));var i=ln.isZeroWidth(e.getMinX(),e.getMaxX()),r=ln.isZeroWidth(e.getMinY(),e.getMaxY());(i||r?t.find(e):t.getNode(e)).add(n)},interfaces_:function(){return[]},getClass:function(){return fi}}),fi.origin=new E(0,0),e(gi.prototype,{insert:function(t,e){},remove:function(t,e){},query:function(){},interfaces_:function(){return[]},getClass:function(){return gi}}),e(di.prototype,{size:function(){return null!==this._root?this._root.size():0},insert:function(t,e){this.collectStats(t);var n=di.ensureExtent(t,this._minExtent);this._root.insert(n,e)},query:function(){if(1===arguments.length){var t=arguments[0],e=new Me;return this.query(t,e),e.getItems()}if(2===arguments.length){var n=arguments[0],i=arguments[1];this._root.visit(n,i)}},queryAll:function(){var t=new P;return this._root.addAllItems(t),t},remove:function(t,e){var n=di.ensureExtent(t,this._minExtent);return this._root.remove(n,e)},collectStats:function(t){var e=t.getWidth();e<this._minExtent&&e>0&&(this._minExtent=e);var n=t.getHeight();n<this._minExtent&&n>0&&(this._minExtent=n)},depth:function(){return null!==this._root?this._root.depth():0},isEmpty:function(){return null===this._root||this._root.isEmpty()},interfaces_:function(){return[gi,p]},getClass:function(){return di}}),di.ensureExtent=function(t,e){var n=t.getMinX(),i=t.getMaxX(),r=t.getMinY(),s=t.getMaxY();return n!==i&&r!==s?t:(n===i&&(i=(n-=e/2)+e/2),r===s&&(s=(r-=e/2)+e/2),new M(n,i,r,s))},di.serialVersionUID=-0x678b60c967a25400;var _i=Object.freeze({Quadtree:di});function pi(){}function mi(){this._bounds=null,this._item=null;var t=arguments[0],e=arguments[1];this._bounds=t,this._item=e}function vi(){this._size=null,this._items=null,this._size=0,this._items=new P,this._items.add(null)}function yi(){this.normalOrder=null;var t=arguments[0];this.normalOrder=t}function xi(){if(this._childBoundables=new P,this._bounds=null,this._level=null,0===arguments.length);else if(1===arguments.length){var t=arguments[0];this._level=t}}function Ei(){this._boundable1=null,this._boundable2=null,this._distance=null,this._itemDistance=null;var t=arguments[0],e=arguments[1],n=arguments[2];this._boundable1=t,this._boundable2=e,this._itemDistance=n,this._distance=this.distance()}function Ii(){if(this._root=null,this._built=!1,this._itemBoundables=new P,this._nodeCapacity=null,0===arguments.length)Ii.call(this,Ii.DEFAULT_NODE_CAPACITY);else if(1===arguments.length){var t=arguments[0];x.isTrue(t>1,"Node capacity must be greater than 1"),this._nodeCapacity=t}}function Ni(){}function Ci(){if(0===arguments.length)Ci.call(this,Ci.DEFAULT_NODE_CAPACITY);else if(1===arguments.length){var t=arguments[0];Ii.call(this,t)}}function Si(){var t=arguments[0];xi.call(this,t)}e(pi.prototype,{getBounds:function(){},interfaces_:function(){return[]},getClass:function(){return pi}}),e(mi.prototype,{getItem:function(){return this._item},getBounds:function(){return this._bounds},interfaces_:function(){return[pi,p]},getClass:function(){return mi}}),e(vi.prototype,{poll:function(){if(this.isEmpty())return null;var t=this._items.get(1);return this._items.set(1,this._items.get(this._size)),this._size-=1,this.reorder(1),t},size:function(){return this._size},reorder:function(t){for(var e=null,n=this._items.get(t);2*t<=this._size&&((e=2*t)!==this._size&&this._items.get(e+1).compareTo(this._items.get(e))<0&&e++,this._items.get(e).compareTo(n)<0);t=e)this._items.set(t,this._items.get(e));this._items.set(t,n)},clear:function(){this._size=0,this._items.clear()},isEmpty:function(){return 0===this._size},add:function(t){this._items.add(null),this._size+=1;var e=this._size;for(this._items.set(0,t);t.compareTo(this._items.get(Math.trunc(e/2)))<0;e/=2)this._items.set(e,this._items.get(Math.trunc(e/2)));this._items.set(e,t)},interfaces_:function(){return[]},getClass:function(){return vi}}),e(yi.prototype,{compare:function(t,e){var n=t.getDistance(),i=e.getDistance();return this.normalOrder?n>i?1:n===i?0:-1:n>i?-1:n===i?0:1},interfaces_:function(){return[_,p]},getClass:function(){return yi}}),e(xi.prototype,{getLevel:function(){return this._level},size:function(){return this._childBoundables.size()},getChildBoundables:function(){return this._childBoundables},addChildBoundable:function(t){x.isTrue(null===this._bounds),this._childBoundables.add(t)},isEmpty:function(){return this._childBoundables.isEmpty()},getBounds:function(){return null===this._bounds&&(this._bounds=this.computeBounds()),this._bounds},interfaces_:function(){return[pi,p]},getClass:function(){return xi}}),xi.serialVersionUID=0x5a1e55ec41369800,e(Ei.prototype,{expandToQueue:function(t,e){var n=Ei.isComposite(this._boundable1),r=Ei.isComposite(this._boundable2);if(n&&r)return Ei.area(this._boundable1)>Ei.area(this._boundable2)?(this.expand(this._boundable1,this._boundable2,t,e),null):(this.expand(this._boundable2,this._boundable1,t,e),null);if(n)return this.expand(this._boundable1,this._boundable2,t,e),null;if(r)return this.expand(this._boundable2,this._boundable1,t,e),null;throw new i("neither boundable is composite")},isLeaves:function(){return!(Ei.isComposite(this._boundable1)||Ei.isComposite(this._boundable2))},compareTo:function(t){var e=t;return this._distance<e._distance?-1:this._distance>e._distance?1:0},expand:function(t,e,n,i){for(var r=t.getChildBoundables().iterator();r.hasNext();){var s=new Ei(r.next(),e,this._itemDistance);s.getDistance()<i&&n.add(s)}},getBoundable:function(t){return 0===t?this._boundable1:this._boundable2},getDistance:function(){return this._distance},distance:function(){return this.isLeaves()?this._itemDistance.distance(this._boundable1,this._boundable2):this._boundable1.getBounds().distance(this._boundable2.getBounds())},interfaces_:function(){return[g]},getClass:function(){return Ei}}),Ei.area=function(t){return t.getBounds().getArea()},Ei.isComposite=function(t){return t instanceof xi},e(Ii.prototype,{queryInternal:function(){if(N(arguments[2],Ce)&&arguments[0]instanceof Object&&arguments[1]instanceof xi)for(var t=arguments[0],e=arguments[1],n=arguments[2],i=e.getChildBoundables(),r=0;r<i.size();r++){var s=i.get(r);this.getIntersectsOp().intersects(s.getBounds(),t)&&(s instanceof xi?this.queryInternal(t,s,n):s instanceof mi?n.visitItem(s.getItem()):x.shouldNeverReachHere())}else if(N(arguments[2],w)&&arguments[0]instanceof Object&&arguments[1]instanceof xi){var o=arguments[0],a=arguments[1],u=arguments[2];for(i=a.getChildBoundables(),r=0;r<i.size();r++){s=i.get(r);this.getIntersectsOp().intersects(s.getBounds(),o)&&(s instanceof xi?this.queryInternal(o,s,u):s instanceof mi?u.add(s.getItem()):x.shouldNeverReachHere())}}},getNodeCapacity:function(){return this._nodeCapacity},lastNode:function(t){return t.get(t.size()-1)},size:function(){if(0===arguments.length)return this.isEmpty()?0:(this.build(),this.size(this._root));if(1===arguments.length){for(var t=0,e=arguments[0].getChildBoundables().iterator();e.hasNext();){var n=e.next();n instanceof xi?t+=this.size(n):n instanceof mi&&(t+=1)}return t}},removeItem:function(t,e){for(var n=null,i=t.getChildBoundables().iterator();i.hasNext();){var r=i.next();r instanceof mi&&r.getItem()===e&&(n=r)}return null!==n&&(t.getChildBoundables().remove(n),!0)},itemsTree:function(){if(0===arguments.length){this.build();var t=this.itemsTree(this._root);return null===t?new P:t}if(1===arguments.length){for(var e=arguments[0],n=new P,i=e.getChildBoundables().iterator();i.hasNext();){var r=i.next();if(r instanceof xi){var s=this.itemsTree(r);null!==s&&n.add(s)}else r instanceof mi?n.add(r.getItem()):x.shouldNeverReachHere()}return n.size()<=0?null:n}},insert:function(t,e){x.isTrue(!this._built,"Cannot insert items into an STR packed R-tree after it has been built."),this._itemBoundables.add(new mi(t,e))},boundablesAtLevel:function(){if(1===arguments.length){var t=arguments[0],e=new P;return this.boundablesAtLevel(t,this._root,e),e}if(3===arguments.length){var n=arguments[0],i=arguments[1],r=arguments[2];if(x.isTrue(n>-2),i.getLevel()===n)return r.add(i),null;for(var s=i.getChildBoundables().iterator();s.hasNext();){var o=s.next();o instanceof xi?this.boundablesAtLevel(n,o,r):(x.isTrue(o instanceof mi),-1===n&&r.add(o))}return null}},query:function(){if(1===arguments.length){var t=arguments[0];this.build();var e=new P;return this.isEmpty()?e:(this.getIntersectsOp().intersects(this._root.getBounds(),t)&&this.queryInternal(t,this._root,e),e)}if(2===arguments.length){var n=arguments[0],i=arguments[1];if(this.build(),this.isEmpty())return null;this.getIntersectsOp().intersects(this._root.getBounds(),n)&&this.queryInternal(n,this._root,i)}},build:function(){if(this._built)return null;this._root=this._itemBoundables.isEmpty()?this.createNode(0):this.createHigherLevels(this._itemBoundables,-1),this._itemBoundables=null,this._built=!0},getRoot:function(){return this.build(),this._root},remove:function(){if(2===arguments.length){var t=arguments[0],e=arguments[1];return this.build(),!!this.getIntersectsOp().intersects(this._root.getBounds(),t)&&this.remove(t,this._root,e)}if(3===arguments.length){var n=arguments[0],i=arguments[1],r=arguments[2],s=this.removeItem(i,r);if(s)return!0;for(var o=null,a=i.getChildBoundables().iterator();a.hasNext();){var u=a.next();if(this.getIntersectsOp().intersects(u.getBounds(),n)&&(u instanceof xi&&(s=this.remove(n,u,r)))){o=u;break}}return null!==o&&o.getChildBoundables().isEmpty()&&i.getChildBoundables().remove(o),s}},createHigherLevels:function(t,e){x.isTrue(!t.isEmpty());var n=this.createParentBoundables(t,e+1);return 1===n.size()?n.get(0):this.createHigherLevels(n,e+1)},depth:function(){if(0===arguments.length)return this.isEmpty()?0:(this.build(),this.depth(this._root));if(1===arguments.length){for(var t=0,e=arguments[0].getChildBoundables().iterator();e.hasNext();){var n=e.next();if(n instanceof xi){var i=this.depth(n);i>t&&(t=i)}}return t+1}},createParentBoundables:function(t,e){x.isTrue(!t.isEmpty());var n=new P;n.add(this.createNode(e));var i=new P(t);Te.sort(i,this.getComparator());for(var r=i.iterator();r.hasNext();){var s=r.next();this.lastNode(n).getChildBoundables().size()===this.getNodeCapacity()&&n.add(this.createNode(e)),this.lastNode(n).addChildBoundable(s)}return n},isEmpty:function(){return this._built?this._root.isEmpty():this._itemBoundables.isEmpty()},interfaces_:function(){return[p]},getClass:function(){return Ii}}),Ii.compareDoubles=function(t,e){return t>e?1:t<e?-1:0},Ii.IntersectsOp=function(){},Ii.serialVersionUID=-0x35ef64c82d4c5400,Ii.DEFAULT_NODE_CAPACITY=10,e(Ni.prototype,{distance:function(t,e){},interfaces_:function(){return[]},getClass:function(){return Ni}}),v(Ci,Ii),e(Ci.prototype,{createParentBoundablesFromVerticalSlices:function(t,e){x.isTrue(t.length>0);for(var n=new P,i=0;i<t.length;i++)n.addAll(this.createParentBoundablesFromVerticalSlice(t[i],e));return n},createNode:function(t){return new Si(t)},size:function(){return 0===arguments.length?Ii.prototype.size.call(this):Ii.prototype.size.apply(this,arguments)},insert:function(){if(!(2===arguments.length&&arguments[1]instanceof Object&&arguments[0]instanceof M))return Ii.prototype.insert.apply(this,arguments);var t=arguments[0],e=arguments[1];if(t.isNull())return null;Ii.prototype.insert.call(this,t,e)},getIntersectsOp:function(){return Ci.intersectsOp},verticalSlices:function(t,e){for(var n=Math.trunc(Math.ceil(t.size()/e)),i=new Array(e).fill(null),r=t.iterator(),s=0;s<e;s++){i[s]=new P;for(var o=0;r.hasNext()&&o<n;){var a=r.next();i[s].add(a),o++}}return i},query:function(){if(1===arguments.length){var t=arguments[0];return Ii.prototype.query.call(this,t)}if(2===arguments.length){var e=arguments[0],n=arguments[1];Ii.prototype.query.call(this,e,n)}},getComparator:function(){return Ci.yComparator},createParentBoundablesFromVerticalSlice:function(t,e){return Ii.prototype.createParentBoundables.call(this,t,e)},remove:function(){if(2===arguments.length&&arguments[1]instanceof Object&&arguments[0]instanceof M){var t=arguments[0],e=arguments[1];return Ii.prototype.remove.call(this,t,e)}return Ii.prototype.remove.apply(this,arguments)},depth:function(){return 0===arguments.length?Ii.prototype.depth.call(this):Ii.prototype.depth.apply(this,arguments)},createParentBoundables:function(t,e){x.isTrue(!t.isEmpty());var n=Math.trunc(Math.ceil(t.size()/this.getNodeCapacity())),i=new P(t);Te.sort(i,Ci.xComparator);var r=this.verticalSlices(i,Math.trunc(Math.ceil(Math.sqrt(n))));return this.createParentBoundablesFromVerticalSlices(r,e)},nearestNeighbour:function(){if(1===arguments.length){if(N(arguments[0],Ni)){var t=arguments[0],e=new Ei(this.getRoot(),this.getRoot(),t);return this.nearestNeighbour(e)}if(arguments[0]instanceof Ei){var n=arguments[0];return this.nearestNeighbour(n,s.POSITIVE_INFINITY)}}else if(2===arguments.length){if(arguments[0]instanceof Ci&&N(arguments[1],Ni)){var i=arguments[0],r=arguments[1];e=new Ei(this.getRoot(),i.getRoot(),r);return this.nearestNeighbour(e)}if(arguments[0]instanceof Ei&&"number"==typeof arguments[1]){var o=arguments[0],a=arguments[1],u=null;for((_=new vi).add(o);!_.isEmpty()&&a>0;){if((E=(x=_.poll()).getDistance())>=a)break;x.isLeaves()?(a=E,u=x):x.expandToQueue(_,a)}return[u.getBoundable(0).getItem(),u.getBoundable(1).getItem()]}if(arguments[0]instanceof Ei&&Number.isInteger(arguments[1])){var l=arguments[0],h=arguments[1];return this.nearestNeighbour(l,s.POSITIVE_INFINITY,h)}}else if(3===arguments.length){if(N(arguments[2],Ni)&&arguments[0]instanceof M&&arguments[1]instanceof Object){var c=arguments[0],f=arguments[1],g=arguments[2],d=new mi(c,f);e=new Ei(this.getRoot(),d,g);return this.nearestNeighbour(e)[0]}if(Number.isInteger(arguments[2])&&arguments[0]instanceof Ei&&"number"==typeof arguments[1]){var _,p=arguments[0],m=arguments[1],v=arguments[2];a=m;(_=new vi).add(p);for(var y=new java.util.PriorityQueue<Ei>new yi(!1);!_.isEmpty()&&a>=0;){var x,E;if((E=(x=_.poll()).getDistance())>=a)break;x.isLeaves()?y.size()<v?y.add(x):(y.peek().getDistance()>E&&(y.poll(),y.add(x)),a=y.peek().getDistance()):x.expandToQueue(_,a)}return Ci.getItems(y)}}else if(4===arguments.length){var I=arguments[0],C=arguments[1],S=arguments[2],L=arguments[3];d=new mi(I,C),e=new Ei(this.getRoot(),d,S);return this.nearestNeighbour(e,L)}},interfaces_:function(){return[gi,p]},getClass:function(){return Ci}}),Ci.centreX=function(t){return Ci.avg(t.getMinX(),t.getMaxX())},Ci.avg=function(t,e){return(t+e)/2},Ci.getItems=function(t){for(var e=new Array(t.size()).fill(null),n=t.iterator(),i=0;n.hasNext();)e[i]=n.next().getBoundable(0).getItem(),i++;return e},Ci.centreY=function(t){return Ci.avg(t.getMinY(),t.getMaxY())},v(Si,xi),e(Si.prototype,{computeBounds:function(){for(var t=null,e=this.getChildBoundables().iterator();e.hasNext();){var n=e.next();null===t?t=new M(n.getBounds()):t.expandToInclude(n.getBounds())}return t},interfaces_:function(){return[]},getClass:function(){return Si}}),Ci.STRtreeNode=Si,Ci.serialVersionUID=0x39920f7d5f261e0,Ci.xComparator={interfaces_:function(){return[_]},compare:function(t,e){return Ii.compareDoubles(Ci.centreX(t.getBounds()),Ci.centreX(e.getBounds()))}},Ci.yComparator={interfaces_:function(){return[_]},compare:function(t,e){return Ii.compareDoubles(Ci.centreY(t.getBounds()),Ci.centreY(e.getBounds()))}},Ci.intersectsOp={interfaces_:function(){return[IntersectsOp]},intersects:function(t,e){return t.intersects(e)}},Ci.DEFAULT_NODE_CAPACITY=10;var Li=Object.freeze({STRtree:Ci}),wi=Object.freeze({kdtree:ui,quadtree:_i,strtree:Li}),Ri=["Point","MultiPoint","LineString","MultiLineString","Polygon","MultiPolygon"];function Ti(t){this.geometryFactory=t||new se}e(Ti.prototype,{read:function(t){var e=void 0,n=(e="string"==typeof t?JSON.parse(t):t).type;if(!Pi[n])throw new Error("Unknown GeoJSON type: "+e.type);return-1!==Ri.indexOf(n)?Pi[n].call(this,e.coordinates):"GeometryCollection"===n?Pi[n].call(this,e.geometries):Pi[n].call(this,e)},write:function(t){var e=t.getGeometryType();if(!Oi[e])throw new Error("Geometry is not supported");return Oi[e].call(this,t)}});var Pi={Feature:function(t){var e={};for(var n in t)e[n]=t[n];if(t.geometry){var i=t.geometry.type;if(!Pi[i])throw new Error("Unknown GeoJSON type: "+t.type);e.geometry=this.read(t.geometry)}return t.bbox&&(e.bbox=Pi.bbox.call(this,t.bbox)),e},FeatureCollection:function(t){var e={};if(t.features){e.features=[];for(var n=0;n<t.features.length;++n)e.features.push(this.read(t.features[n]))}return t.bbox&&(e.bbox=this.parse.bbox.call(this,t.bbox)),e},coordinates:function(t){for(var e=[],n=0;n<t.length;++n){var i=t[n];e.push(new E(i[0],i[1]))}return e},bbox:function(t){return this.geometryFactory.createLinearRing([new E(t[0],t[1]),new E(t[2],t[1]),new E(t[2],t[3]),new E(t[0],t[3]),new E(t[0],t[1])])},Point:function(t){var e=new E(t[0],t[1]);return this.geometryFactory.createPoint(e)},MultiPoint:function(t){for(var e=[],n=0;n<t.length;++n)e.push(Pi.Point.call(this,t[n]));return this.geometryFactory.createMultiPoint(e)},LineString:function(t){var e=Pi.coordinates.call(this,t);return this.geometryFactory.createLineString(e)},MultiLineString:function(t){for(var e=[],n=0;n<t.length;++n)e.push(Pi.LineString.call(this,t[n]));return this.geometryFactory.createMultiLineString(e)},Polygon:function(t){for(var e=Pi.coordinates.call(this,t[0]),n=this.geometryFactory.createLinearRing(e),i=[],r=1;r<t.length;++r){var s=t[r],o=Pi.coordinates.call(this,s),a=this.geometryFactory.createLinearRing(o);i.push(a)}return this.geometryFactory.createPolygon(n,i)},MultiPolygon:function(t){for(var e=[],n=0;n<t.length;++n){var i=t[n];e.push(Pi.Polygon.call(this,i))}return this.geometryFactory.createMultiPolygon(e)},GeometryCollection:function(t){for(var e=[],n=0;n<t.length;++n){var i=t[n];e.push(this.read(i))}return this.geometryFactory.createGeometryCollection(e)}},Oi={coordinate:function(t){return[t.x,t.y]},Point:function(t){return{type:"Point",coordinates:Oi.coordinate.call(this,t.getCoordinate())}},MultiPoint:function(t){for(var e=[],n=0;n<t._geometries.length;++n){var i=t._geometries[n],r=Oi.Point.call(this,i);e.push(r.coordinates)}return{type:"MultiPoint",coordinates:e}},LineString:function(t){for(var e=[],n=t.getCoordinates(),i=0;i<n.length;++i){var r=n[i];e.push(Oi.coordinate.call(this,r))}return{type:"LineString",coordinates:e}},MultiLineString:function(t){for(var e=[],n=0;n<t._geometries.length;++n){var i=t._geometries[n],r=Oi.LineString.call(this,i);e.push(r.coordinates)}return{type:"MultiLineString",coordinates:e}},Polygon:function(t){var e=[],n=Oi.LineString.call(this,t._shell);e.push(n.coordinates);for(var i=0;i<t._holes.length;++i){var r=t._holes[i],s=Oi.LineString.call(this,r);e.push(s.coordinates)}return{type:"Polygon",coordinates:e}},MultiPolygon:function(t){for(var e=[],n=0;n<t._geometries.length;++n){var i=t._geometries[n],r=Oi.Polygon.call(this,i);e.push(r.coordinates)}return{type:"MultiPolygon",coordinates:e}},GeometryCollection:function(t){for(var e=[],n=0;n<t._geometries.length;++n){var i=t._geometries[n],r=i.getGeometryType();e.push(Oi[r].call(this,i))}return{type:"GeometryCollection",geometries:e}}};function bi(t){this.parser=new Ti(t||new se)}function Mi(){this.parser=new Ti(this.geometryFactory)}function Di(t){this.parser=new ae(t||new se)}function Ai(t){return[t.x,t.y]}function Fi(t,e){this.geometryFactory=t||new se,this.ol=e||"undefined"!=typeof ol&&ol}e(bi.prototype,{read:function(t){return this.parser.read(t)}}),e(Mi.prototype,{write:function(t){return this.parser.write(t)}}),e(Di.prototype,{read:function(t){return this.parser.read(t)}}),e(Fi.prototype,{inject:function(t,e,n,i,r,s,o,a){this.ol={geom:{Point:t,LineString:e,LinearRing:n,Polygon:i,MultiPoint:r,MultiLineString:s,MultiPolygon:o,GeometryCollection:a}}},read:function(t){var e=this.ol;return t instanceof e.geom.Point?this.convertFromPoint(t):t instanceof e.geom.LineString?this.convertFromLineString(t):t instanceof e.geom.LinearRing?this.convertFromLinearRing(t):t instanceof e.geom.Polygon?this.convertFromPolygon(t):t instanceof e.geom.MultiPoint?this.convertFromMultiPoint(t):t instanceof e.geom.MultiLineString?this.convertFromMultiLineString(t):t instanceof e.geom.MultiPolygon?this.convertFromMultiPolygon(t):t instanceof e.geom.GeometryCollection?this.convertFromCollection(t):void 0},convertFromPoint:function(t){var e=t.getCoordinates();return this.geometryFactory.createPoint(new E(e[0],e[1]))},convertFromLineString:function(t){return this.geometryFactory.createLineString(t.getCoordinates().map(function(t){return new E(t[0],t[1])}))},convertFromLinearRing:function(t){return this.geometryFactory.createLinearRing(t.getCoordinates().map(function(t){return new E(t[0],t[1])}))},convertFromPolygon:function(t){for(var e=t.getLinearRings(),n=null,i=[],r=0;r<e.length;r++){var s=this.convertFromLinearRing(e[r]);0===r?n=s:i.push(s)}return this.geometryFactory.createPolygon(n,i)},convertFromMultiPoint:function(t){var e=t.getPoints().map(function(t){return this.convertFromPoint(t)},this);return this.geometryFactory.createMultiPoint(e)},convertFromMultiLineString:function(t){var e=t.getLineStrings().map(function(t){return this.convertFromLineString(t)},this);return this.geometryFactory.createMultiLineString(e)},convertFromMultiPolygon:function(t){var e=t.getPolygons().map(function(t){return this.convertFromPolygon(t)},this);return this.geometryFactory.createMultiPolygon(e)},convertFromCollection:function(t){var e=t.getGeometries().map(function(t){return this.read(t)},this);return this.geometryFactory.createGeometryCollection(e)},write:function(t){return"Point"===t.getGeometryType()?this.convertToPoint(t.getCoordinate()):"LineString"===t.getGeometryType()?this.convertToLineString(t):"LinearRing"===t.getGeometryType()?this.convertToLinearRing(t):"Polygon"===t.getGeometryType()?this.convertToPolygon(t):"MultiPoint"===t.getGeometryType()?this.convertToMultiPoint(t):"MultiLineString"===t.getGeometryType()?this.convertToMultiLineString(t):"MultiPolygon"===t.getGeometryType()?this.convertToMultiPolygon(t):"GeometryCollection"===t.getGeometryType()?this.convertToCollection(t):void 0},convertToPoint:function(t){return new this.ol.geom.Point([t.x,t.y])},convertToLineString:function(t){var e=t._points._coordinates.map(Ai);return new this.ol.geom.LineString(e)},convertToLinearRing:function(t){var e=t._points._coordinates.map(Ai);return new this.ol.geom.LinearRing(e)},convertToPolygon:function(t){for(var e=[t._shell._points._coordinates.map(Ai)],n=0;n<t._holes.length;n++)e.push(t._holes[n]._points._coordinates.map(Ai));return new this.ol.geom.Polygon(e)},convertToMultiPoint:function(t){return new this.ol.geom.MultiPoint(t.getCoordinates().map(Ai))},convertToMultiLineString:function(t){for(var e=[],n=0;n<t._geometries.length;n++)e.push(this.convertToLineString(t._geometries[n]).getCoordinates());return new this.ol.geom.MultiLineString(e)},convertToMultiPolygon:function(t){for(var e=[],n=0;n<t._geometries.length;n++)e.push(this.convertToPolygon(t._geometries[n]).getCoordinates());return new this.ol.geom.MultiPolygon(e)},convertToCollection:function(t){for(var e=[],n=0;n<t._geometries.length;n++){var i=t._geometries[n];e.push(this.write(i))}return new this.ol.geom.GeometryCollection(e)}});var Gi=Object.freeze({GeoJSONReader:bi,GeoJSONWriter:Mi,OL3Parser:Fi,WKTReader:Di,WKTWriter:he});function qi(){}function Bi(){this._segString=null,this.coord=null,this.segmentIndex=null,this._segmentOctant=null,this._isInterior=null;var t=arguments[0],e=arguments[1],n=arguments[2],i=arguments[3];this._segString=t,this.coord=new E(e),this.segmentIndex=n,this._segmentOctant=i,this._isInterior=!e.equals2D(t.getCoordinate(n))}function Vi(){this._nodeMap=new pt,this._edge=null;var t=arguments[0];this._edge=t}function zi(){this._nodeList=null,this._edge=null,this._nodeIt=null,this._currNode=null,this._nextNode=null,this._currSegIndex=0;var t=arguments[0];this._nodeList=t,this._edge=t.getEdge(),this._nodeIt=t.iterator(),this.readNextNode()}function Yi(){}function ki(){}function Ui(){}function Xi(){this._nodeList=new Vi(this),this._pts=null,this._data=null;var t=arguments[0],e=arguments[1];this._pts=t,this._data=e}function Hi(){this._overlapSeg1=new ge,this._overlapSeg2=new ge}function Wi(){}function ji(){if(this._segInt=null,0===arguments.length);else if(1===arguments.length){var t=arguments[0];this.setSegmentIntersector(t)}}function Ki(){if(this._monoChains=new P,this._index=new Ci,this._idCounter=0,this._nodedSegStrings=null,this._nOverlaps=0,0===arguments.length);else if(1===arguments.length){var t=arguments[0];ji.call(this,t)}}function Zi(){Hi.apply(this),this._si=null;var t=arguments[0];this._si=t}function Qi(){if(this._noder=null,this._scaleFactor=null,this._offsetX=null,this._offsetY=null,this._isScaled=!1,2===arguments.length){var t=arguments[0],e=arguments[1];Qi.call(this,t,e,0,0)}else if(4===arguments.length){var n=arguments[0],i=arguments[1];this._noder=n,this._scaleFactor=i,this._isScaled=!this.isIntegerPrecision()}}e(qi.prototype,{interfaces_:function(){return[]},getClass:function(){return qi}}),qi.relativeSign=function(t,e){return t<e?-1:t>e?1:0},qi.compare=function(t,e,n){if(e.equals2D(n))return 0;var i=qi.relativeSign(e.x,n.x),r=qi.relativeSign(e.y,n.y);switch(t){case 0:return qi.compareValue(i,r);case 1:return qi.compareValue(r,i);case 2:return qi.compareValue(r,-i);case 3:return qi.compareValue(-i,r);case 4:return qi.compareValue(-i,-r);case 5:return qi.compareValue(-r,-i);case 6:return qi.compareValue(-r,i);case 7:return qi.compareValue(i,-r)}return x.shouldNeverReachHere("invalid octant value"),0},qi.compareValue=function(t,e){return t<0?-1:t>0?1:e<0?-1:e>0?1:0},e(Bi.prototype,{getCoordinate:function(){return this.coord},print:function(t){t.print(this.coord),t.print(" seg # = "+this.segmentIndex)},compareTo:function(t){var e=t;return this.segmentIndex<e.segmentIndex?-1:this.segmentIndex>e.segmentIndex?1:this.coord.equals2D(e.coord)?0:qi.compare(this._segmentOctant,this.coord,e.coord)},isEndPoint:function(t){return 0===this.segmentIndex&&!this._isInterior||this.segmentIndex===t},isInterior:function(){return this._isInterior},interfaces_:function(){return[g]},getClass:function(){return Bi}}),e(Vi.prototype,{getSplitCoordinates:function(){var t=new b;this.addEndpoints();for(var e=this.iterator(),n=e.next();e.hasNext();){var i=e.next();this.addEdgeCoordinates(n,i,t),n=i}return t.toCoordinateArray()},addCollapsedNodes:function(){var t=new P;this.findCollapsesFromInsertedNodes(t),this.findCollapsesFromExistingVertices(t);for(var e=t.iterator();e.hasNext();){var n=e.next().intValue();this.add(this._edge.getCoordinate(n),n)}},print:function(t){t.println("Intersections:");for(var e=this.iterator();e.hasNext();){e.next().print(t)}},findCollapsesFromExistingVertices:function(t){for(var e=0;e<this._edge.size()-2;e++){var n=this._edge.getCoordinate(e),i=(this._edge.getCoordinate(e+1),this._edge.getCoordinate(e+2));n.equals2D(i)&&t.add(new G(e+1))}},addEdgeCoordinates:function(t,e,n){e.segmentIndex,t.segmentIndex;var i=this._edge.getCoordinate(e.segmentIndex),r=e.isInterior()||!e.coord.equals2D(i);n.add(new E(t.coord),!1);for(var s=t.segmentIndex+1;s<=e.segmentIndex;s++)n.add(this._edge.getCoordinate(s));r&&n.add(new E(e.coord))},iterator:function(){return this._nodeMap.values().iterator()},addSplitEdges:function(t){this.addEndpoints(),this.addCollapsedNodes();for(var e=this.iterator(),n=e.next();e.hasNext();){var i=e.next(),r=this.createSplitEdge(n,i);t.add(r),n=i}},findCollapseIndex:function(t,e,n){if(!t.coord.equals2D(e.coord))return!1;var i=e.segmentIndex-t.segmentIndex;return e.isInterior()||i--,1===i&&(n[0]=t.segmentIndex+1,!0)},findCollapsesFromInsertedNodes:function(t){for(var e=new Array(1).fill(null),n=this.iterator(),i=n.next();n.hasNext();){var r=n.next();this.findCollapseIndex(i,r,e)&&t.add(new G(e[0])),i=r}},getEdge:function(){return this._edge},addEndpoints:function(){var t=this._edge.size()-1;this.add(this._edge.getCoordinate(0),0),this.add(this._edge.getCoordinate(t),t)},createSplitEdge:function(t,e){var n=e.segmentIndex-t.segmentIndex+2,i=this._edge.getCoordinate(e.segmentIndex),r=e.isInterior()||!e.coord.equals2D(i);r||n--;var s=new Array(n).fill(null),o=0;s[o++]=new E(t.coord);for(var a=t.segmentIndex+1;a<=e.segmentIndex;a++)s[o++]=this._edge.getCoordinate(a);return r&&(s[o]=new E(e.coord)),new Xi(s,this._edge.getData())},add:function(t,e){var n=new Bi(this._edge,t,e,this._edge.getSegmentOctant(e)),i=this._nodeMap.get(n);return null!==i?(x.isTrue(i.coord.equals2D(t),"Found equal nodes with different coordinates"),i):(this._nodeMap.put(n,n),n)},checkSplitEdgesCorrectness:function(t){var e=this._edge.getCoordinates(),n=t.get(0).getCoordinate(0);if(!n.equals2D(e[0]))throw new m("bad split edge start point at "+n);var i=t.get(t.size()-1).getCoordinates(),r=i[i.length-1];if(!r.equals2D(e[e.length-1]))throw new m("bad split edge end point at "+r)},interfaces_:function(){return[]},getClass:function(){return Vi}}),e(zi.prototype,{next:function(){return null===this._currNode?(this._currNode=this._nextNode,this._currSegIndex=this._currNode.segmentIndex,this.readNextNode(),this._currNode):null===this._nextNode?null:this._nextNode.segmentIndex===this._currNode.segmentIndex?(this._currNode=this._nextNode,this._currSegIndex=this._currNode.segmentIndex,this.readNextNode(),this._currNode):(this._nextNode.segmentIndex,this._currNode.segmentIndex,null)},remove:function(){throw new UnsupportedOperationException(this.getClass().getName())},hasNext:function(){return null!==this._nextNode},readNextNode:function(){this._nodeIt.hasNext()?this._nextNode=this._nodeIt.next():this._nextNode=null},interfaces_:function(){return[C]},getClass:function(){return zi}}),e(Yi.prototype,{interfaces_:function(){return[]},getClass:function(){return Yi}}),Yi.octant=function(){if("number"==typeof arguments[0]&&"number"==typeof arguments[1]){var t=arguments[0],e=arguments[1];if(0===t&&0===e)throw new i("Cannot compute the octant for point ( "+t+", "+e+" )");var n=Math.abs(t),r=Math.abs(e);return t>=0?e>=0?n>=r?0:1:n>=r?7:6:e>=0?n>=r?3:2:n>=r?4:5}if(arguments[0]instanceof E&&arguments[1]instanceof E){var s=arguments[0],o=arguments[1],a=o.x-s.x,u=o.y-s.y;if(0===a&&0===u)throw new i("Cannot compute the octant for two identical points "+s);return Yi.octant(a,u)}},e(ki.prototype,{getCoordinates:function(){},size:function(){},getCoordinate:function(t){},isClosed:function(){},setData:function(t){},getData:function(){},interfaces_:function(){return[]},getClass:function(){return ki}}),e(Ui.prototype,{addIntersection:function(t,e){},interfaces_:function(){return[ki]},getClass:function(){return Ui}}),e(Xi.prototype,{getCoordinates:function(){return this._pts},size:function(){return this._pts.length},getCoordinate:function(t){return this._pts[t]},isClosed:function(){return this._pts[0].equals(this._pts[this._pts.length-1])},getSegmentOctant:function(t){return t===this._pts.length-1?-1:this.safeOctant(this.getCoordinate(t),this.getCoordinate(t+1))},setData:function(t){this._data=t},safeOctant:function(t,e){return t.equals2D(e)?0:Yi.octant(t,e)},getData:function(){return this._data},addIntersection:function(){if(2===arguments.length){var t=arguments[0],e=arguments[1];this.addIntersectionNode(t,e)}else if(4===arguments.length){var n=arguments[0],i=arguments[1],r=(arguments[2],arguments[3]),s=new E(n.getIntersection(r));this.addIntersection(s,i)}},toString:function(){return he.toLineString(new Kt(this._pts))},getNodeList:function(){return this._nodeList},addIntersectionNode:function(t,e){var n=e,i=n+1;if(i<this._pts.length){var r=this._pts[i];t.equals2D(r)&&(n=i)}return this._nodeList.add(t,n)},addIntersections:function(t,e,n){for(var i=0;i<t.getIntersectionNum();i++)this.addIntersection(t,e,n,i)},interfaces_:function(){return[Ui]},getClass:function(){return Xi}}),Xi.getNodedSubstrings=function(){if(1===arguments.length){var t=arguments[0],e=new P;return Xi.getNodedSubstrings(t,e),e}if(2===arguments.length)for(var n=arguments[0],i=arguments[1],r=n.iterator();r.hasNext();){r.next().getNodeList().addSplitEdges(i)}},e(Hi.prototype,{overlap:function(){if(2===arguments.length);else if(4===arguments.length){var t=arguments[0],e=arguments[1],n=arguments[2],i=arguments[3];t.getLineSegment(e,this._overlapSeg1),n.getLineSegment(i,this._overlapSeg2),this.overlap(this._overlapSeg1,this._overlapSeg2)}},interfaces_:function(){return[]},getClass:function(){return Hi}}),e(Wi.prototype,{computeNodes:function(t){},getNodedSubstrings:function(){},interfaces_:function(){return[]},getClass:function(){return Wi}}),e(ji.prototype,{setSegmentIntersector:function(t){this._segInt=t},interfaces_:function(){return[Wi]},getClass:function(){return ji}}),v(Ki,ji),e(Ki.prototype,{getMonotoneChains:function(){return this._monoChains},getNodedSubstrings:function(){return Xi.getNodedSubstrings(this._nodedSegStrings)},getIndex:function(){return this._index},add:function(t){for(var e=dn.getChains(t.getCoordinates(),t).iterator();e.hasNext();){var n=e.next();n.setId(this._idCounter++),this._index.insert(n.getEnvelope(),n),this._monoChains.add(n)}},computeNodes:function(t){this._nodedSegStrings=t;for(var e=t.iterator();e.hasNext();)this.add(e.next());this.intersectChains()},intersectChains:function(){for(var t=new Zi(this._segInt),e=this._monoChains.iterator();e.hasNext();)for(var n=e.next(),i=this._index.query(n.getEnvelope()).iterator();i.hasNext();){var r=i.next();if(r.getId()>n.getId()&&(n.computeOverlaps(r,t),this._nOverlaps++),this._segInt.isDone())return null}},interfaces_:function(){return[]},getClass:function(){return Ki}}),v(Zi,Hi),e(Zi.prototype,{overlap:function(){if(4!==arguments.length)return Hi.prototype.overlap.apply(this,arguments);var t=arguments[0],e=arguments[1],n=arguments[2],i=arguments[3],r=t.getContext(),s=n.getContext();this._si.processIntersections(r,e,s,i)},interfaces_:function(){return[]},getClass:function(){return Zi}}),Ki.SegmentOverlapAction=Zi,e(Qi.prototype,{rescale:function(){if(N(arguments[0],S))for(var t=arguments[0].iterator();t.hasNext();){var e=t.next();this.rescale(e.getCoordinates())}else if(arguments[0]instanceof Array){var n=arguments[0];2===n.length&&(new E(n[0]),new E(n[1]));for(t=0;t<n.length;t++)n[t].x=n[t].x/this._scaleFactor+this._offsetX,n[t].y=n[t].y/this._scaleFactor+this._offsetY;2===n.length&&n[0].equals2D(n[1])&&Y.out.println(n)}},scale:function(){if(N(arguments[0],S)){for(var t=arguments[0],e=new P(t.size()),n=t.iterator();n.hasNext();){var i=n.next();e.add(new Xi(this.scale(i.getCoordinates()),i.getData()))}return e}if(arguments[0]instanceof Array){var r=arguments[0],s=new Array(r.length).fill(null);for(n=0;n<r.length;n++)s[n]=new E(Math.round((r[n].x-this._offsetX)*this._scaleFactor),Math.round((r[n].y-this._offsetY)*this._scaleFactor),r[n].z);return nt.removeRepeatedPoints(s)}},isIntegerPrecision:function(){return 1===this._scaleFactor},getNodedSubstrings:function(){var t=this._noder.getNodedSubstrings();return this._isScaled&&this.rescale(t),t},computeNodes:function(t){var e=t;this._isScaled&&(e=this.scale(t)),this._noder.computeNodes(e)},interfaces_:function(){return[Wi]},getClass:function(){return Qi}});var Ji=Object.freeze({MCIndexNoder:Ki,ScaledNoder:Qi,SegmentString:ki});function $i(){if(this._inputGeom=null,this._isClosedEndpointsInInterior=!0,this._nonSimpleLocation=null,1===arguments.length){var t=arguments[0];this._inputGeom=t}else if(2===arguments.length){var e=arguments[0],n=arguments[1];this._inputGeom=e,this._isClosedEndpointsInInterior=!n.isInBoundary(2)}}function tr(){this.pt=null,this.isClosed=null,this.degree=null;var t=arguments[0];this.pt=t,this.isClosed=!1,this.degree=0}function er(){if(this._quadrantSegments=er.DEFAULT_QUADRANT_SEGMENTS,this._endCapStyle=er.CAP_ROUND,this._joinStyle=er.JOIN_ROUND,this._mitreLimit=er.DEFAULT_MITRE_LIMIT,this._isSingleSided=!1,this._simplifyFactor=er.DEFAULT_SIMPLIFY_FACTOR,0===arguments.length);else if(1===arguments.length){var t=arguments[0];this.setQuadrantSegments(t)}else if(2===arguments.length){var e=arguments[0],n=arguments[1];this.setQuadrantSegments(e),this.setEndCapStyle(n)}else if(4===arguments.length){var i=arguments[0],r=arguments[1],s=arguments[2],o=arguments[3];this.setQuadrantSegments(i),this.setEndCapStyle(r),this.setJoinStyle(s),this.setMitreLimit(o)}}function nr(){this._minIndex=-1,this._minCoord=null,this._minDe=null,this._orientedDe=null}function ir(){this.array_=[]}function rr(){this._finder=null,this._dirEdgeList=new P,this._nodes=new P,this._rightMostCoord=null,this._env=null,this._finder=new nr}function sr(){this._startDe=null,this._maxNodeDegree=-1,this._edges=new P,this._pts=new P,this._label=new zn(de.NONE),this._ring=null,this._isHole=null,this._shell=null,this._holes=new P,this._geometryFactory=null;var t=arguments[0],e=arguments[1];this._geometryFactory=e,this.computePoints(t),this.computeRing()}function or(){var t=arguments[0],e=arguments[1];sr.call(this,t,e)}function ar(){var t=arguments[0],e=arguments[1];sr.call(this,t,e)}function ur(){this._geometryFactory=null,this._shellList=new P;var t=arguments[0];this._geometryFactory=t}function lr(){this._inputLine=null,this._distanceTol=null,this._isDeleted=null,this._angleOrientation=z.COUNTERCLOCKWISE;var t=arguments[0];this._inputLine=t}function hr(){this._ptList=null,this._precisionModel=null,this._minimimVertexDistance=0,this._ptList=new P}function cr(){this._maxCurveSegmentError=0,this._filletAngleQuantum=null,this._closingSegLengthFactor=1,this._segList=null,this._distance=0,this._precisionModel=null,this._bufParams=null,this._li=null,this._s0=null,this._s1=null,this._s2=null,this._seg0=new ge,this._seg1=new ge,this._offset0=new ge,this._offset1=new ge,this._side=0,this._hasNarrowConcaveAngle=!1;var t=arguments[0],e=arguments[1],n=arguments[2];this._precisionModel=t,this._bufParams=e,this._li=new fe,this._filletAngleQuantum=Math.PI/2/e.getQuadrantSegments(),e.getQuadrantSegments()>=8&&e.getJoinStyle()===er.JOIN_ROUND&&(this._closingSegLengthFactor=cr.MAX_CLOSING_SEG_LEN_FACTOR),this.init(n)}function fr(){this._distance=0,this._precisionModel=null,this._bufParams=null;var t=arguments[0],e=arguments[1];this._precisionModel=t,this._bufParams=e}function gr(){this._subgraphs=null,this._seg=new ge;var t=arguments[0];this._subgraphs=t}function dr(){this._upwardSeg=null,this._leftDepth=null;var t=arguments[0],e=arguments[1];this._upwardSeg=new ge(t),this._leftDepth=e}function _r(){this._inputGeom=null,this._distance=null,this._curveBuilder=null,this._curveList=new P;var t=arguments[0],e=arguments[1],n=arguments[2];this._inputGeom=t,this._distance=e,this._curveBuilder=n}function pr(){this._edgeMap=new pt,this._edgeList=null,this._ptInAreaLocation=[de.NONE,de.NONE]}function mr(){pr.apply(this),this._resultAreaEdgeList=null,this._label=null,this._SCANNING_FOR_INCOMING=1,this._LINKING_TO_OUTGOING=2}function vr(){ti.apply(this)}function yr(){this._pts=null,this._orientation=null;var t=arguments[0];this._pts=t,this._orientation=yr.orientation(t)}function xr(){this._edges=new P,this._ocaMap=new pt}function Er(){}function Ir(){this._hasIntersection=!1,this._hasProper=!1,this._hasProperInterior=!1,this._hasInterior=!1,this._properIntersectionPoint=null,this._li=null,this._isSelfIntersection=null,this.numIntersections=0,this.numInteriorIntersections=0,this.numProperIntersections=0,this.numTests=0;var t=arguments[0];this._li=t}function Nr(){this._bufParams=null,this._workingPrecisionModel=null,this._workingNoder=null,this._geomFact=null,this._graph=null,this._edgeList=new xr;var t=arguments[0];this._bufParams=t}function Cr(){this._li=new fe,this._segStrings=null;var t=arguments[0];this._segStrings=t}function Sr(){this._li=null,this._pt=null,this._originalPt=null,this._ptScaled=null,this._p0Scaled=null,this._p1Scaled=null,this._scaleFactor=null,this._minx=null,this._maxx=null,this._miny=null,this._maxy=null,this._corner=new Array(4).fill(null),this._safeEnv=null;var t=arguments[0],e=arguments[1],n=arguments[2];if(this._originalPt=t,this._pt=t,this._scaleFactor=e,this._li=n,e<=0)throw new i("Scale factor must be non-zero");1!==e&&(this._pt=new E(this.scale(t.x),this.scale(t.y)),this._p0Scaled=new E,this._p1Scaled=new E),this.initCorners(this._pt)}function Lr(){this._index=null;var t=arguments[0];this._index=t}function wr(){nn.apply(this),this._hotPixel=null,this._parentEdge=null,this._hotPixelVertexIndex=null,this._isNodeAdded=!1;var t=arguments[0],e=arguments[1],n=arguments[2];this._hotPixel=t,this._parentEdge=e,this._hotPixelVertexIndex=n}function Rr(){this._li=null,this._interiorIntersections=null;var t=arguments[0];this._li=t,this._interiorIntersections=new P}function Tr(){this._pm=null,this._li=null,this._scaleFactor=null,this._noder=null,this._pointSnapper=null,this._nodedSegStrings=null;var t=arguments[0];this._pm=t,this._li=new fe,this._li.setPrecisionModel(t),this._scaleFactor=t.getScale()}function Pr(){if(this._argGeom=null,this._distance=null,this._bufParams=new er,this._resultGeometry=null,this._saveException=null,1===arguments.length){var t=arguments[0];this._argGeom=t}else if(2===arguments.length){var e=arguments[0],n=arguments[1];this._argGeom=e,this._bufParams=n}}e($i.prototype,{isSimpleMultiPoint:function(t){if(t.isEmpty())return!0;for(var e=new yt,n=0;n<t.getNumGeometries();n++){var i=t.getGeometryN(n).getCoordinate();if(e.contains(i))return this._nonSimpleLocation=i,!1;e.add(i)}return!0},isSimplePolygonal:function(t){for(var e=be.getLines(t).iterator();e.hasNext();){var n=e.next();if(!this.isSimpleLinearGeometry(n))return!1}return!0},hasClosedEndpointIntersection:function(t){for(var e=new pt,n=t.getEdgeIterator();n.hasNext();){var i=n.next(),r=(i.getMaximumSegmentIndex(),i.isClosed()),s=i.getCoordinate(0);this.addEndpoint(e,s,r);var o=i.getCoordinate(i.getNumPoints()-1);this.addEndpoint(e,o,r)}for(n=e.values().iterator();n.hasNext();){var a=n.next();if(a.isClosed&&2!==a.degree)return this._nonSimpleLocation=a.getCoordinate(),!0}return!1},getNonSimpleLocation:function(){return this._nonSimpleLocation},isSimpleLinearGeometry:function(t){if(t.isEmpty())return!0;var e=new ni(0,t),n=new fe,i=e.computeSelfNodes(n,!0);return!i.hasIntersection()||(i.hasProperIntersection()?(this._nonSimpleLocation=i.getProperIntersectionPoint(),!1):!this.hasNonEndpointIntersection(e)&&(!this._isClosedEndpointsInInterior||!this.hasClosedEndpointIntersection(e)))},hasNonEndpointIntersection:function(t){for(var e=t.getEdgeIterator();e.hasNext();)for(var n=e.next(),i=n.getMaximumSegmentIndex(),r=n.getEdgeIntersectionList().iterator();r.hasNext();){var s=r.next();if(!s.isEndPoint(i))return this._nonSimpleLocation=s.getCoordinate(),!0}return!1},addEndpoint:function(t,e,n){var i=t.get(e);null===i&&(i=new tr(e),t.put(e,i)),i.addEndpoint(n)},computeSimple:function(t){return this._nonSimpleLocation=null,!!t.isEmpty()||(t instanceof At?this.isSimpleLinearGeometry(t):t instanceof wt?this.isSimpleLinearGeometry(t):t instanceof zt?this.isSimpleMultiPoint(t):N(t,Bt)?this.isSimplePolygonal(t):!(t instanceof Lt)||this.isSimpleGeometryCollection(t))},isSimple:function(){return this._nonSimpleLocation=null,this.computeSimple(this._inputGeom)},isSimpleGeometryCollection:function(t){for(var e=0;e<t.getNumGeometries();e++){var n=t.getGeometryN(e);if(!this.computeSimple(n))return!1}return!0},interfaces_:function(){return[]},getClass:function(){return $i}}),$i.isSimple=function(){return 1===arguments.length?new $i(arguments[0]).isSimple():2===arguments.length?new $i(arguments[0],arguments[1]).isSimple():void 0},e(tr.prototype,{addEndpoint:function(t){this.degree++,this.isClosed|=t},getCoordinate:function(){return this.pt},interfaces_:function(){return[]},getClass:function(){return tr}}),$i.EndpointInfo=tr,e(er.prototype,{getEndCapStyle:function(){return this._endCapStyle},isSingleSided:function(){return this._isSingleSided},setQuadrantSegments:function(t){this._quadrantSegments=t,0===this._quadrantSegments&&(this._joinStyle=er.JOIN_BEVEL),this._quadrantSegments<0&&(this._joinStyle=er.JOIN_MITRE,this._mitreLimit=Math.abs(this._quadrantSegments)),t<=0&&(this._quadrantSegments=1),this._joinStyle!==er.JOIN_ROUND&&(this._quadrantSegments=er.DEFAULT_QUADRANT_SEGMENTS)},getJoinStyle:function(){return this._joinStyle},setJoinStyle:function(t){this._joinStyle=t},setSimplifyFactor:function(t){this._simplifyFactor=t<0?0:t},getSimplifyFactor:function(){return this._simplifyFactor},getQuadrantSegments:function(){return this._quadrantSegments},setEndCapStyle:function(t){this._endCapStyle=t},getMitreLimit:function(){return this._mitreLimit},setMitreLimit:function(t){this._mitreLimit=t},setSingleSided:function(t){this._isSingleSided=t},interfaces_:function(){return[]},getClass:function(){return er}}),er.bufferDistanceError=function(t){var e=Math.PI/2/t;return 1-Math.cos(e/2)},er.CAP_ROUND=1,er.CAP_FLAT=2,er.CAP_SQUARE=3,er.JOIN_ROUND=1,er.JOIN_MITRE=2,er.JOIN_BEVEL=3,er.DEFAULT_QUADRANT_SEGMENTS=8,er.DEFAULT_MITRE_LIMIT=5,er.DEFAULT_SIMPLIFY_FACTOR=.01,e(nr.prototype,{getCoordinate:function(){return this._minCoord},getRightmostSide:function(t,e){var n=this.getRightmostSideOfSegment(t,e);return n<0&&(n=this.getRightmostSideOfSegment(t,e-1)),n<0&&(this._minCoord=null,this.checkForRightmostCoordinate(t)),n},findRightmostEdgeAtVertex:function(){var t=this._minDe.getEdge().getCoordinates();x.isTrue(this._minIndex>0&&this._minIndex<t.length,"rightmost point expected to be interior vertex of edge");var e=t[this._minIndex-1],n=t[this._minIndex+1],i=z.index(this._minCoord,n,e),r=!1;e.y<this._minCoord.y&&n.y<this._minCoord.y&&i===z.COUNTERCLOCKWISE?r=!0:e.y>this._minCoord.y&&n.y>this._minCoord.y&&i===z.CLOCKWISE&&(r=!0),r&&(this._minIndex=this._minIndex-1)},getRightmostSideOfSegment:function(t,e){var n=t.getEdge().getCoordinates();if(e<0||e+1>=n.length)return-1;if(n[e].y===n[e+1].y)return-1;var i=Dn.LEFT;return n[e].y<n[e+1].y&&(i=Dn.RIGHT),i},getEdge:function(){return this._orientedDe},checkForRightmostCoordinate:function(t){for(var e=t.getEdge().getCoordinates(),n=0;n<e.length-1;n++)(null===this._minCoord||e[n].x>this._minCoord.x)&&(this._minDe=t,this._minIndex=n,this._minCoord=e[n])},findRightmostEdgeAtNode:function(){var t=this._minDe.getNode().getEdges();this._minDe=t.getRightmostEdge(),this._minDe.isForward()||(this._minDe=this._minDe.getSym(),this._minIndex=this._minDe.getEdge().getCoordinates().length-1)},findEdge:function(t){for(var e=t.iterator();e.hasNext();){var n=e.next();n.isForward()&&this.checkForRightmostCoordinate(n)}x.isTrue(0!==this._minIndex||this._minCoord.equals(this._minDe.getCoordinate()),"inconsistency in rightmost processing"),0===this._minIndex?this.findRightmostEdgeAtNode():this.findRightmostEdgeAtVertex(),this._orientedDe=this._minDe,this.getRightmostSide(this._minDe,this._minIndex)===Dn.LEFT&&(this._orientedDe=this._minDe.getSym())},interfaces_:function(){return[]},getClass:function(){return nr}}),ir.prototype.addLast=function(t){this.array_.push(t)},ir.prototype.removeFirst=function(){return this.array_.shift()},ir.prototype.isEmpty=function(){return 0===this.array_.length},e(rr.prototype,{clearVisitedEdges:function(){for(var t=this._dirEdgeList.iterator();t.hasNext();){t.next().setVisited(!1)}},getRightmostCoordinate:function(){return this._rightMostCoord},computeNodeDepth:function(t){for(var e=null,n=t.getEdges().iterator();n.hasNext();){if((i=n.next()).isVisited()||i.getSym().isVisited()){e=i;break}}if(null===e)throw new Jn("unable to find edge to compute depths at "+t.getCoordinate());t.getEdges().computeDepths(e);for(n=t.getEdges().iterator();n.hasNext();){var i;(i=n.next()).setVisited(!0),this.copySymDepths(i)}},computeDepth:function(t){this.clearVisitedEdges();var e=this._finder.getEdge();e.getNode(),e.getLabel();e.setEdgeDepths(Dn.RIGHT,t),this.copySymDepths(e),this.computeDepths(e)},create:function(t){this.addReachable(t),this._finder.findEdge(this._dirEdgeList),this._rightMostCoord=this._finder.getCoordinate()},findResultEdges:function(){for(var t=this._dirEdgeList.iterator();t.hasNext();){var e=t.next();e.getDepth(Dn.RIGHT)>=1&&e.getDepth(Dn.LEFT)<=0&&!e.isInteriorAreaEdge()&&e.setInResult(!0)}},computeDepths:function(t){var e=new ut,n=new ir,i=t.getNode();for(n.addLast(i),e.add(i),t.setVisited(!0);!n.isEmpty();){var r=n.removeFirst();e.add(r),this.computeNodeDepth(r);for(var s=r.getEdges().iterator();s.hasNext();){var o=s.next().getSym();if(!o.isVisited()){var a=o.getNode();e.contains(a)||(n.addLast(a),e.add(a))}}}},compareTo:function(t){var e=t;return this._rightMostCoord.x<e._rightMostCoord.x?-1:this._rightMostCoord.x>e._rightMostCoord.x?1:0},getEnvelope:function(){if(null===this._env){for(var t=new M,e=this._dirEdgeList.iterator();e.hasNext();)for(var n=e.next().getEdge().getCoordinates(),i=0;i<n.length-1;i++)t.expandToInclude(n[i]);this._env=t}return this._env},addReachable:function(t){var e=new je;for(e.add(t);!e.empty();){var n=e.pop();this.add(n,e)}},copySymDepths:function(t){var e=t.getSym();e.setDepth(Dn.LEFT,t.getDepth(Dn.RIGHT)),e.setDepth(Dn.RIGHT,t.getDepth(Dn.LEFT))},add:function(t,e){t.setVisited(!0),this._nodes.add(t);for(var n=t.getEdges().iterator();n.hasNext();){var i=n.next();this._dirEdgeList.add(i);var r=i.getSym().getNode();r.isVisited()||e.push(r)}},getNodes:function(){return this._nodes},getDirectedEdges:function(){return this._dirEdgeList},interfaces_:function(){return[g]},getClass:function(){return rr}}),e(sr.prototype,{computeRing:function(){if(null!==this._ring)return null;for(var t=new Array(this._pts.size()).fill(null),e=0;e<this._pts.size();e++)t[e]=this._pts.get(e);this._ring=this._geometryFactory.createLinearRing(t),this._isHole=z.isCCW(this._ring.getCoordinates())},isIsolated:function(){return 1===this._label.getGeometryCount()},computePoints:function(t){this._startDe=t;var e=t,n=!0;do{if(null===e)throw new Jn("Found null DirectedEdge");if(e.getEdgeRing()===this)throw new Jn("Directed Edge visited twice during ring-building at "+e.getCoordinate());this._edges.add(e);var i=e.getLabel();x.isTrue(i.isArea()),this.mergeLabel(i),this.addPoints(e.getEdge(),e.isForward(),n),n=!1,this.setEdgeRing(e,this),e=this.getNext(e)}while(e!==this._startDe)},getLinearRing:function(){return this._ring},getCoordinate:function(t){return this._pts.get(t)},computeMaxNodeDegree:function(){this._maxNodeDegree=0;var t=this._startDe;do{var e=t.getNode().getEdges().getOutgoingDegree(this);e>this._maxNodeDegree&&(this._maxNodeDegree=e),t=this.getNext(t)}while(t!==this._startDe);this._maxNodeDegree*=2},addPoints:function(t,e,n){var i=t.getCoordinates();if(e){var r=1;n&&(r=0);for(var s=r;s<i.length;s++)this._pts.add(i[s])}else{r=i.length-2;n&&(r=i.length-1);for(s=r;s>=0;s--)this._pts.add(i[s])}},isHole:function(){return this._isHole},setInResult:function(){var t=this._startDe;do{t.getEdge().setInResult(!0),t=t.getNext()}while(t!==this._startDe)},containsPoint:function(t){var e=this.getLinearRing();if(!e.getEnvelopeInternal().contains(t))return!1;if(!qe.isInRing(t,e.getCoordinates()))return!1;for(var n=this._holes.iterator();n.hasNext();){if(n.next().containsPoint(t))return!1}return!0},addHole:function(t){this._holes.add(t)},isShell:function(){return null===this._shell},getLabel:function(){return this._label},getEdges:function(){return this._edges},getMaxNodeDegree:function(){return this._maxNodeDegree<0&&this.computeMaxNodeDegree(),this._maxNodeDegree},getShell:function(){return this._shell},mergeLabel:function(){if(1===arguments.length){var t=arguments[0];this.mergeLabel(t,0),this.mergeLabel(t,1)}else if(2===arguments.length){var e=arguments[0],n=arguments[1],i=e.getLocation(n,Dn.RIGHT);if(i===de.NONE)return null;if(this._label.getLocation(n)===de.NONE)return this._label.setLocation(n,i),null}},setShell:function(t){this._shell=t,null!==t&&t.addHole(this)},toPolygon:function(t){for(var e=new Array(this._holes.size()).fill(null),n=0;n<this._holes.size();n++)e[n]=this._holes.get(n).getLinearRing();return t.createPolygon(this.getLinearRing(),e)},interfaces_:function(){return[]},getClass:function(){return sr}}),v(or,sr),e(or.prototype,{setEdgeRing:function(t,e){t.setMinEdgeRing(e)},getNext:function(t){return t.getNextMin()},interfaces_:function(){return[]},getClass:function(){return or}}),v(ar,sr),e(ar.prototype,{buildMinimalRings:function(){var t=new P,e=this._startDe;do{if(null===e.getMinEdgeRing()){var n=new or(e,this._geometryFactory);t.add(n)}e=e.getNext()}while(e!==this._startDe);return t},setEdgeRing:function(t,e){t.setEdgeRing(e)},linkDirectedEdgesForMinimalEdgeRings:function(){var t=this._startDe;do{t.getNode().getEdges().linkMinimalDirectedEdges(this),t=t.getNext()}while(t!==this._startDe)},getNext:function(t){return t.getNext()},interfaces_:function(){return[]},getClass:function(){return ar}}),e(ur.prototype,{sortShellsAndHoles:function(t,e,n){for(var i=t.iterator();i.hasNext();){var r=i.next();r.isHole()?n.add(r):e.add(r)}},computePolygons:function(t){for(var e=new P,n=t.iterator();n.hasNext();){var i=n.next().toPolygon(this._geometryFactory);e.add(i)}return e},placeFreeHoles:function(t,e){for(var n=e.iterator();n.hasNext();){var i=n.next();if(null===i.getShell()){var r=this.findEdgeRingContaining(i,t);if(null===r)throw new Jn("unable to assign hole to a shell",i.getCoordinate(0));i.setShell(r)}}},buildMinimalEdgeRings:function(t,e,n){for(var i=new P,r=t.iterator();r.hasNext();){var s=r.next();if(s.getMaxNodeDegree()>2){s.linkDirectedEdgesForMinimalEdgeRings();var o=s.buildMinimalRings(),a=this.findShell(o);null!==a?(this.placePolygonHoles(a,o),e.add(a)):n.addAll(o)}else i.add(s)}return i},containsPoint:function(t){for(var e=this._shellList.iterator();e.hasNext();){if(e.next().containsPoint(t))return!0}return!1},buildMaximalEdgeRings:function(t){for(var e=new P,n=t.iterator();n.hasNext();){var i=n.next();if(i.isInResult()&&i.getLabel().isArea()&&null===i.getEdgeRing()){var r=new ar(i,this._geometryFactory);e.add(r),r.setInResult()}}return e},placePolygonHoles:function(t,e){for(var n=e.iterator();n.hasNext();){var i=n.next();i.isHole()&&i.setShell(t)}},getPolygons:function(){return this.computePolygons(this._shellList)},findEdgeRingContaining:function(t,e){for(var n=t.getLinearRing(),i=n.getEnvelopeInternal(),r=n.getCoordinateN(0),s=null,o=null,a=e.iterator();a.hasNext();){var u=a.next(),l=u.getLinearRing(),h=l.getEnvelopeInternal();null!==s&&(o=s.getLinearRing().getEnvelopeInternal());var c=!1;h.contains(i)&&qe.isInRing(r,l.getCoordinates())&&(c=!0),c&&(null===s||o.contains(h))&&(s=u)}return s},findShell:function(t){for(var e=0,n=null,i=t.iterator();i.hasNext();){var r=i.next();r.isHole()||(n=r,e++)}return x.isTrue(e<=1,"found two shells in MinimalEdgeRing list"),n},add:function(){if(1===arguments.length){var t=arguments[0];this.add(t.getEdgeEnds(),t.getNodes())}else if(2===arguments.length){var e=arguments[0],n=arguments[1];ei.linkResultDirectedEdges(n);var i=this.buildMaximalEdgeRings(e),r=new P,s=this.buildMinimalEdgeRings(i,this._shellList,r);this.sortShellsAndHoles(s,this._shellList,r),this.placeFreeHoles(this._shellList,r)}},interfaces_:function(){return[]},getClass:function(){return ur}}),e(lr.prototype,{isDeletable:function(t,e,n,i){var r=this._inputLine[t],s=this._inputLine[e],o=this._inputLine[n];return!!this.isConcave(r,s,o)&&(!!this.isShallow(r,s,o,i)&&this.isShallowSampled(r,s,t,n,i))},deleteShallowConcavities:function(){for(var t=1,e=(this._inputLine.length,this.findNextNonDeletedIndex(t)),n=this.findNextNonDeletedIndex(e),i=!1;n<this._inputLine.length;){var r=!1;this.isDeletable(t,e,n,this._distanceTol)&&(this._isDeleted[e]=lr.DELETE,r=!0,i=!0),t=r?n:e,e=this.findNextNonDeletedIndex(t),n=this.findNextNonDeletedIndex(e)}return i},isShallowConcavity:function(t,e,n,i){return z.index(t,e,n)===this._angleOrientation&&X.pointToSegment(e,t,n)<i},isShallowSampled:function(t,e,n,i,r){var s=Math.trunc((i-n)/lr.NUM_PTS_TO_CHECK);s<=0&&(s=1);for(var o=n;o<i;o+=s)if(!this.isShallow(t,e,this._inputLine[o],r))return!1;return!0},isConcave:function(t,e,n){var i=z.index(t,e,n)===this._angleOrientation;return i},simplify:function(t){this._distanceTol=Math.abs(t),t<0&&(this._angleOrientation=z.CLOCKWISE),this._isDeleted=new Array(this._inputLine.length).fill(null);var e=!1;do{e=this.deleteShallowConcavities()}while(e);return this.collapseLine()},findNextNonDeletedIndex:function(t){for(var e=t+1;e<this._inputLine.length&&this._isDeleted[e]===lr.DELETE;)e++;return e},isShallow:function(t,e,n,i){return X.pointToSegment(e,t,n)<i},collapseLine:function(){for(var t=new b,e=0;e<this._inputLine.length;e++)this._isDeleted[e]!==lr.DELETE&&t.add(this._inputLine[e]);return t.toCoordinateArray()},interfaces_:function(){return[]},getClass:function(){return lr}}),lr.simplify=function(t,e){return new lr(t).simplify(e)},lr.INIT=0,lr.DELETE=1,lr.KEEP=1,lr.NUM_PTS_TO_CHECK=10,e(hr.prototype,{getCoordinates:function(){return this._ptList.toArray(hr.COORDINATE_ARRAY_TYPE)},setPrecisionModel:function(t){this._precisionModel=t},addPt:function(t){var e=new E(t);if(this._precisionModel.makePrecise(e),this.isRedundant(e))return null;this._ptList.add(e)},reverse:function(){},addPts:function(t,e){if(e)for(var n=0;n<t.length;n++)this.addPt(t[n]);else for(n=t.length-1;n>=0;n--)this.addPt(t[n])},isRedundant:function(t){if(this._ptList.size()<1)return!1;var e=this._ptList.get(this._ptList.size()-1);return t.distance(e)<this._minimimVertexDistance},toString:function(){return(new se).createLineString(this.getCoordinates()).toString()},closeRing:function(){if(this._ptList.size()<1)return null;var t=new E(this._ptList.get(0)),e=this._ptList.get(this._ptList.size()-1);if(this._ptList.size()>=2&&this._ptList.get(this._ptList.size()-2),t.equals(e))return null;this._ptList.add(t)},setMinimumVertexDistance:function(t){this._minimimVertexDistance=t},interfaces_:function(){return[]},getClass:function(){return hr}}),hr.COORDINATE_ARRAY_TYPE=new Array(0).fill(null),e(cr.prototype,{addNextSegment:function(t,e){if(this._s0=this._s1,this._s1=this._s2,this._s2=t,this._seg0.setCoordinates(this._s0,this._s1),this.computeOffsetSegment(this._seg0,this._side,this._distance,this._offset0),this._seg1.setCoordinates(this._s1,this._s2),this.computeOffsetSegment(this._seg1,this._side,this._distance,this._offset1),this._s1.equals(this._s2))return null;var n=z.index(this._s0,this._s1,this._s2),i=n===z.CLOCKWISE&&this._side===Dn.LEFT||n===z.COUNTERCLOCKWISE&&this._side===Dn.RIGHT;0===n?this.addCollinear(e):i?this.addOutsideTurn(n,e):this.addInsideTurn(n,e)},addLineEndCap:function(t,e){var n=new ge(t,e),i=new ge;this.computeOffsetSegment(n,Dn.LEFT,this._distance,i);var r=new ge;this.computeOffsetSegment(n,Dn.RIGHT,this._distance,r);var s=e.x-t.x,o=e.y-t.y,a=Math.atan2(o,s);switch(this._bufParams.getEndCapStyle()){case er.CAP_ROUND:this._segList.addPt(i.p1),this.addDirectedFillet(e,a+Math.PI/2,a-Math.PI/2,z.CLOCKWISE,this._distance),this._segList.addPt(r.p1);break;case er.CAP_FLAT:this._segList.addPt(i.p1),this._segList.addPt(r.p1);break;case er.CAP_SQUARE:var u=new E;u.x=Math.abs(this._distance)*Math.cos(a),u.y=Math.abs(this._distance)*Math.sin(a);var l=new E(i.p1.x+u.x,i.p1.y+u.y),h=new E(r.p1.x+u.x,r.p1.y+u.y);this._segList.addPt(l),this._segList.addPt(h)}},getCoordinates:function(){return this._segList.getCoordinates()},addMitreJoin:function(t,e,n,i){var r=!0,s=null;try{s=k.intersection(e.p0,e.p1,n.p0,n.p1),(i<=0?1:s.distance(t)/Math.abs(i))>this._bufParams.getMitreLimit()&&(r=!1)}catch(t){if(!(t instanceof A))throw t;s=new E(0,0),r=!1}r?this._segList.addPt(s):this.addLimitedMitreJoin(e,n,i,this._bufParams.getMitreLimit())},addOutsideTurn:function(t,e){if(this._offset0.p1.distance(this._offset1.p0)<this._distance*cr.OFFSET_SEGMENT_SEPARATION_FACTOR)return this._segList.addPt(this._offset0.p1),null;this._bufParams.getJoinStyle()===er.JOIN_MITRE?this.addMitreJoin(this._s1,this._offset0,this._offset1,this._distance):this._bufParams.getJoinStyle()===er.JOIN_BEVEL?this.addBevelJoin(this._offset0,this._offset1):(e&&this._segList.addPt(this._offset0.p1),this.addCornerFillet(this._s1,this._offset0.p1,this._offset1.p0,t,this._distance),this._segList.addPt(this._offset1.p0))},createSquare:function(t){this._segList.addPt(new E(t.x+this._distance,t.y+this._distance)),this._segList.addPt(new E(t.x+this._distance,t.y-this._distance)),this._segList.addPt(new E(t.x-this._distance,t.y-this._distance)),this._segList.addPt(new E(t.x-this._distance,t.y+this._distance)),this._segList.closeRing()},addSegments:function(t,e){this._segList.addPts(t,e)},addFirstSegment:function(){this._segList.addPt(this._offset1.p0)},addCornerFillet:function(t,e,n,i,r){var s=e.x-t.x,o=e.y-t.y,a=Math.atan2(o,s),u=n.x-t.x,l=n.y-t.y,h=Math.atan2(l,u);i===z.CLOCKWISE?a<=h&&(a+=2*Math.PI):a>=h&&(a-=2*Math.PI),this._segList.addPt(e),this.addDirectedFillet(t,a,h,i,r),this._segList.addPt(n)},addLastSegment:function(){this._segList.addPt(this._offset1.p1)},initSideSegments:function(t,e,n){this._s1=t,this._s2=e,this._side=n,this._seg1.setCoordinates(t,e),this.computeOffsetSegment(this._seg1,n,this._distance,this._offset1)},addLimitedMitreJoin:function(t,e,n,i){var r=this._seg0.p1,s=pe.angle(r,this._seg0.p0),o=(pe.angle(r,this._seg1.p1),pe.angleBetweenOriented(this._seg0.p0,r,this._seg1.p1)/2),a=pe.normalize(s+o),u=pe.normalize(a+Math.PI),l=i*n,h=n-l*Math.abs(Math.sin(o)),c=new ge(r,new E(r.x+l*Math.cos(u),r.y+l*Math.sin(u))),f=c.pointAlongOffset(1,h),g=c.pointAlongOffset(1,-h);this._side===Dn.LEFT?(this._segList.addPt(f),this._segList.addPt(g)):(this._segList.addPt(g),this._segList.addPt(f))},addDirectedFillet:function(t,e,n,i,r){var s=i===z.CLOCKWISE?-1:1,o=Math.abs(e-n),a=Math.trunc(o/this._filletAngleQuantum+.5);if(a<1)return null;var u;u=o/a;for(var l=0,h=new E;l<o;){var c=e+s*l;h.x=t.x+r*Math.cos(c),h.y=t.y+r*Math.sin(c),this._segList.addPt(h),l+=u}},computeOffsetSegment:function(t,e,n,i){var r=e===Dn.LEFT?1:-1,s=t.p1.x-t.p0.x,o=t.p1.y-t.p0.y,a=Math.sqrt(s*s+o*o),u=r*n*s/a,l=r*n*o/a;i.p0.x=t.p0.x-l,i.p0.y=t.p0.y+u,i.p1.x=t.p1.x-l,i.p1.y=t.p1.y+u},addInsideTurn:function(t,e){if(this._li.computeIntersection(this._offset0.p0,this._offset0.p1,this._offset1.p0,this._offset1.p1),this._li.hasIntersection())this._segList.addPt(this._li.getIntersection(0));else if(this._hasNarrowConcaveAngle=!0,this._offset0.p1.distance(this._offset1.p0)<this._distance*cr.INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR)this._segList.addPt(this._offset0.p1);else{if(this._segList.addPt(this._offset0.p1),this._closingSegLengthFactor>0){var n=new E((this._closingSegLengthFactor*this._offset0.p1.x+this._s1.x)/(this._closingSegLengthFactor+1),(this._closingSegLengthFactor*this._offset0.p1.y+this._s1.y)/(this._closingSegLengthFactor+1));this._segList.addPt(n);var i=new E((this._closingSegLengthFactor*this._offset1.p0.x+this._s1.x)/(this._closingSegLengthFactor+1),(this._closingSegLengthFactor*this._offset1.p0.y+this._s1.y)/(this._closingSegLengthFactor+1));this._segList.addPt(i)}else this._segList.addPt(this._s1);this._segList.addPt(this._offset1.p0)}},createCircle:function(t){var e=new E(t.x+this._distance,t.y);this._segList.addPt(e),this.addDirectedFillet(t,0,2*Math.PI,-1,this._distance),this._segList.closeRing()},addBevelJoin:function(t,e){this._segList.addPt(t.p1),this._segList.addPt(e.p0)},init:function(t){this._distance=t,this._maxCurveSegmentError=t*(1-Math.cos(this._filletAngleQuantum/2)),this._segList=new hr,this._segList.setPrecisionModel(this._precisionModel),this._segList.setMinimumVertexDistance(t*cr.CURVE_VERTEX_SNAP_DISTANCE_FACTOR)},addCollinear:function(t){this._li.computeIntersection(this._s0,this._s1,this._s1,this._s2),this._li.getIntersectionNum()>=2&&(this._bufParams.getJoinStyle()===er.JOIN_BEVEL||this._bufParams.getJoinStyle()===er.JOIN_MITRE?(t&&this._segList.addPt(this._offset0.p1),this._segList.addPt(this._offset1.p0)):this.addCornerFillet(this._s1,this._offset0.p1,this._offset1.p0,z.CLOCKWISE,this._distance))},closeRing:function(){this._segList.closeRing()},hasNarrowConcaveAngle:function(){return this._hasNarrowConcaveAngle},interfaces_:function(){return[]},getClass:function(){return cr}}),cr.OFFSET_SEGMENT_SEPARATION_FACTOR=.001,cr.INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR=.001,cr.CURVE_VERTEX_SNAP_DISTANCE_FACTOR=1e-6,cr.MAX_CLOSING_SEG_LEN_FACTOR=80,e(fr.prototype,{getOffsetCurve:function(t,e){if(this._distance=e,0===e)return null;var n=e<0,i=Math.abs(e),r=this.getSegGen(i);t.length<=1?this.computePointCurve(t[0],r):this.computeOffsetCurve(t,n,r);var s=r.getCoordinates();return n&&nt.reverse(s),s},computeSingleSidedBufferCurve:function(t,e,n){var i=this.simplifyTolerance(this._distance);if(e){n.addSegments(t,!0);var r=lr.simplify(t,-i),s=r.length-1;n.initSideSegments(r[s],r[s-1],Dn.LEFT),n.addFirstSegment();for(var o=s-2;o>=0;o--)n.addNextSegment(r[o],!0)}else{n.addSegments(t,!1);var a=lr.simplify(t,i),u=a.length-1;n.initSideSegments(a[0],a[1],Dn.LEFT),n.addFirstSegment();for(o=2;o<=u;o++)n.addNextSegment(a[o],!0)}n.addLastSegment(),n.closeRing()},computeRingBufferCurve:function(t,e,n){var i=this.simplifyTolerance(this._distance);e===Dn.RIGHT&&(i=-i);var r=lr.simplify(t,i),s=r.length-1;n.initSideSegments(r[s-1],r[0],e);for(var o=1;o<=s;o++){var a=1!==o;n.addNextSegment(r[o],a)}n.closeRing()},computeLineBufferCurve:function(t,e){var n=this.simplifyTolerance(this._distance),i=lr.simplify(t,n),r=i.length-1;e.initSideSegments(i[0],i[1],Dn.LEFT);for(var s=2;s<=r;s++)e.addNextSegment(i[s],!0);e.addLastSegment(),e.addLineEndCap(i[r-1],i[r]);var o=lr.simplify(t,-n),a=o.length-1;e.initSideSegments(o[a],o[a-1],Dn.LEFT);for(s=a-2;s>=0;s--)e.addNextSegment(o[s],!0);e.addLastSegment(),e.addLineEndCap(o[1],o[0]),e.closeRing()},computePointCurve:function(t,e){switch(this._bufParams.getEndCapStyle()){case er.CAP_ROUND:e.createCircle(t);break;case er.CAP_SQUARE:e.createSquare(t)}},getLineCurve:function(t,e){if(this._distance=e,e<0&&!this._bufParams.isSingleSided())return null;if(0===e)return null;var n=Math.abs(e),i=this.getSegGen(n);if(t.length<=1)this.computePointCurve(t[0],i);else if(this._bufParams.isSingleSided()){var r=e<0;this.computeSingleSidedBufferCurve(t,r,i)}else this.computeLineBufferCurve(t,i);return i.getCoordinates()},getBufferParameters:function(){return this._bufParams},simplifyTolerance:function(t){return t*this._bufParams.getSimplifyFactor()},getRingCurve:function(t,e,n){if(this._distance=n,t.length<=2)return this.getLineCurve(t,n);if(0===n)return fr.copyCoordinates(t);var i=this.getSegGen(n);return this.computeRingBufferCurve(t,e,i),i.getCoordinates()},computeOffsetCurve:function(t,e,n){var i=this.simplifyTolerance(this._distance);if(e){var r=lr.simplify(t,-i),s=r.length-1;n.initSideSegments(r[s],r[s-1],Dn.LEFT),n.addFirstSegment();for(var o=s-2;o>=0;o--)n.addNextSegment(r[o],!0)}else{var a=lr.simplify(t,i),u=a.length-1;n.initSideSegments(a[0],a[1],Dn.LEFT),n.addFirstSegment();for(o=2;o<=u;o++)n.addNextSegment(a[o],!0)}n.addLastSegment()},getSegGen:function(t){return new cr(this._precisionModel,this._bufParams,t)},interfaces_:function(){return[]},getClass:function(){return fr}}),fr.copyCoordinates=function(t){for(var e=new Array(t.length).fill(null),n=0;n<e.length;n++)e[n]=new E(t[n]);return e},e(gr.prototype,{findStabbedSegments:function(){if(1===arguments.length){for(var t=arguments[0],e=new P,n=this._subgraphs.iterator();n.hasNext();){var i=n.next(),r=i.getEnvelope();t.y<r.getMinY()||t.y>r.getMaxY()||this.findStabbedSegments(t,i.getDirectedEdges(),e)}return e}if(3===arguments.length)if(N(arguments[2],w)&&arguments[0]instanceof E&&arguments[1]instanceof $n){var s=arguments[0],o=arguments[1],a=arguments[2],u=o.getEdge().getCoordinates();for(n=0;n<u.length-1;n++){if(this._seg.p0=u[n],this._seg.p1=u[n+1],this._seg.p0.y>this._seg.p1.y&&this._seg.reverse(),!(Math.max(this._seg.p0.x,this._seg.p1.x)<s.x||this._seg.isHorizontal()||s.y<this._seg.p0.y||s.y>this._seg.p1.y||z.index(this._seg.p0,this._seg.p1,s)===z.RIGHT)){var l=o.getDepth(Dn.LEFT);this._seg.p0.equals(u[n])||(l=o.getDepth(Dn.RIGHT));var h=new dr(this._seg,l);a.add(h)}}}else if(N(arguments[2],w)&&arguments[0]instanceof E&&N(arguments[1],w)){var c=arguments[0],f=arguments[1],g=arguments[2];for(n=f.iterator();n.hasNext();){var d=n.next();d.isForward()&&this.findStabbedSegments(c,d,g)}}},getDepth:function(t){var e=this.findStabbedSegments(t);return 0===e.size()?0:Te.min(e)._leftDepth},interfaces_:function(){return[]},getClass:function(){return gr}}),e(dr.prototype,{compareTo:function(t){var e=t;if(this._upwardSeg.minX()>=e._upwardSeg.maxX())return 1;if(this._upwardSeg.maxX()<=e._upwardSeg.minX())return-1;var n=this._upwardSeg.orientationIndex(e._upwardSeg);return 0!==n?n:0!==(n=-1*e._upwardSeg.orientationIndex(this._upwardSeg))?n:this._upwardSeg.compareTo(e._upwardSeg)},compareX:function(t,e){var n=t.p0.compareTo(e.p0);return 0!==n?n:t.p1.compareTo(e.p1)},toString:function(){return this._upwardSeg.toString()},interfaces_:function(){return[g]},getClass:function(){return dr}}),gr.DepthSegment=dr,e(_r.prototype,{addPoint:function(t){if(this._distance<=0)return null;var e=t.getCoordinates(),n=this._curveBuilder.getLineCurve(e,this._distance);this.addCurve(n,de.EXTERIOR,de.INTERIOR)},addPolygon:function(t){var e=this._distance,n=Dn.LEFT;this._distance<0&&(e=-this._distance,n=Dn.RIGHT);var i=t.getExteriorRing(),r=nt.removeRepeatedPoints(i.getCoordinates());if(this._distance<0&&this.isErodedCompletely(i,this._distance))return null;if(this._distance<=0&&r.length<3)return null;this.addPolygonRing(r,e,n,de.EXTERIOR,de.INTERIOR);for(var s=0;s<t.getNumInteriorRing();s++){var o=t.getInteriorRingN(s),a=nt.removeRepeatedPoints(o.getCoordinates());this._distance>0&&this.isErodedCompletely(o,-this._distance)||this.addPolygonRing(a,e,Dn.opposite(n),de.INTERIOR,de.EXTERIOR)}},isTriangleErodedCompletely:function(t,e){var n=new me(t[0],t[1],t[2]),i=n.inCentre();return X.pointToSegment(i,n.p0,n.p1)<Math.abs(e)},addLineString:function(t){if(this._distance<=0&&!this._curveBuilder.getBufferParameters().isSingleSided())return null;var e=nt.removeRepeatedPoints(t.getCoordinates()),n=this._curveBuilder.getLineCurve(e,this._distance);this.addCurve(n,de.EXTERIOR,de.INTERIOR)},addCurve:function(t,e,n){if(null===t||t.length<2)return null;var i=new Xi(t,new zn(0,de.BOUNDARY,e,n));this._curveList.add(i)},getCurves:function(){return this.add(this._inputGeom),this._curveList},addPolygonRing:function(t,e,n,i,r){if(0===e&&t.length<Yt.MINIMUM_VALID_SIZE)return null;var s=i,o=r;t.length>=Yt.MINIMUM_VALID_SIZE&&z.isCCW(t)&&(s=r,o=i,n=Dn.opposite(n));var a=this._curveBuilder.getRingCurve(t,n,e);this.addCurve(a,s,o)},add:function(t){if(t.isEmpty())return null;if(t instanceof Vt)this.addPolygon(t);else if(t instanceof At)this.addLineString(t);else if(t instanceof Gt)this.addPoint(t);else if(t instanceof zt)this.addCollection(t);else if(t instanceof wt)this.addCollection(t);else if(t instanceof kt)this.addCollection(t);else{if(!(t instanceof Lt))throw new UnsupportedOperationException(t.getClass().getName());this.addCollection(t)}},isErodedCompletely:function(t,e){var n=t.getCoordinates();if(n.length<4)return e<0;if(4===n.length)return this.isTriangleErodedCompletely(n,e);var i=t.getEnvelopeInternal(),r=Math.min(i.getHeight(),i.getWidth());return e<0&&2*Math.abs(e)>r},addCollection:function(t){for(var e=0;e<t.getNumGeometries();e++){var n=t.getGeometryN(e);this.add(n)}},interfaces_:function(){return[]},getClass:function(){return _r}}),e(pr.prototype,{getNextCW:function(t){this.getEdges();var e=this._edgeList.indexOf(t),n=e-1;return 0===e&&(n=this._edgeList.size()-1),this._edgeList.get(n)},propagateSideLabels:function(t){for(var e=de.NONE,n=this.iterator();n.hasNext();){(s=(r=n.next()).getLabel()).isArea(t)&&s.getLocation(t,Dn.LEFT)!==de.NONE&&(e=s.getLocation(t,Dn.LEFT))}if(e===de.NONE)return null;var i=e;for(n=this.iterator();n.hasNext();){var r,s;if((s=(r=n.next()).getLabel()).getLocation(t,Dn.ON)===de.NONE&&s.setLocation(t,Dn.ON,i),s.isArea(t)){var o=s.getLocation(t,Dn.LEFT),a=s.getLocation(t,Dn.RIGHT);if(a!==de.NONE){if(a!==i)throw new Jn("side location conflict",r.getCoordinate());o===de.NONE&&x.shouldNeverReachHere("found single null side (at "+r.getCoordinate()+")"),i=o}else x.isTrue(s.getLocation(t,Dn.LEFT)===de.NONE,"found single null side"),s.setLocation(t,Dn.RIGHT,i),s.setLocation(t,Dn.LEFT,i)}}},getCoordinate:function(){var t=this.iterator();return t.hasNext()?t.next().getCoordinate():null},print:function(t){Y.out.println("EdgeEndStar:   "+this.getCoordinate());for(var e=this.iterator();e.hasNext();){e.next().print(t)}},isAreaLabelsConsistent:function(t){return this.computeEdgeEndLabels(t.getBoundaryNodeRule()),this.checkAreaLabelsConsistent(0)},checkAreaLabelsConsistent:function(t){var e=this.getEdges();if(e.size()<=0)return!0;var n=e.size()-1,i=e.get(n).getLabel().getLocation(t,Dn.LEFT);x.isTrue(i!==de.NONE,"Found unlabelled area edge");for(var r=i,s=this.iterator();s.hasNext();){var o=s.next().getLabel();x.isTrue(o.isArea(t),"Found non-area edge");var a=o.getLocation(t,Dn.LEFT),u=o.getLocation(t,Dn.RIGHT);if(a===u)return!1;if(u!==r)return!1;r=a}return!0},findIndex:function(t){this.iterator();for(var e=0;e<this._edgeList.size();e++){if(this._edgeList.get(e)===t)return e}return-1},iterator:function(){return this.getEdges().iterator()},getEdges:function(){return null===this._edgeList&&(this._edgeList=new P(this._edgeMap.values())),this._edgeList},getLocation:function(t,e,n){return this._ptInAreaLocation[t]===de.NONE&&(this._ptInAreaLocation[t]=Ve.locate(e,n[t].getGeometry())),this._ptInAreaLocation[t]},toString:function(){var t=new F;t.append("EdgeEndStar:   "+this.getCoordinate()),t.append("\n");for(var e=this.iterator();e.hasNext();){var n=e.next();t.append(n),t.append("\n")}return t.toString()},computeEdgeEndLabels:function(t){for(var e=this.iterator();e.hasNext();){e.next().computeLabel(t)}},computeLabelling:function(t){this.computeEdgeEndLabels(t[0].getBoundaryNodeRule()),this.propagateSideLabels(0),this.propagateSideLabels(1);for(var e=[!1,!1],n=this.iterator();n.hasNext();)for(var i=(s=n.next()).getLabel(),r=0;r<2;r++)i.isLine(r)&&i.getLocation(r)===de.BOUNDARY&&(e[r]=!0);for(n=this.iterator();n.hasNext();){var s;for(i=(s=n.next()).getLabel(),r=0;r<2;r++)if(i.isAnyNull(r)){var o=de.NONE;if(e[r])o=de.EXTERIOR;else{var a=s.getCoordinate();o=this.getLocation(r,a,t)}i.setAllLocationsIfNull(r,o)}}},getDegree:function(){return this._edgeMap.size()},insertEdgeEnd:function(t,e){this._edgeMap.put(t,e),this._edgeList=null},interfaces_:function(){return[]},getClass:function(){return pr}}),v(mr,pr),e(mr.prototype,{linkResultDirectedEdges:function(){this.getResultAreaEdges();for(var t=null,e=null,n=this._SCANNING_FOR_INCOMING,i=0;i<this._resultAreaEdgeList.size();i++){var r=this._resultAreaEdgeList.get(i),s=r.getSym();if(r.getLabel().isArea())switch(null===t&&r.isInResult()&&(t=r),n){case this._SCANNING_FOR_INCOMING:if(!s.isInResult())continue;e=s,n=this._LINKING_TO_OUTGOING;break;case this._LINKING_TO_OUTGOING:if(!r.isInResult())continue;e.setNext(r),n=this._SCANNING_FOR_INCOMING}}if(n===this._LINKING_TO_OUTGOING){if(null===t)throw new Jn("no outgoing dirEdge found",this.getCoordinate());x.isTrue(t.isInResult(),"unable to link last incoming dirEdge"),e.setNext(t)}},insert:function(t){var e=t;this.insertEdgeEnd(e,e)},getRightmostEdge:function(){var t=this.getEdges(),e=t.size();if(e<1)return null;var n=t.get(0);if(1===e)return n;var i=t.get(e-1),r=n.getQuadrant(),s=i.getQuadrant();return gn.isNorthern(r)&&gn.isNorthern(s)?n:gn.isNorthern(r)||gn.isNorthern(s)?0!==n.getDy()?n:0!==i.getDy()?i:(x.shouldNeverReachHere("found two horizontal edges incident on node"),null):i},print:function(t){Y.out.println("DirectedEdgeStar: "+this.getCoordinate());for(var e=this.iterator();e.hasNext();){var n=e.next();t.print("out "),n.print(t),t.println(),t.print("in "),n.getSym().print(t),t.println()}},getResultAreaEdges:function(){if(null!==this._resultAreaEdgeList)return this._resultAreaEdgeList;this._resultAreaEdgeList=new P;for(var t=this.iterator();t.hasNext();){var e=t.next();(e.isInResult()||e.getSym().isInResult())&&this._resultAreaEdgeList.add(e)}return this._resultAreaEdgeList},updateLabelling:function(t){for(var e=this.iterator();e.hasNext();){var n=e.next().getLabel();n.setAllLocationsIfNull(0,t.getLocation(0)),n.setAllLocationsIfNull(1,t.getLocation(1))}},linkAllDirectedEdges:function(){this.getEdges();for(var t=null,e=null,n=this._edgeList.size()-1;n>=0;n--){var i=this._edgeList.get(n),r=i.getSym();null===e&&(e=r),null!==t&&r.setNext(t),t=i}e.setNext(t)},computeDepths:function(){if(1===arguments.length){var t=arguments[0],e=this.findIndex(t),n=(t.getLabel(),t.getDepth(Dn.LEFT)),i=t.getDepth(Dn.RIGHT),r=this.computeDepths(e+1,this._edgeList.size(),n);if(this.computeDepths(0,e,r)!==i)throw new Jn("depth mismatch at "+t.getCoordinate())}else if(3===arguments.length){for(var s=arguments[0],o=arguments[1],a=arguments[2],u=s;u<o;u++){var l=this._edgeList.get(u);l.getLabel();l.setEdgeDepths(Dn.RIGHT,a),a=l.getDepth(Dn.LEFT)}return a}},mergeSymLabels:function(){for(var t=this.iterator();t.hasNext();){var e=t.next();e.getLabel().merge(e.getSym().getLabel())}},linkMinimalDirectedEdges:function(t){for(var e=null,n=null,i=this._SCANNING_FOR_INCOMING,r=this._resultAreaEdgeList.size()-1;r>=0;r--){var s=this._resultAreaEdgeList.get(r),o=s.getSym();switch(null===e&&s.getEdgeRing()===t&&(e=s),i){case this._SCANNING_FOR_INCOMING:if(o.getEdgeRing()!==t)continue;n=o,i=this._LINKING_TO_OUTGOING;break;case this._LINKING_TO_OUTGOING:if(s.getEdgeRing()!==t)continue;n.setNextMin(s),i=this._SCANNING_FOR_INCOMING}}i===this._LINKING_TO_OUTGOING&&(x.isTrue(null!==e,"found null for first outgoing dirEdge"),x.isTrue(e.getEdgeRing()===t,"unable to link last incoming dirEdge"),n.setNextMin(e))},getOutgoingDegree:function(){if(0===arguments.length){for(var t=0,e=this.iterator();e.hasNext();){e.next().isInResult()&&t++}return t}if(1===arguments.length){var n=arguments[0];for(t=0,e=this.iterator();e.hasNext();){e.next().getEdgeRing()===n&&t++}return t}},getLabel:function(){return this._label},findCoveredLineEdges:function(){for(var t=de.NONE,e=this.iterator();e.hasNext();){var n=(r=e.next()).getSym();if(!r.isLineEdge()){if(r.isInResult()){t=de.INTERIOR;break}if(n.isInResult()){t=de.EXTERIOR;break}}}if(t===de.NONE)return null;var i=t;for(e=this.iterator();e.hasNext();){var r;n=(r=e.next()).getSym();r.isLineEdge()?r.getEdge().setCovered(i===de.INTERIOR):(r.isInResult()&&(i=de.EXTERIOR),n.isInResult()&&(i=de.INTERIOR))}},computeLabelling:function(t){pr.prototype.computeLabelling.call(this,t),this._label=new zn(de.NONE);for(var e=this.iterator();e.hasNext();)for(var n=e.next().getEdge().getLabel(),i=0;i<2;i++){var r=n.getLocation(i);r!==de.INTERIOR&&r!==de.BOUNDARY||this._label.setLocation(i,de.INTERIOR)}},interfaces_:function(){return[]},getClass:function(){return mr}}),v(vr,ti),e(vr.prototype,{createNode:function(t){return new Kn(t,new mr)},interfaces_:function(){return[]},getClass:function(){return vr}}),e(yr.prototype,{compareTo:function(t){var e=t;return yr.compareOriented(this._pts,this._orientation,e._pts,e._orientation)},interfaces_:function(){return[g]},getClass:function(){return yr}}),yr.orientation=function(t){return 1===nt.increasingDirection(t)},yr.compareOriented=function(t,e,n,i){for(var r=e?1:-1,s=i?1:-1,o=e?t.length:-1,a=i?n.length:-1,u=e?0:t.length-1,l=i?0:n.length-1;;){var h=t[u].compareTo(n[l]);if(0!==h)return h;var c=(u+=r)===o,f=(l+=s)===a;if(c&&!f)return-1;if(!c&&f)return 1;if(c&&f)return 0}},e(xr.prototype,{print:function(t){t.print("MULTILINESTRING ( ");for(var e=0;e<this._edges.size();e++){var n=this._edges.get(e);e>0&&t.print(","),t.print("(");for(var i=n.getCoordinates(),r=0;r<i.length;r++)r>0&&t.print(","),t.print(i[r].x+" "+i[r].y);t.println(")")}t.print(")  ")},addAll:function(t){for(var e=t.iterator();e.hasNext();)this.add(e.next())},findEdgeIndex:function(t){for(var e=0;e<this._edges.size();e++)if(this._edges.get(e).equals(t))return e;return-1},iterator:function(){return this._edges.iterator()},getEdges:function(){return this._edges},get:function(t){return this._edges.get(t)},findEqualEdge:function(t){var e=new yr(t.getCoordinates());return this._ocaMap.get(e)},add:function(t){this._edges.add(t);var e=new yr(t.getCoordinates());this._ocaMap.put(e,t)},interfaces_:function(){return[]},getClass:function(){return xr}}),e(Er.prototype,{processIntersections:function(t,e,n,i){},isDone:function(){},interfaces_:function(){return[]},getClass:function(){return Er}}),e(Ir.prototype,{isTrivialIntersection:function(t,e,n,i){if(t===n&&1===this._li.getIntersectionNum()){if(Ir.isAdjacentSegments(e,i))return!0;if(t.isClosed()){var r=t.size()-1;if(0===e&&i===r||0===i&&e===r)return!0}}return!1},getProperIntersectionPoint:function(){return this._properIntersectionPoint},hasProperInteriorIntersection:function(){return this._hasProperInterior},getLineIntersector:function(){return this._li},hasProperIntersection:function(){return this._hasProper},processIntersections:function(t,e,n,i){if(t===n&&e===i)return null;this.numTests++;var r=t.getCoordinates()[e],s=t.getCoordinates()[e+1],o=n.getCoordinates()[i],a=n.getCoordinates()[i+1];this._li.computeIntersection(r,s,o,a),this._li.hasIntersection()&&(this.numIntersections++,this._li.isInteriorIntersection()&&(this.numInteriorIntersections++,this._hasInterior=!0),this.isTrivialIntersection(t,e,n,i)||(this._hasIntersection=!0,t.addIntersections(this._li,e,0),n.addIntersections(this._li,i,1),this._li.isProper()&&(this.numProperIntersections++,this._hasProper=!0,this._hasProperInterior=!0)))},hasIntersection:function(){return this._hasIntersection},isDone:function(){return!1},hasInteriorIntersection:function(){return this._hasInterior},interfaces_:function(){return[Er]},getClass:function(){return Ir}}),Ir.isAdjacentSegments=function(t,e){return 1===Math.abs(t-e)},e(Nr.prototype,{setWorkingPrecisionModel:function(t){this._workingPrecisionModel=t},insertUniqueEdge:function(t){var e=this._edgeList.findEqualEdge(t);if(null!==e){var n=e.getLabel(),i=t.getLabel();e.isPointwiseEqual(t)||(i=new zn(t.getLabel())).flip(),n.merge(i);var r=Nr.depthDelta(i),s=e.getDepthDelta()+r;e.setDepthDelta(s)}else this._edgeList.add(t),t.setDepthDelta(Nr.depthDelta(t.getLabel()))},buildSubgraphs:function(t,e){for(var n=new P,i=t.iterator();i.hasNext();){var r=i.next(),s=r.getRightmostCoordinate(),o=new gr(n).getDepth(s);r.computeDepth(o),r.findResultEdges(),n.add(r),e.add(r.getDirectedEdges(),r.getNodes())}},createSubgraphs:function(t){for(var e=new P,n=t.getNodes().iterator();n.hasNext();){var i=n.next();if(!i.isVisited()){var r=new rr;r.create(i),e.add(r)}}return Te.sort(e,Te.reverseOrder()),e},createEmptyResultGeometry:function(){return this._geomFact.createPolygon()},getNoder:function(t){if(null!==this._workingNoder)return this._workingNoder;var e=new Ki,n=new fe;return n.setPrecisionModel(t),e.setSegmentIntersector(new Ir(n)),e},buffer:function(t,e){var n=this._workingPrecisionModel;null===n&&(n=t.getPrecisionModel()),this._geomFact=t.getFactory();var i=new _r(t,e,new fr(n,this._bufParams)).getCurves();if(i.size()<=0)return this.createEmptyResultGeometry();this.computeNodedEdges(i,n),this._graph=new ei(new vr),this._graph.addEdges(this._edgeList.getEdges());var r=this.createSubgraphs(this._graph),s=new ur(this._geomFact);this.buildSubgraphs(r,s);var o=s.getPolygons();return o.size()<=0?this.createEmptyResultGeometry():this._geomFact.buildGeometry(o)},computeNodedEdges:function(t,e){var n=this.getNoder(e);n.computeNodes(t);for(var i=n.getNodedSubstrings().iterator();i.hasNext();){var r=i.next(),s=r.getCoordinates();if(2!==s.length||!s[0].equals2D(s[1])){var o=r.getData(),a=new jn(r.getCoordinates(),new zn(o));this.insertUniqueEdge(a)}}},setNoder:function(t){this._workingNoder=t},interfaces_:function(){return[]},getClass:function(){return Nr}}),Nr.depthDelta=function(t){var e=t.getLocation(0,Dn.LEFT),n=t.getLocation(0,Dn.RIGHT);return e===de.INTERIOR&&n===de.EXTERIOR?1:e===de.EXTERIOR&&n===de.INTERIOR?-1:0},Nr.convertSegStrings=function(t){for(var e=new se,n=new P;t.hasNext();){var i=t.next(),r=e.createLineString(i.getCoordinates());n.add(r)}return e.buildGeometry(n)},e(Cr.prototype,{checkEndPtVertexIntersections:function(){if(0===arguments.length)for(var t=this._segStrings.iterator();t.hasNext();){var e=t.next().getCoordinates();this.checkEndPtVertexIntersections(e[0],this._segStrings),this.checkEndPtVertexIntersections(e[e.length-1],this._segStrings)}else if(2===arguments.length){var n=arguments[0];for(t=arguments[1].iterator();t.hasNext();){e=t.next().getCoordinates();for(var i=1;i<e.length-1;i++)if(e[i].equals(n))throw new m("found endpt/interior pt intersection at index "+i+" :pt "+n)}}},checkInteriorIntersections:function(){if(0===arguments.length)for(var t=this._segStrings.iterator();t.hasNext();)for(var e=t.next(),n=this._segStrings.iterator();n.hasNext();){var i=n.next();this.checkInteriorIntersections(e,i)}else if(2===arguments.length)for(var r=arguments[0],s=arguments[1],o=r.getCoordinates(),a=s.getCoordinates(),u=0;u<o.length-1;u++)for(var l=0;l<a.length-1;l++)this.checkInteriorIntersections(r,u,s,l);else if(4===arguments.length){var h=arguments[0],c=arguments[1],f=arguments[2],g=arguments[3];if(h===f&&c===g)return null;var d=h.getCoordinates()[c],_=h.getCoordinates()[c+1],p=f.getCoordinates()[g],v=f.getCoordinates()[g+1];if(this._li.computeIntersection(d,_,p,v),this._li.hasIntersection()&&(this._li.isProper()||this.hasInteriorIntersection(this._li,d,_)||this.hasInteriorIntersection(this._li,p,v)))throw new m("found non-noded intersection at "+d+"-"+_+" and "+p+"-"+v)}},checkValid:function(){this.checkEndPtVertexIntersections(),this.checkInteriorIntersections(),this.checkCollapses()},checkCollapses:function(){if(0===arguments.length)for(var t=this._segStrings.iterator();t.hasNext();){var e=t.next();this.checkCollapses(e)}else if(1===arguments.length){var n=arguments[0].getCoordinates();for(t=0;t<n.length-2;t++)this.checkCollapse(n[t],n[t+1],n[t+2])}},hasInteriorIntersection:function(t,e,n){for(var i=0;i<t.getIntersectionNum();i++){var r=t.getIntersection(i);if(!r.equals(e)&&!r.equals(n))return!0}return!1},checkCollapse:function(t,e,n){if(t.equals(n))throw new m("found non-noded collapse at "+Cr.fact.createLineString([t,e,n]))},interfaces_:function(){return[]},getClass:function(){return Cr}}),Cr.fact=new se,e(Sr.prototype,{intersectsScaled:function(t,e){var n=Math.min(t.x,e.x),i=Math.max(t.x,e.x),r=Math.min(t.y,e.y),s=Math.max(t.y,e.y),o=this._maxx<n||this._minx>i||this._maxy<r||this._miny>s;if(o)return!1;var a=this.intersectsToleranceSquare(t,e);return x.isTrue(!(o&&a),"Found bad envelope test"),a},initCorners:function(t){this._minx=t.x-.5,this._maxx=t.x+.5,this._miny=t.y-.5,this._maxy=t.y+.5,this._corner[0]=new E(this._maxx,this._maxy),this._corner[1]=new E(this._minx,this._maxy),this._corner[2]=new E(this._minx,this._miny),this._corner[3]=new E(this._maxx,this._miny)},intersects:function(t,e){return 1===this._scaleFactor?this.intersectsScaled(t,e):(this.copyScaled(t,this._p0Scaled),this.copyScaled(e,this._p1Scaled),this.intersectsScaled(this._p0Scaled,this._p1Scaled))},scale:function(t){return Math.round(t*this._scaleFactor)},getCoordinate:function(){return this._originalPt},copyScaled:function(t,e){e.x=this.scale(t.x),e.y=this.scale(t.y)},getSafeEnvelope:function(){if(null===this._safeEnv){var t=Sr.SAFE_ENV_EXPANSION_FACTOR/this._scaleFactor;this._safeEnv=new M(this._originalPt.x-t,this._originalPt.x+t,this._originalPt.y-t,this._originalPt.y+t)}return this._safeEnv},intersectsPixelClosure:function(t,e){return this._li.computeIntersection(t,e,this._corner[0],this._corner[1]),!!this._li.hasIntersection()||(this._li.computeIntersection(t,e,this._corner[1],this._corner[2]),!!this._li.hasIntersection()||(this._li.computeIntersection(t,e,this._corner[2],this._corner[3]),!!this._li.hasIntersection()||(this._li.computeIntersection(t,e,this._corner[3],this._corner[0]),!!this._li.hasIntersection())))},intersectsToleranceSquare:function(t,e){var n=!1,i=!1;return this._li.computeIntersection(t,e,this._corner[0],this._corner[1]),!!this._li.isProper()||(this._li.computeIntersection(t,e,this._corner[1],this._corner[2]),!!this._li.isProper()||(this._li.hasIntersection()&&(n=!0),this._li.computeIntersection(t,e,this._corner[2],this._corner[3]),!!this._li.isProper()||(this._li.hasIntersection()&&(i=!0),this._li.computeIntersection(t,e,this._corner[3],this._corner[0]),!!this._li.isProper()||(!(!n||!i)||(!!t.equals(this._pt)||!!e.equals(this._pt))))))},addSnappedNode:function(t,e){var n=t.getCoordinate(e),i=t.getCoordinate(e+1);return!!this.intersects(n,i)&&(t.addIntersection(this.getCoordinate(),e),!0)},interfaces_:function(){return[]},getClass:function(){return Sr}}),Sr.SAFE_ENV_EXPANSION_FACTOR=.75,e(Lr.prototype,{snap:function(){if(1===arguments.length){var t=arguments[0];return this.snap(t,null,-1)}if(3===arguments.length){var e=arguments[0],n=arguments[1],i=arguments[2],r=e.getSafeEnvelope(),s=new wr(e,n,i);return this._index.query(r,{interfaces_:function(){return[Ce]},visitItem:function(t){t.select(r,s)}}),s.isNodeAdded()}},interfaces_:function(){return[]},getClass:function(){return Lr}}),v(wr,nn),e(wr.prototype,{isNodeAdded:function(){return this._isNodeAdded},select:function(){if(!(2===arguments.length&&Number.isInteger(arguments[1])&&arguments[0]instanceof fn))return nn.prototype.select.apply(this,arguments);var t=arguments[0],e=arguments[1],n=t.getContext();if(null!==this._parentEdge&&n===this._parentEdge&&e===this._hotPixelVertexIndex)return null;this._isNodeAdded=this._hotPixel.addSnappedNode(n,e)},interfaces_:function(){return[]},getClass:function(){return wr}}),Lr.HotPixelSnapAction=wr,e(Rr.prototype,{processIntersections:function(t,e,n,i){if(t===n&&e===i)return null;var r=t.getCoordinates()[e],s=t.getCoordinates()[e+1],o=n.getCoordinates()[i],a=n.getCoordinates()[i+1];if(this._li.computeIntersection(r,s,o,a),this._li.hasIntersection()&&this._li.isInteriorIntersection()){for(var u=0;u<this._li.getIntersectionNum();u++)this._interiorIntersections.add(this._li.getIntersection(u));t.addIntersections(this._li,e,0),n.addIntersections(this._li,i,1)}},isDone:function(){return!1},getInteriorIntersections:function(){return this._interiorIntersections},interfaces_:function(){return[Er]},getClass:function(){return Rr}}),e(Tr.prototype,{checkCorrectness:function(t){var e=new Cr(Xi.getNodedSubstrings(t));try{e.checkValid()}catch(t){if(!(t instanceof D))throw t;t.printStackTrace()}},getNodedSubstrings:function(){return Xi.getNodedSubstrings(this._nodedSegStrings)},snapRound:function(t,e){var n=this.findInteriorIntersections(t,e);this.computeIntersectionSnaps(n),this.computeVertexSnaps(t)},findInteriorIntersections:function(t,e){var n=new Rr(e);return this._noder.setSegmentIntersector(n),this._noder.computeNodes(t),n.getInteriorIntersections()},computeVertexSnaps:function(){if(N(arguments[0],S))for(var t=arguments[0].iterator();t.hasNext();){var e=t.next();this.computeVertexSnaps(e)}else if(arguments[0]instanceof Xi)for(var n=arguments[0],i=n.getCoordinates(),r=0;r<i.length;r++){var s=new Sr(i[r],this._scaleFactor,this._li);this._pointSnapper.snap(s,n,r)&&n.addIntersection(i[r],r)}},computeNodes:function(t){this._nodedSegStrings=t,this._noder=new Ki,this._pointSnapper=new Lr(this._noder.getIndex()),this.snapRound(t,this._li)},computeIntersectionSnaps:function(t){for(var e=t.iterator();e.hasNext();){var n=new Sr(e.next(),this._scaleFactor,this._li);this._pointSnapper.snap(n)}},interfaces_:function(){return[Wi]},getClass:function(){return Tr}}),e(Pr.prototype,{bufferFixedPrecision:function(t){var e=new Qi(new Tr(new ie(1)),t.getScale()),n=new Nr(this._bufParams);n.setWorkingPrecisionModel(t),n.setNoder(e),this._resultGeometry=n.buffer(this._argGeom,this._distance)},bufferReducedPrecision:function(){if(0===arguments.length){for(var t=Pr.MAX_PRECISION_DIGITS;t>=0;t--){try{this.bufferReducedPrecision(t)}catch(t){if(!(t instanceof Jn))throw t;this._saveException=t}if(null!==this._resultGeometry)return null}throw this._saveException}if(1===arguments.length){var e=arguments[0],n=new ie(Pr.precisionScaleFactor(this._argGeom,this._distance,e));this.bufferFixedPrecision(n)}},computeGeometry:function(){if(this.bufferOriginalPrecision(),null!==this._resultGeometry)return null;var t=this._argGeom.getFactory().getPrecisionModel();t.getType()===ie.FIXED?this.bufferFixedPrecision(t):this.bufferReducedPrecision()},setQuadrantSegments:function(t){this._bufParams.setQuadrantSegments(t)},bufferOriginalPrecision:function(){try{var t=new Nr(this._bufParams);this._resultGeometry=t.buffer(this._argGeom,this._distance)}catch(t){if(!(t instanceof m))throw t;this._saveException=t}},getResultGeometry:function(t){return this._distance=t,this.computeGeometry(),this._resultGeometry},setEndCapStyle:function(t){this._bufParams.setEndCapStyle(t)},interfaces_:function(){return[]},getClass:function(){return Pr}}),Pr.bufferOp=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1];return new Pr(t).getResultGeometry(e)}if(3===arguments.length){if(Number.isInteger(arguments[2])&&arguments[0]instanceof K&&"number"==typeof arguments[1]){var n=arguments[0],i=arguments[1],r=arguments[2];return(a=new Pr(n)).setQuadrantSegments(r),a.getResultGeometry(i)}if(arguments[2]instanceof er&&arguments[0]instanceof K&&"number"==typeof arguments[1]){var s=arguments[0],o=arguments[1];return(a=new Pr(s,arguments[2])).getResultGeometry(o)}}else if(4===arguments.length){var a,u=arguments[0],l=arguments[1],h=arguments[2],c=arguments[3];return(a=new Pr(u)).setQuadrantSegments(h),a.setEndCapStyle(c),a.getResultGeometry(l)}},Pr.precisionScaleFactor=function(t,e,n){var i=t.getEnvelopeInternal(),r=U.max(Math.abs(i.getMaxX()),Math.abs(i.getMaxY()),Math.abs(i.getMinX()),Math.abs(i.getMinY()))+2*(e>0?e:0),s=n-Math.trunc(Math.log(r)/Math.log(10)+1);return Math.pow(10,s)},Pr.CAP_ROUND=er.CAP_ROUND,Pr.CAP_BUTT=er.CAP_FLAT,Pr.CAP_FLAT=er.CAP_FLAT,Pr.CAP_SQUARE=er.CAP_SQUARE,Pr.MAX_PRECISION_DIGITS=12;var Or=Object.freeze({BufferOp:Pr,BufferParameters:er});function br(){this._comps=null;var t=arguments[0];this._comps=t}function Mr(){if(this._component=null,this._segIndex=null,this._pt=null,2===arguments.length){var t=arguments[0],e=arguments[1];Mr.call(this,t,Mr.INSIDE_AREA,e)}else if(3===arguments.length){var n=arguments[0],i=arguments[1],r=arguments[2];this._component=n,this._segIndex=i,this._pt=r}}function Dr(){this._pts=null;var t=arguments[0];this._pts=t}function Ar(){this._locations=null;var t=arguments[0];this._locations=t}function Fr(){if(this._geom=null,this._terminateDistance=0,this._ptLocator=new Mn,this._minDistanceLocation=null,this._minDistance=s.MAX_VALUE,2===arguments.length){var t=arguments[0],e=arguments[1];Fr.call(this,t,e,0)}else if(3===arguments.length){var n=arguments[0],i=arguments[1],r=arguments[2];this._geom=new Array(2).fill(null),this._geom[0]=n,this._geom[1]=i,this._terminateDistance=r}}e(br.prototype,{filter:function(t){t instanceof Vt&&this._comps.add(t)},interfaces_:function(){return[Ct]},getClass:function(){return br}}),br.getPolygons=function(){if(1===arguments.length){var t=arguments[0];return br.getPolygons(t,new P)}if(2===arguments.length){var e=arguments[0],n=arguments[1];return e instanceof Vt?n.add(e):e instanceof Lt&&e.apply(new br(n)),n}},e(Mr.prototype,{isInsideArea:function(){return this._segIndex===Mr.INSIDE_AREA},getCoordinate:function(){return this._pt},getGeometryComponent:function(){return this._component},getSegmentIndex:function(){return this._segIndex},interfaces_:function(){return[]},getClass:function(){return Mr}}),Mr.INSIDE_AREA=-1,e(Dr.prototype,{filter:function(t){t instanceof Gt&&this._pts.add(t)},interfaces_:function(){return[Ct]},getClass:function(){return Dr}}),Dr.getPoints=function(){if(1===arguments.length){var t=arguments[0];return t instanceof Gt?Te.singletonList(t):Dr.getPoints(t,new P)}if(2===arguments.length){var e=arguments[0],n=arguments[1];return e instanceof Gt?n.add(e):e instanceof Lt&&e.apply(new Dr(n)),n}},e(Ar.prototype,{filter:function(t){(t instanceof Gt||t instanceof At||t instanceof Vt)&&this._locations.add(new Mr(t,0,t.getCoordinate()))},interfaces_:function(){return[Ct]},getClass:function(){return Ar}}),Ar.getLocations=function(t){var e=new P;return t.apply(new Ar(e)),e},e(Fr.prototype,{computeContainmentDistance:function(){if(0===arguments.length){var t=new Array(2).fill(null);if(this.computeContainmentDistance(0,t),this._minDistance<=this._terminateDistance)return null;this.computeContainmentDistance(1,t)}else if(2===arguments.length){var e=arguments[0],n=arguments[1],i=this._geom[e];if(i.getDimension()<2)return null;var r=1-e,s=br.getPolygons(i);if(s.size()>0){var o=Ar.getLocations(this._geom[r]);if(this.computeContainmentDistance(o,s,n),this._minDistance<=this._terminateDistance)return this._minDistanceLocation[r]=n[0],this._minDistanceLocation[e]=n[1],null}}else if(3===arguments.length)if(arguments[2]instanceof Array&&N(arguments[0],w)&&N(arguments[1],w)){for(var a=arguments[0],u=arguments[1],l=arguments[2],h=0;h<a.size();h++)for(var c=a.get(h),f=0;f<u.size();f++)if(this.computeContainmentDistance(c,u.get(f),l),this._minDistance<=this._terminateDistance)return null}else if(arguments[2]instanceof Array&&arguments[0]instanceof Mr&&arguments[1]instanceof Vt){var g=arguments[0],d=arguments[1],_=arguments[2],p=g.getCoordinate();if(de.EXTERIOR!==this._ptLocator.locate(p,d))return this._minDistance=0,_[0]=g,_[1]=new Mr(d,p),null}},computeMinDistanceLinesPoints:function(t,e,n){for(var i=0;i<t.size();i++)for(var r=t.get(i),s=0;s<e.size();s++){var o=e.get(s);if(this.computeMinDistance(r,o,n),this._minDistance<=this._terminateDistance)return null}},computeFacetDistance:function(){var t=new Array(2).fill(null),e=be.getLines(this._geom[0]),n=be.getLines(this._geom[1]),i=Dr.getPoints(this._geom[0]),r=Dr.getPoints(this._geom[1]);return this.computeMinDistanceLines(e,n,t),this.updateMinDistance(t,!1),this._minDistance<=this._terminateDistance?null:(t[0]=null,t[1]=null,this.computeMinDistanceLinesPoints(e,r,t),this.updateMinDistance(t,!1),this._minDistance<=this._terminateDistance?null:(t[0]=null,t[1]=null,this.computeMinDistanceLinesPoints(n,i,t),this.updateMinDistance(t,!0),this._minDistance<=this._terminateDistance?null:(t[0]=null,t[1]=null,this.computeMinDistancePoints(i,r,t),void this.updateMinDistance(t,!1))))},nearestLocations:function(){return this.computeMinDistance(),this._minDistanceLocation},updateMinDistance:function(t,e){if(null===t[0])return null;e?(this._minDistanceLocation[0]=t[1],this._minDistanceLocation[1]=t[0]):(this._minDistanceLocation[0]=t[0],this._minDistanceLocation[1]=t[1])},nearestPoints:function(){return this.computeMinDistance(),[this._minDistanceLocation[0].getCoordinate(),this._minDistanceLocation[1].getCoordinate()]},computeMinDistance:function(){if(0===arguments.length){if(null!==this._minDistanceLocation)return null;if(this._minDistanceLocation=new Array(2).fill(null),this.computeContainmentDistance(),this._minDistance<=this._terminateDistance)return null;this.computeFacetDistance()}else if(3===arguments.length)if(arguments[2]instanceof Array&&arguments[0]instanceof At&&arguments[1]instanceof Gt){var t=arguments[0],e=arguments[1],n=arguments[2];if(t.getEnvelopeInternal().distance(e.getEnvelopeInternal())>this._minDistance)return null;for(var i=t.getCoordinates(),r=e.getCoordinate(),s=0;s<i.length-1;s++){if((f=X.pointToSegment(r,i[s],i[s+1]))<this._minDistance){this._minDistance=f;var o=new ge(i[s],i[s+1]).closestPoint(r);n[0]=new Mr(t,s,o),n[1]=new Mr(e,0,r)}if(this._minDistance<=this._terminateDistance)return null}}else if(arguments[2]instanceof Array&&arguments[0]instanceof At&&arguments[1]instanceof At){var a=arguments[0],u=arguments[1],l=arguments[2];if(a.getEnvelopeInternal().distance(u.getEnvelopeInternal())>this._minDistance)return null;i=a.getCoordinates();var h=u.getCoordinates();for(s=0;s<i.length-1;s++)for(var c=0;c<h.length-1;c++){var f;if((f=X.segmentToSegment(i[s],i[s+1],h[c],h[c+1]))<this._minDistance){this._minDistance=f;var g=new ge(i[s],i[s+1]),d=new ge(h[c],h[c+1]),_=g.closestPoints(d);l[0]=new Mr(a,s,_[0]),l[1]=new Mr(u,c,_[1])}if(this._minDistance<=this._terminateDistance)return null}}},computeMinDistancePoints:function(t,e,n){for(var i=0;i<t.size();i++)for(var r=t.get(i),s=0;s<e.size();s++){var o=e.get(s),a=r.getCoordinate().distance(o.getCoordinate());if(a<this._minDistance&&(this._minDistance=a,n[0]=new Mr(r,0,r.getCoordinate()),n[1]=new Mr(o,0,o.getCoordinate())),this._minDistance<=this._terminateDistance)return null}},distance:function(){if(null===this._geom[0]||null===this._geom[1])throw new i("null geometries are not supported");return this._geom[0].isEmpty()||this._geom[1].isEmpty()?0:(this.computeMinDistance(),this._minDistance)},computeMinDistanceLines:function(t,e,n){for(var i=0;i<t.size();i++)for(var r=t.get(i),s=0;s<e.size();s++){var o=e.get(s);if(this.computeMinDistance(r,o,n),this._minDistance<=this._terminateDistance)return null}},interfaces_:function(){return[]},getClass:function(){return Fr}}),Fr.distance=function(t,e){return new Fr(t,e).distance()},Fr.isWithinDistance=function(t,e,n){return!(t.getEnvelopeInternal().distance(e.getEnvelopeInternal())>n)&&new Fr(t,e,n).distance()<=n},Fr.nearestPoints=function(t,e){return new Fr(t,e).nearestPoints()};var Gr=Object.freeze({DistanceOp:Fr});function qr(){this._factory=null,this._directedEdges=new P,this._coordinates=null;var t=arguments[0];this._factory=t}function Br(){this._isMarked=!1,this._isVisited=!1,this._data=null}function Vr(){Br.apply(this),this._parentEdge=null,this._from=null,this._to=null,this._p0=null,this._p1=null,this._sym=null,this._edgeDirection=null,this._quadrant=null,this._angle=null;var t=arguments[0],e=arguments[1],n=arguments[2],i=arguments[3];this._from=t,this._to=e,this._edgeDirection=i,this._p0=t.getCoordinate(),this._p1=n;var r=this._p1.x-this._p0.x,s=this._p1.y-this._p0.y;this._quadrant=gn.quadrant(r,s),this._angle=Math.atan2(s,r)}function zr(){var t=arguments[0],e=arguments[1],n=arguments[2],i=arguments[3];Vr.call(this,t,e,n,i)}function Yr(){if(Br.apply(this),this._dirEdge=null,0===arguments.length);else if(2===arguments.length){var t=arguments[0],e=arguments[1];this.setDirectedEdges(t,e)}}function kr(){this._outEdges=new P,this._sorted=!1}function Ur(){if(Br.apply(this),this._pt=null,this._deStar=null,1===arguments.length){var t=arguments[0];Ur.call(this,t,new kr)}else if(2===arguments.length){var e=arguments[0],n=arguments[1];this._pt=e,this._deStar=n}}function Xr(){Yr.apply(this),this._line=null;var t=arguments[0];this._line=t}function Hr(){this._nodeMap=new pt}function Wr(){this._edges=new ut,this._dirEdges=new ut,this._nodeMap=new Hr}function jr(){Wr.apply(this)}function Kr(){this._graph=new jr,this._mergedLineStrings=null,this._factory=null,this._edgeStrings=null}e(qr.prototype,{getCoordinates:function(){if(null===this._coordinates){for(var t=0,e=0,n=new b,i=this._directedEdges.iterator();i.hasNext();){var r=i.next();r.getEdgeDirection()?t++:e++,n.add(r.getEdge().getLine().getCoordinates(),!1,r.getEdgeDirection())}this._coordinates=n.toCoordinateArray(),e>t&&nt.reverse(this._coordinates)}return this._coordinates},toLineString:function(){return this._factory.createLineString(this.getCoordinates())},add:function(t){this._directedEdges.add(t)},interfaces_:function(){return[]},getClass:function(){return qr}}),e(Br.prototype,{setVisited:function(t){this._isVisited=t},isMarked:function(){return this._isMarked},setData:function(t){this._data=t},getData:function(){return this._data},setMarked:function(t){this._isMarked=t},getContext:function(){return this._data},isVisited:function(){return this._isVisited},setContext:function(t){this._data=t},interfaces_:function(){return[]},getClass:function(){return Br}}),Br.getComponentWithVisitedState=function(t,e){for(;t.hasNext();){var n=t.next();if(n.isVisited()===e)return n}return null},Br.setVisited=function(t,e){for(;t.hasNext();){t.next().setVisited(e)}},Br.setMarked=function(t,e){for(;t.hasNext();){t.next().setMarked(e)}},v(Vr,Br),e(Vr.prototype,{isRemoved:function(){return null===this._parentEdge},compareDirection:function(t){return this._quadrant>t._quadrant?1:this._quadrant<t._quadrant?-1:z.index(t._p0,t._p1,this._p1)},getCoordinate:function(){return this._from.getCoordinate()},print:function(t){var e=this.getClass().getName(),n=e.lastIndexOf("."),i=e.substring(n+1);t.print("  "+i+": "+this._p0+" - "+this._p1+" "+this._quadrant+":"+this._angle)},getDirectionPt:function(){return this._p1},getAngle:function(){return this._angle},compareTo:function(t){var e=t;return this.compareDirection(e)},getFromNode:function(){return this._from},getSym:function(){return this._sym},setEdge:function(t){this._parentEdge=t},remove:function(){this._sym=null,this._parentEdge=null},getEdge:function(){return this._parentEdge},getQuadrant:function(){return this._quadrant},setSym:function(t){this._sym=t},getToNode:function(){return this._to},getEdgeDirection:function(){return this._edgeDirection},interfaces_:function(){return[g]},getClass:function(){return Vr}}),Vr.toEdges=function(t){for(var e=new P,n=t.iterator();n.hasNext();)e.add(n.next()._parentEdge);return e},v(zr,Vr),e(zr.prototype,{getNext:function(){return 2!==this.getToNode().getDegree()?null:this.getToNode().getOutEdges().getEdges().get(0)===this.getSym()?this.getToNode().getOutEdges().getEdges().get(1):(x.isTrue(this.getToNode().getOutEdges().getEdges().get(1)===this.getSym()),this.getToNode().getOutEdges().getEdges().get(0))},interfaces_:function(){return[]},getClass:function(){return zr}}),v(Yr,Br),e(Yr.prototype,{isRemoved:function(){return null===this._dirEdge},setDirectedEdges:function(t,e){this._dirEdge=[t,e],t.setEdge(this),e.setEdge(this),t.setSym(e),e.setSym(t),t.getFromNode().addOutEdge(t),e.getFromNode().addOutEdge(e)},getDirEdge:function(){if(Number.isInteger(arguments[0])){var t=arguments[0];return this._dirEdge[t]}if(arguments[0]instanceof Ur){var e=arguments[0];return this._dirEdge[0].getFromNode()===e?this._dirEdge[0]:this._dirEdge[1].getFromNode()===e?this._dirEdge[1]:null}},remove:function(){this._dirEdge=null},getOppositeNode:function(t){return this._dirEdge[0].getFromNode()===t?this._dirEdge[0].getToNode():this._dirEdge[1].getFromNode()===t?this._dirEdge[1].getToNode():null},interfaces_:function(){return[]},getClass:function(){return Yr}}),e(kr.prototype,{getNextEdge:function(t){var e=this.getIndex(t);return this._outEdges.get(this.getIndex(e+1))},getCoordinate:function(){var t=this.iterator();return t.hasNext()?t.next().getCoordinate():null},iterator:function(){return this.sortEdges(),this._outEdges.iterator()},sortEdges:function(){this._sorted||(Te.sort(this._outEdges),this._sorted=!0)},remove:function(t){this._outEdges.remove(t)},getEdges:function(){return this.sortEdges(),this._outEdges},getNextCWEdge:function(t){var e=this.getIndex(t);return this._outEdges.get(this.getIndex(e-1))},getIndex:function(){if(arguments[0]instanceof Yr){var t=arguments[0];this.sortEdges();for(var e=0;e<this._outEdges.size();e++){if(this._outEdges.get(e).getEdge()===t)return e}return-1}if(arguments[0]instanceof Vr){var n=arguments[0];this.sortEdges();for(e=0;e<this._outEdges.size();e++){if(this._outEdges.get(e)===n)return e}return-1}if(Number.isInteger(arguments[0])){var i=arguments[0]%this._outEdges.size();return i<0&&(i+=this._outEdges.size()),i}},add:function(t){this._outEdges.add(t),this._sorted=!1},getDegree:function(){return this._outEdges.size()},interfaces_:function(){return[]},getClass:function(){return kr}}),v(Ur,Br),e(Ur.prototype,{isRemoved:function(){return null===this._pt},addOutEdge:function(t){this._deStar.add(t)},getCoordinate:function(){return this._pt},getOutEdges:function(){return this._deStar},remove:function(){if(0===arguments.length)this._pt=null;else if(1===arguments.length){var t=arguments[0];this._deStar.remove(t)}},getIndex:function(t){return this._deStar.getIndex(t)},getDegree:function(){return this._deStar.getDegree()},interfaces_:function(){return[]},getClass:function(){return Ur}}),Ur.getEdgesBetween=function(t,e){var n=new ut(Vr.toEdges(t.getOutEdges().getEdges())),i=Vr.toEdges(e.getOutEdges().getEdges());return n.retainAll(i),n},v(Xr,Yr),e(Xr.prototype,{getLine:function(){return this._line},interfaces_:function(){return[]},getClass:function(){return Xr}}),e(Hr.prototype,{find:function(t){return this._nodeMap.get(t)},iterator:function(){return this._nodeMap.values().iterator()},remove:function(t){return this._nodeMap.remove(t)},values:function(){return this._nodeMap.values()},add:function(t){return this._nodeMap.put(t.getCoordinate(),t),t},interfaces_:function(){return[]},getClass:function(){return Hr}}),e(Wr.prototype,{findNodesOfDegree:function(t){for(var e=new P,n=this.nodeIterator();n.hasNext();){var i=n.next();i.getDegree()===t&&e.add(i)}return e},dirEdgeIterator:function(){return this._dirEdges.iterator()},edgeIterator:function(){return this._edges.iterator()},remove:function(){if(arguments[0]instanceof Yr){var t=arguments[0];this.remove(t.getDirEdge(0)),this.remove(t.getDirEdge(1)),this._edges.remove(t),t.remove()}else if(arguments[0]instanceof Vr){var e=arguments[0];null!==(r=e.getSym())&&r.setSym(null),e.getFromNode().remove(e),e.remove(),this._dirEdges.remove(e)}else if(arguments[0]instanceof Ur){for(var n=arguments[0],i=n.getOutEdges().getEdges().iterator();i.hasNext();){var r,s=i.next();null!==(r=s.getSym())&&this.remove(r),this._dirEdges.remove(s);var o=s.getEdge();null!==o&&this._edges.remove(o)}this._nodeMap.remove(n.getCoordinate()),n.remove()}},findNode:function(t){return this._nodeMap.find(t)},getEdges:function(){return this._edges},nodeIterator:function(){return this._nodeMap.iterator()},contains:function(){if(arguments[0]instanceof Yr){var t=arguments[0];return this._edges.contains(t)}if(arguments[0]instanceof Vr){var e=arguments[0];return this._dirEdges.contains(e)}},add:function(){if(arguments[0]instanceof Ur){var t=arguments[0];this._nodeMap.add(t)}else if(arguments[0]instanceof Yr){var e=arguments[0];this._edges.add(e),this.add(e.getDirEdge(0)),this.add(e.getDirEdge(1))}else if(arguments[0]instanceof Vr){var n=arguments[0];this._dirEdges.add(n)}},getNodes:function(){return this._nodeMap.values()},interfaces_:function(){return[]},getClass:function(){return Wr}}),v(jr,Wr),e(jr.prototype,{addEdge:function(t){if(t.isEmpty())return null;var e=nt.removeRepeatedPoints(t.getCoordinates());if(e.length<=1)return null;var n=e[0],i=e[e.length-1],r=this.getNode(n),s=this.getNode(i),o=new zr(r,s,e[1],!0),a=new zr(s,r,e[e.length-2],!1),u=new Xr(t);u.setDirectedEdges(o,a),this.add(u)},getNode:function(t){var e=this.findNode(t);return null===e&&(e=new Ur(t),this.add(e)),e},interfaces_:function(){return[]},getClass:function(){return jr}}),e(Kr.prototype,{buildEdgeStringsForUnprocessedNodes:function(){for(var t=this._graph.getNodes().iterator();t.hasNext();){var e=t.next();e.isMarked()||(x.isTrue(2===e.getDegree()),this.buildEdgeStringsStartingAt(e),e.setMarked(!0))}},buildEdgeStringsForNonDegree2Nodes:function(){for(var t=this._graph.getNodes().iterator();t.hasNext();){var e=t.next();2!==e.getDegree()&&(this.buildEdgeStringsStartingAt(e),e.setMarked(!0))}},buildEdgeStringsForObviousStartNodes:function(){this.buildEdgeStringsForNonDegree2Nodes()},getMergedLineStrings:function(){return this.merge(),this._mergedLineStrings},buildEdgeStringsStartingAt:function(t){for(var e=t.getOutEdges().iterator();e.hasNext();){var n=e.next();n.getEdge().isMarked()||this._edgeStrings.add(this.buildEdgeStringStartingWith(n))}},merge:function(){if(null!==this._mergedLineStrings)return null;Br.setMarked(this._graph.nodeIterator(),!1),Br.setMarked(this._graph.edgeIterator(),!1),this._edgeStrings=new P,this.buildEdgeStringsForObviousStartNodes(),this.buildEdgeStringsForIsolatedLoops(),this._mergedLineStrings=new P;for(var t=this._edgeStrings.iterator();t.hasNext();){var e=t.next();this._mergedLineStrings.add(e.toLineString())}},buildEdgeStringStartingWith:function(t){var e=new qr(this._factory),n=t;do{e.add(n),n.getEdge().setMarked(!0),n=n.getNext()}while(null!==n&&n!==t);return e},add:function(){if(arguments[0]instanceof K)arguments[0].apply({interfaces_:function(){return[j]},filter:function(t){t instanceof At&&this.add(t)}});else if(N(arguments[0],S)){var t=arguments[0];this._mergedLineStrings=null;for(var e=t.iterator();e.hasNext();){var n=e.next();this.add(n)}}else if(arguments[0]instanceof At){var i=arguments[0];null===this._factory&&(this._factory=i.getFactory()),this._graph.addEdge(i)}},buildEdgeStringsForIsolatedLoops:function(){this.buildEdgeStringsForUnprocessedNodes()},interfaces_:function(){return[]},getClass:function(){return Kr}});var Zr=Object.freeze({LineMerger:Kr});function Qr(){this._pts=null,this._data=null;var t=arguments[0],e=arguments[1];this._pts=t,this._data=e}function Jr(){this._findAllIntersections=!1,this._isCheckEndSegmentsOnly=!1,this._li=null,this._interiorIntersection=null,this._intSegments=null,this._intersections=new P,this._intersectionCount=0,this._keepIntersections=!0;var t=arguments[0];this._li=t,this._interiorIntersection=null}function $r(){this._li=new fe,this._segStrings=null,this._findAllIntersections=!1,this._segInt=null,this._isValid=!0;var t=arguments[0];this._segStrings=t}function ts(){this._nv=null;var t=arguments[0];this._nv=new $r(ts.toSegmentStrings(t))}function es(){this._mapOp=null;var t=arguments[0];this._mapOp=t}function ns(){this._op=null,this._geometryFactory=null,this._ptLocator=null,this._lineEdgesList=new P,this._resultLineList=new P;var t=arguments[0],e=arguments[1],n=arguments[2];this._op=t,this._geometryFactory=e,this._ptLocator=n}function is(){this._op=null,this._geometryFactory=null,this._resultPointList=new P;var t=arguments[0],e=arguments[1];this._op=t,this._geometryFactory=e}function rs(){if(this._snapTolerance=0,this._srcPts=null,this._seg=new ge,this._allowSnappingToSourceVertices=!1,this._isClosed=!1,arguments[0]instanceof At&&"number"==typeof arguments[1]){var t=arguments[0],e=arguments[1];rs.call(this,t.getCoordinates(),e)}else if(arguments[0]instanceof Array&&"number"==typeof arguments[1]){var n=arguments[0],i=arguments[1];this._srcPts=n,this._isClosed=rs.isClosed(n),this._snapTolerance=i}}function ss(){this._srcGeom=null;var t=arguments[0];this._srcGeom=t}function os(){if(In.apply(this),this._snapTolerance=null,this._snapPts=null,this._isSelfSnap=!1,2===arguments.length){var t=arguments[0],e=arguments[1];this._snapTolerance=t,this._snapPts=e}else if(3===arguments.length){var n=arguments[0],i=arguments[1],r=arguments[2];this._snapTolerance=n,this._snapPts=i,this._isSelfSnap=r}}function as(){this._isFirst=!0,this._commonMantissaBitsCount=53,this._commonBits=new r,this._commonSignExp=null}function us(){this._commonCoord=null,this._ccFilter=new ls}function ls(){this._commonBitsX=new as,this._commonBitsY=new as}function hs(){this.trans=null;var t=arguments[0];this.trans=t}function cs(){this._geom=new Array(2).fill(null),this._snapTolerance=null,this._cbr=null;var t=arguments[0],e=arguments[1];this._geom[0]=t,this._geom[1]=e,this.computeSnapTolerance()}function fs(){this._geom=new Array(2).fill(null);var t=arguments[0],e=arguments[1];this._geom[0]=t,this._geom[1]=e}function gs(){if(this._li=new fe,this._resultPrecisionModel=null,this._arg=null,1===arguments.length){var t=arguments[0];this.setComputationPrecision(t.getPrecisionModel()),this._arg=new Array(1).fill(null),this._arg[0]=new ni(0,t)}else if(2===arguments.length){var e=arguments[0],n=arguments[1];gs.call(this,e,n,Q.OGC_SFS_BOUNDARY_RULE)}else if(3===arguments.length){var i=arguments[0],r=arguments[1],s=arguments[2];i.getPrecisionModel().compareTo(r.getPrecisionModel())>=0?this.setComputationPrecision(i.getPrecisionModel()):this.setComputationPrecision(r.getPrecisionModel()),this._arg=new Array(2).fill(null),this._arg[0]=new ni(0,i,s),this._arg[1]=new ni(1,r,s)}}function ds(){this._ptLocator=new Mn,this._geomFact=null,this._resultGeom=null,this._graph=null,this._edgeList=new xr,this._resultPolyList=new P,this._resultLineList=new P,this._resultPointList=new P;var t=arguments[0],e=arguments[1];gs.call(this,t,e),this._graph=new ei(new vr),this._geomFact=t.getFactory()}e(Qr.prototype,{getCoordinates:function(){return this._pts},size:function(){return this._pts.length},getCoordinate:function(t){return this._pts[t]},isClosed:function(){return this._pts[0].equals(this._pts[this._pts.length-1])},getSegmentOctant:function(t){return t===this._pts.length-1?-1:Yi.octant(this.getCoordinate(t),this.getCoordinate(t+1))},setData:function(t){this._data=t},getData:function(){return this._data},toString:function(){return he.toLineString(new Kt(this._pts))},interfaces_:function(){return[ki]},getClass:function(){return Qr}}),e(Jr.prototype,{getInteriorIntersection:function(){return this._interiorIntersection},setCheckEndSegmentsOnly:function(t){this._isCheckEndSegmentsOnly=t},getIntersectionSegments:function(){return this._intSegments},count:function(){return this._intersectionCount},getIntersections:function(){return this._intersections},setFindAllIntersections:function(t){this._findAllIntersections=t},setKeepIntersections:function(t){this._keepIntersections=t},processIntersections:function(t,e,n,i){if(!this._findAllIntersections&&this.hasIntersection())return null;if(t===n&&e===i)return null;if(this._isCheckEndSegmentsOnly&&!(this.isEndSegment(t,e)||this.isEndSegment(n,i)))return null;var r=t.getCoordinates()[e],s=t.getCoordinates()[e+1],o=n.getCoordinates()[i],a=n.getCoordinates()[i+1];this._li.computeIntersection(r,s,o,a),this._li.hasIntersection()&&this._li.isInteriorIntersection()&&(this._intSegments=new Array(4).fill(null),this._intSegments[0]=r,this._intSegments[1]=s,this._intSegments[2]=o,this._intSegments[3]=a,this._interiorIntersection=this._li.getIntersection(0),this._keepIntersections&&this._intersections.add(this._interiorIntersection),this._intersectionCount++)},isEndSegment:function(t,e){return 0===e||e>=t.size()-2},hasIntersection:function(){return null!==this._interiorIntersection},isDone:function(){return!this._findAllIntersections&&null!==this._interiorIntersection},interfaces_:function(){return[Er]},getClass:function(){return Jr}}),Jr.createAllIntersectionsFinder=function(t){var e=new Jr(t);return e.setFindAllIntersections(!0),e},Jr.createAnyIntersectionFinder=function(t){return new Jr(t)},Jr.createIntersectionCounter=function(t){var e=new Jr(t);return e.setFindAllIntersections(!0),e.setKeepIntersections(!1),e},e($r.prototype,{execute:function(){if(null!==this._segInt)return null;this.checkInteriorIntersections()},getIntersections:function(){return this._segInt.getIntersections()},isValid:function(){return this.execute(),this._isValid},setFindAllIntersections:function(t){this._findAllIntersections=t},checkInteriorIntersections:function(){this._isValid=!0,this._segInt=new Jr(this._li),this._segInt.setFindAllIntersections(this._findAllIntersections);var t=new Ki;if(t.setSegmentIntersector(this._segInt),t.computeNodes(this._segStrings),this._segInt.hasIntersection())return this._isValid=!1,null},checkValid:function(){if(this.execute(),!this._isValid)throw new Jn(this.getErrorMessage(),this._segInt.getInteriorIntersection())},getErrorMessage:function(){if(this._isValid)return"no intersections found";var t=this._segInt.getIntersectionSegments();return"found non-noded intersection between "+he.toLineString(t[0],t[1])+" and "+he.toLineString(t[2],t[3])},interfaces_:function(){return[]},getClass:function(){return $r}}),$r.computeIntersections=function(t){var e=new $r(t);return e.setFindAllIntersections(!0),e.isValid(),e.getIntersections()},e(ts.prototype,{checkValid:function(){this._nv.checkValid()},interfaces_:function(){return[]},getClass:function(){return ts}}),ts.toSegmentStrings=function(t){for(var e=new P,n=t.iterator();n.hasNext();){var i=n.next();e.add(new Qr(i.getCoordinates(),i))}return e},ts.checkValid=function(t){new ts(t).checkValid()},e(es.prototype,{map:function(t){for(var e=new P,n=0;n<t.getNumGeometries();n++){var i=this._mapOp.map(t.getGeometryN(n));i.isEmpty()||e.add(i)}return t.getFactory().createGeometryCollection(se.toGeometryArray(e))},interfaces_:function(){return[]},getClass:function(){return es}}),es.map=function(t,e){return new es(e).map(t)},e(ns.prototype,{collectLines:function(t){for(var e=this._op.getGraph().getEdgeEnds().iterator();e.hasNext();){var n=e.next();this.collectLineEdge(n,t,this._lineEdgesList),this.collectBoundaryTouchEdge(n,t,this._lineEdgesList)}},labelIsolatedLine:function(t,e){var n=this._ptLocator.locate(t.getCoordinate(),this._op.getArgGeometry(e));t.getLabel().setLocation(e,n)},build:function(t){return this.findCoveredLineEdges(),this.collectLines(t),this.buildLines(t),this._resultLineList},collectLineEdge:function(t,e,n){var i=t.getLabel(),r=t.getEdge();t.isLineEdge()&&(t.isVisited()||!ds.isResultOfOp(i,e)||r.isCovered()||(n.add(r),t.setVisitedEdge(!0)))},findCoveredLineEdges:function(){for(var t=this._op.getGraph().getNodes().iterator();t.hasNext();){t.next().getEdges().findCoveredLineEdges()}for(var e=this._op.getGraph().getEdgeEnds().iterator();e.hasNext();){var n=e.next(),i=n.getEdge();if(n.isLineEdge()&&!i.isCoveredSet()){var r=this._op.isCoveredByA(n.getCoordinate());i.setCovered(r)}}},labelIsolatedLines:function(t){for(var e=t.iterator();e.hasNext();){var n=e.next(),i=n.getLabel();n.isIsolated()&&(i.isNull(0)?this.labelIsolatedLine(n,0):this.labelIsolatedLine(n,1))}},buildLines:function(t){for(var e=this._lineEdgesList.iterator();e.hasNext();){var n=e.next(),i=(n.getLabel(),this._geometryFactory.createLineString(n.getCoordinates()));this._resultLineList.add(i),n.setInResult(!0)}},collectBoundaryTouchEdge:function(t,e,n){var i=t.getLabel();return t.isLineEdge()?null:t.isVisited()?null:t.isInteriorAreaEdge()?null:t.getEdge().isInResult()?null:(x.isTrue(!(t.isInResult()||t.getSym().isInResult())||!t.getEdge().isInResult()),void(ds.isResultOfOp(i,e)&&e===ds.INTERSECTION&&(n.add(t.getEdge()),t.setVisitedEdge(!0))))},interfaces_:function(){return[]},getClass:function(){return ns}}),e(is.prototype,{filterCoveredNodeToPoint:function(t){var e=t.getCoordinate();if(!this._op.isCoveredByLA(e)){var n=this._geometryFactory.createPoint(e);this._resultPointList.add(n)}},extractNonCoveredResultNodes:function(t){for(var e=this._op.getGraph().getNodes().iterator();e.hasNext();){var n=e.next();if(!n.isInResult()&&(!n.isIncidentEdgeInResult()&&(0===n.getEdges().getDegree()||t===ds.INTERSECTION))){var i=n.getLabel();ds.isResultOfOp(i,t)&&this.filterCoveredNodeToPoint(n)}}},build:function(t){return this.extractNonCoveredResultNodes(t),this._resultPointList},interfaces_:function(){return[]},getClass:function(){return is}}),e(rs.prototype,{snapVertices:function(t,e){for(var n=this._isClosed?t.size()-1:t.size(),i=0;i<n;i++){var r=t.get(i),s=this.findSnapForVertex(r,e);null!==s&&(t.set(i,new E(s)),0===i&&this._isClosed&&t.set(t.size()-1,new E(s)))}},findSnapForVertex:function(t,e){for(var n=0;n<e.length;n++){if(t.equals2D(e[n]))return null;if(t.distance(e[n])<this._snapTolerance)return e[n]}return null},snapTo:function(t){var e=new b(this._srcPts);return this.snapVertices(e,t),this.snapSegments(e,t),e.toCoordinateArray()},snapSegments:function(t,e){if(0===e.length)return null;var n=e.length;e[0].equals2D(e[e.length-1])&&(n=e.length-1);for(var i=0;i<n;i++){var r=e[i],s=this.findSegmentIndexToSnap(r,t);s>=0&&t.add(s+1,new E(r),!1)}},findSegmentIndexToSnap:function(t,e){for(var n=s.MAX_VALUE,i=-1,r=0;r<e.size()-1;r++){if(this._seg.p0=e.get(r),this._seg.p1=e.get(r+1),this._seg.p0.equals2D(t)||this._seg.p1.equals2D(t)){if(this._allowSnappingToSourceVertices)continue;return-1}var o=this._seg.distance(t);o<this._snapTolerance&&o<n&&(n=o,i=r)}return i},setAllowSnappingToSourceVertices:function(t){this._allowSnappingToSourceVertices=t},interfaces_:function(){return[]},getClass:function(){return rs}}),rs.isClosed=function(t){return!(t.length<=1)&&t[0].equals2D(t[t.length-1])},e(ss.prototype,{snapTo:function(t,e){return new os(e,this.extractTargetCoordinates(t)).transform(this._srcGeom)},snapToSelf:function(t,e){var n=new os(t,this.extractTargetCoordinates(this._srcGeom),!0).transform(this._srcGeom),i=n;return e&&N(i,Bt)&&(i=n.buffer(0)),i},computeSnapTolerance:function(t){return this.computeMinimumSegmentLength(t)/10},extractTargetCoordinates:function(t){for(var e=new yt,n=t.getCoordinates(),i=0;i<n.length;i++)e.add(n[i]);return e.toArray(new Array(0).fill(null))},computeMinimumSegmentLength:function(t){for(var e=s.MAX_VALUE,n=0;n<t.length-1;n++){var i=t[n].distance(t[n+1]);i<e&&(e=i)}return e},interfaces_:function(){return[]},getClass:function(){return ss}}),ss.snap=function(t,e,n){var i=new Array(2).fill(null),r=new ss(t);i[0]=r.snapTo(e,n);var s=new ss(e);return i[1]=s.snapTo(i[0],n),i},ss.computeOverlaySnapTolerance=function(){if(1===arguments.length){var t=arguments[0],e=ss.computeSizeBasedSnapTolerance(t),n=t.getPrecisionModel();if(n.getType()===ie.FIXED){var i=1/n.getScale()*2/1.415;i>e&&(e=i)}return e}if(2===arguments.length){var r=arguments[0],s=arguments[1];return Math.min(ss.computeOverlaySnapTolerance(r),ss.computeOverlaySnapTolerance(s))}},ss.computeSizeBasedSnapTolerance=function(t){var e=t.getEnvelopeInternal();return Math.min(e.getHeight(),e.getWidth())*ss.SNAP_PRECISION_FACTOR},ss.snapToSelf=function(t,e,n){return new ss(t).snapToSelf(e,n)},ss.SNAP_PRECISION_FACTOR=1e-9,v(os,In),e(os.prototype,{snapLine:function(t,e){var n=new rs(t,this._snapTolerance);return n.setAllowSnappingToSourceVertices(this._isSelfSnap),n.snapTo(e)},transformCoordinates:function(t,e){var n=t.toCoordinateArray(),i=this.snapLine(n,this._snapPts);return this._factory.getCoordinateSequenceFactory().create(i)},interfaces_:function(){return[]},getClass:function(){return os}}),e(as.prototype,{getCommon:function(){return s.longBitsToDouble(this._commonBits)},add:function(t){var e=s.doubleToLongBits(t);return this._isFirst?(this._commonBits=e,this._commonSignExp=as.signExpBits(this._commonBits),this._isFirst=!1,null):as.signExpBits(e)!==this._commonSignExp?(this._commonBits.high=0,this._commonBits.low=0,null):(this._commonMantissaBitsCount=as.numCommonMostSigMantissaBits(this._commonBits,e),void(this._commonBits=as.zeroLowerBits(this._commonBits,64-(12+this._commonMantissaBitsCount))))},toString:function(){if(1===arguments.length){var t=arguments[0],e=s.longBitsToDouble(t),n="0000000000000000000000000000000000000000000000000000000000000000"+r.toBinaryString(t),i=n.substring(n.length-64);return i.substring(0,1)+"  "+i.substring(1,12)+"(exp) "+i.substring(12)+" [ "+e+" ]"}},interfaces_:function(){return[]},getClass:function(){return as}}),as.getBit=function(t,e){var n=1<<e%32;return e<32?0!=(t.low&n)?1:0:0!=(t.high&n)?1:0},as.signExpBits=function(t){return t.high>>>20},as.zeroLowerBits=function(t,e){var n="low";if(e>32&&(t.low=0,e%=32,n="high"),e>0){var i=e<32?~((1<<e)-1):0;t[n]&=i}return t},as.numCommonMostSigMantissaBits=function(t,e){for(var n=0,i=52;i>=0;i--){if(as.getBit(t,i)!==as.getBit(e,i))return n;n++}return 52},e(us.prototype,{addCommonBits:function(t){var e=new hs(this._commonCoord);t.apply(e),t.geometryChanged()},removeCommonBits:function(t){if(0===this._commonCoord.x&&0===this._commonCoord.y)return t;var e=new E(this._commonCoord);e.x=-e.x,e.y=-e.y;var n=new hs(e);return t.apply(n),t.geometryChanged(),t},getCommonCoordinate:function(){return this._commonCoord},add:function(t){t.apply(this._ccFilter),this._commonCoord=this._ccFilter.getCommonCoordinate()},interfaces_:function(){return[]},getClass:function(){return us}}),e(ls.prototype,{filter:function(t){this._commonBitsX.add(t.x),this._commonBitsY.add(t.y)},getCommonCoordinate:function(){return new E(this._commonBitsX.getCommon(),this._commonBitsY.getCommon())},interfaces_:function(){return[Z]},getClass:function(){return ls}}),e(hs.prototype,{filter:function(t,e){var n=t.getOrdinate(e,0)+this.trans.x,i=t.getOrdinate(e,1)+this.trans.y;t.setOrdinate(e,0,n),t.setOrdinate(e,1,i)},isDone:function(){return!1},isGeometryChanged:function(){return!0},interfaces_:function(){return[St]},getClass:function(){return hs}}),us.CommonCoordinateFilter=ls,us.Translater=hs,e(cs.prototype,{selfSnap:function(t){return new ss(t).snapTo(t,this._snapTolerance)},removeCommonBits:function(t){this._cbr=new us,this._cbr.add(t[0]),this._cbr.add(t[1]);var e=new Array(2).fill(null);return e[0]=this._cbr.removeCommonBits(t[0].copy()),e[1]=this._cbr.removeCommonBits(t[1].copy()),e},prepareResult:function(t){return this._cbr.addCommonBits(t),t},getResultGeometry:function(t){var e=this.snap(this._geom),n=ds.overlayOp(e[0],e[1],t);return this.prepareResult(n)},checkValid:function(t){t.isValid()||Y.out.println("Snapped geometry is invalid")},computeSnapTolerance:function(){this._snapTolerance=ss.computeOverlaySnapTolerance(this._geom[0],this._geom[1])},snap:function(t){var e=this.removeCommonBits(t);return ss.snap(e[0],e[1],this._snapTolerance)},interfaces_:function(){return[]},getClass:function(){return cs}}),cs.overlayOp=function(t,e,n){return new cs(t,e).getResultGeometry(n)},cs.union=function(t,e){return cs.overlayOp(t,e,ds.UNION)},cs.intersection=function(t,e){return cs.overlayOp(t,e,ds.INTERSECTION)},cs.symDifference=function(t,e){return cs.overlayOp(t,e,ds.SYMDIFFERENCE)},cs.difference=function(t,e){return cs.overlayOp(t,e,ds.DIFFERENCE)},e(fs.prototype,{getResultGeometry:function(t){var e=null,n=!1,i=null;try{e=ds.overlayOp(this._geom[0],this._geom[1],t);n=!0}catch(t){if(!(t instanceof m))throw t;i=t}if(!n)try{e=cs.overlayOp(this._geom[0],this._geom[1],t)}catch(t){throw t instanceof m?i:t}return e},interfaces_:function(){return[]},getClass:function(){return fs}}),fs.overlayOp=function(t,e,n){return new fs(t,e).getResultGeometry(n)},fs.union=function(t,e){return fs.overlayOp(t,e,ds.UNION)},fs.intersection=function(t,e){return fs.overlayOp(t,e,ds.INTERSECTION)},fs.symDifference=function(t,e){return fs.overlayOp(t,e,ds.SYMDIFFERENCE)},fs.difference=function(t,e){return fs.overlayOp(t,e,ds.DIFFERENCE)},e(gs.prototype,{getArgGeometry:function(t){return this._arg[t].getGeometry()},setComputationPrecision:function(t){this._resultPrecisionModel=t,this._li.setPrecisionModel(this._resultPrecisionModel)},interfaces_:function(){return[]},getClass:function(){return gs}}),v(ds,gs),e(ds.prototype,{insertUniqueEdge:function(t){var e=this._edgeList.findEqualEdge(t);if(null!==e){var n=e.getLabel(),i=t.getLabel();e.isPointwiseEqual(t)||(i=new zn(t.getLabel())).flip();var r=e.getDepth();r.isNull()&&r.add(n),r.add(i),n.merge(i)}else this._edgeList.add(t)},getGraph:function(){return this._graph},cancelDuplicateResultEdges:function(){for(var t=this._graph.getEdgeEnds().iterator();t.hasNext();){var e=t.next(),n=e.getSym();e.isInResult()&&n.isInResult()&&(e.setInResult(!1),n.setInResult(!1))}},isCoveredByLA:function(t){return!!this.isCovered(t,this._resultLineList)||!!this.isCovered(t,this._resultPolyList)},computeGeometry:function(t,e,n,i){var r=new P;return r.addAll(t),r.addAll(e),r.addAll(n),r.isEmpty()?ds.createEmptyResult(i,this._arg[0].getGeometry(),this._arg[1].getGeometry(),this._geomFact):this._geomFact.buildGeometry(r)},mergeSymLabels:function(){for(var t=this._graph.getNodes().iterator();t.hasNext();){t.next().getEdges().mergeSymLabels()}},isCovered:function(t,e){for(var n=e.iterator();n.hasNext();){var i=n.next();if(this._ptLocator.locate(t,i)!==de.EXTERIOR)return!0}return!1},replaceCollapsedEdges:function(){for(var t=new P,e=this._edgeList.iterator();e.hasNext();){var n=e.next();n.isCollapsed()&&(e.remove(),t.add(n.getCollapsedEdge()))}this._edgeList.addAll(t)},updateNodeLabelling:function(){for(var t=this._graph.getNodes().iterator();t.hasNext();){var e=t.next(),n=e.getEdges().getLabel();e.getLabel().merge(n)}},getResultGeometry:function(t){return this.computeOverlay(t),this._resultGeom},insertUniqueEdges:function(t){for(var e=t.iterator();e.hasNext();){var n=e.next();this.insertUniqueEdge(n)}},computeOverlay:function(t){this.copyPoints(0),this.copyPoints(1),this._arg[0].computeSelfNodes(this._li,!1),this._arg[1].computeSelfNodes(this._li,!1),this._arg[0].computeEdgeIntersections(this._arg[1],this._li,!0);var e=new P;this._arg[0].computeSplitEdges(e),this._arg[1].computeSplitEdges(e),this.insertUniqueEdges(e),this.computeLabelsFromDepths(),this.replaceCollapsedEdges(),ts.checkValid(this._edgeList.getEdges()),this._graph.addEdges(this._edgeList.getEdges()),this.computeLabelling(),this.labelIncompleteNodes(),this.findResultAreaEdges(t),this.cancelDuplicateResultEdges();var n=new ur(this._geomFact);n.add(this._graph),this._resultPolyList=n.getPolygons();var i=new ns(this,this._geomFact,this._ptLocator);this._resultLineList=i.build(t);var r=new is(this,this._geomFact,this._ptLocator);this._resultPointList=r.build(t),this._resultGeom=this.computeGeometry(this._resultPointList,this._resultLineList,this._resultPolyList,t)},labelIncompleteNode:function(t,e){var n=this._ptLocator.locate(t.getCoordinate(),this._arg[e].getGeometry());t.getLabel().setLocation(e,n)},copyPoints:function(t){for(var e=this._arg[t].getNodeIterator();e.hasNext();){var n=e.next();this._graph.addNode(n.getCoordinate()).setLabel(t,n.getLabel().getLocation(t))}},findResultAreaEdges:function(t){for(var e=this._graph.getEdgeEnds().iterator();e.hasNext();){var n=e.next(),i=n.getLabel();i.isArea()&&!n.isInteriorAreaEdge()&&ds.isResultOfOp(i.getLocation(0,Dn.RIGHT),i.getLocation(1,Dn.RIGHT),t)&&n.setInResult(!0)}},computeLabelsFromDepths:function(){for(var t=this._edgeList.iterator();t.hasNext();){var e=t.next(),n=e.getLabel(),i=e.getDepth();if(!i.isNull()){i.normalize();for(var r=0;r<2;r++)n.isNull(r)||!n.isArea()||i.isNull(r)||(0===i.getDelta(r)?n.toLine(r):(x.isTrue(!i.isNull(r,Dn.LEFT),"depth of LEFT side has not been initialized"),n.setLocation(r,Dn.LEFT,i.getLocation(r,Dn.LEFT)),x.isTrue(!i.isNull(r,Dn.RIGHT),"depth of RIGHT side has not been initialized"),n.setLocation(r,Dn.RIGHT,i.getLocation(r,Dn.RIGHT))))}}},computeLabelling:function(){for(var t=this._graph.getNodes().iterator();t.hasNext();){t.next().getEdges().computeLabelling(this._arg)}this.mergeSymLabels(),this.updateNodeLabelling()},labelIncompleteNodes:function(){for(var t=this._graph.getNodes().iterator();t.hasNext();){var e=t.next(),n=e.getLabel();e.isIsolated()&&(n.isNull(0)?this.labelIncompleteNode(e,0):this.labelIncompleteNode(e,1)),e.getEdges().updateLabelling(n)}},isCoveredByA:function(t){return!!this.isCovered(t,this._resultPolyList)},interfaces_:function(){return[]},getClass:function(){return ds}}),ds.overlayOp=function(t,e,n){return new ds(t,e).getResultGeometry(n)},ds.union=function(t,e){if(t.isEmpty()||e.isEmpty()){if(t.isEmpty()&&e.isEmpty())return ds.createEmptyResult(ds.UNION,t,e,t.getFactory());if(t.isEmpty())return e.copy();if(e.isEmpty())return t.copy()}if(t.isGeometryCollection()||e.isGeometryCollection())throw new i("This method does not support GeometryCollection arguments");return fs.overlayOp(t,e,ds.UNION)},ds.intersection=function(t,e){if(t.isEmpty()||e.isEmpty())return ds.createEmptyResult(ds.INTERSECTION,t,e,t.getFactory());if(t.isGeometryCollection()){var n=e;return es.map(t,{interfaces_:function(){return[MapOp]},map:function(t){return t.intersection(n)}})}if(t.isGeometryCollection()||e.isGeometryCollection())throw new i("This method does not support GeometryCollection arguments");return fs.overlayOp(t,e,ds.INTERSECTION)},ds.symDifference=function(t,e){if(t.isEmpty()||e.isEmpty()){if(t.isEmpty()&&e.isEmpty())return ds.createEmptyResult(ds.SYMDIFFERENCE,t,e,t.getFactory());if(t.isEmpty())return e.copy();if(e.isEmpty())return t.copy()}if(t.isGeometryCollection()||e.isGeometryCollection())throw new i("This method does not support GeometryCollection arguments");return fs.overlayOp(t,e,ds.SYMDIFFERENCE)},ds.resultDimension=function(t,e,n){var i=e.getDimension(),r=n.getDimension(),s=-1;switch(t){case ds.INTERSECTION:s=Math.min(i,r);break;case ds.UNION:s=Math.max(i,r);break;case ds.DIFFERENCE:s=i;break;case ds.SYMDIFFERENCE:s=Math.max(i,r)}return s},ds.createEmptyResult=function(t,e,n,i){var r=null;switch(ds.resultDimension(t,e,n)){case-1:r=i.createGeometryCollection();break;case 0:r=i.createPoint();break;case 1:r=i.createLineString();break;case 2:r=i.createPolygon()}return r},ds.difference=function(t,e){if(t.isEmpty())return ds.createEmptyResult(ds.DIFFERENCE,t,e,t.getFactory());if(e.isEmpty())return t.copy();if(t.isGeometryCollection()||e.isGeometryCollection())throw new i("This method does not support GeometryCollection arguments");return fs.overlayOp(t,e,ds.DIFFERENCE)},ds.isResultOfOp=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1],n=t.getLocation(0),i=t.getLocation(1);return ds.isResultOfOp(n,i,e)}if(3===arguments.length){var r=arguments[0],s=arguments[1],o=arguments[2];switch(r===de.BOUNDARY&&(r=de.INTERIOR),s===de.BOUNDARY&&(s=de.INTERIOR),o){case ds.INTERSECTION:return r===de.INTERIOR&&s===de.INTERIOR;case ds.UNION:return r===de.INTERIOR||s===de.INTERIOR;case ds.DIFFERENCE:return r===de.INTERIOR&&s!==de.INTERIOR;case ds.SYMDIFFERENCE:return r===de.INTERIOR&&s!==de.INTERIOR||r!==de.INTERIOR&&s===de.INTERIOR}return!1}},ds.INTERSECTION=1,ds.UNION=2,ds.DIFFERENCE=3,ds.SYMDIFFERENCE=4;var _s=Object.freeze({OverlayOp:ds});function ps(){this._edgeRing=null,this._next=null,this._label=-1;var t=arguments[0],e=arguments[1],n=arguments[2],i=arguments[3];Vr.call(this,t,e,n,i)}function ms(){Yr.apply(this),this._line=null;var t=arguments[0];this._line=t}function vs(){this._factory=null,this._deList=new P,this._lowestEdge=null,this._ring=null,this._ringPts=null,this._holes=null,this._shell=null,this._isHole=null,this._isProcessed=!1,this._isIncludedSet=!1,this._isIncluded=!1;var t=arguments[0];this._factory=t}function ys(){}function xs(){Wr.apply(this),this._factory=null;var t=arguments[0];this._factory=t}function Es(){if(this._lineStringAdder=new Is(this),this._graph=null,this._dangles=new P,this._cutEdges=new P,this._invalidRingLines=new P,this._holeList=null,this._shellList=null,this._polyList=null,this._isCheckingRingsValid=!0,this._extractOnlyPolygonal=null,this._geomFactory=null,0===arguments.length)Es.call(this,!1);else if(1===arguments.length){var t=arguments[0];this._extractOnlyPolygonal=t}}function Is(){this.p=null;var t=arguments[0];this.p=t}v(ps,Vr),e(ps.prototype,{getNext:function(){return this._next},isInRing:function(){return null!==this._edgeRing},setRing:function(t){this._edgeRing=t},setLabel:function(t){this._label=t},getLabel:function(){return this._label},setNext:function(t){this._next=t},getRing:function(){return this._edgeRing},interfaces_:function(){return[]},getClass:function(){return ps}}),v(ms,Yr),e(ms.prototype,{getLine:function(){return this._line},interfaces_:function(){return[]},getClass:function(){return ms}}),e(vs.prototype,{isIncluded:function(){return this._isIncluded},getCoordinates:function(){if(null===this._ringPts){for(var t=new b,e=this._deList.iterator();e.hasNext();){var n=e.next(),i=n.getEdge();vs.addEdge(i.getLine().getCoordinates(),n.getEdgeDirection(),t)}this._ringPts=t.toCoordinateArray()}return this._ringPts},isIncludedSet:function(){return this._isIncludedSet},isValid:function(){return this.getCoordinates(),!(this._ringPts.length<=3)&&(this.getRing(),this._ring.isValid())},build:function(t){var e=t;do{this.add(e),e.setRing(this),e=e.getNext(),x.isTrue(null!==e,"found null DE in ring"),x.isTrue(e===t||!e.isInRing(),"found DE already in ring")}while(e!==t)},isOuterHole:function(){return!!this._isHole&&!this.hasShell()},getPolygon:function(){var t=null;if(null!==this._holes){t=new Array(this._holes.size()).fill(null);for(var e=0;e<this._holes.size();e++)t[e]=this._holes.get(e)}return this._factory.createPolygon(this._ring,t)},isHole:function(){return this._isHole},isProcessed:function(){return this._isProcessed},addHole:function(){if(arguments[0]instanceof Yt){var t=arguments[0];null===this._holes&&(this._holes=new P),this._holes.add(t)}else if(arguments[0]instanceof vs){var e=arguments[0];e.setShell(this);var n=e.getRing();null===this._holes&&(this._holes=new P),this._holes.add(n)}},setIncluded:function(t){this._isIncluded=t,this._isIncludedSet=!0},getOuterHole:function(){if(this.isHole())return null;for(var t=0;t<this._deList.size();t++){var e=this._deList.get(t).getSym().getRing();if(e.isOuterHole())return e}return null},computeHole:function(){var t=this.getRing();this._isHole=z.isCCW(t.getCoordinates())},hasShell:function(){return null!==this._shell},isOuterShell:function(){return null!==this.getOuterHole()},getLineString:function(){return this.getCoordinates(),this._factory.createLineString(this._ringPts)},toString:function(){return he.toLineString(new Kt(this.getCoordinates()))},getShell:function(){return this.isHole()?this._shell:this},add:function(t){this._deList.add(t)},getRing:function(){if(null!==this._ring)return this._ring;this.getCoordinates(),this._ringPts.length<3&&Y.out.println(this._ringPts);try{this._ring=this._factory.createLinearRing(this._ringPts)}catch(t){if(!(t instanceof D))throw t;Y.out.println(this._ringPts)}return this._ring},updateIncluded:function(){if(this.isHole())return null;for(var t=0;t<this._deList.size();t++){var e=this._deList.get(t).getSym().getRing().getShell();if(null!==e&&e.isIncludedSet())return this.setIncluded(!e.isIncluded()),null}},setShell:function(t){this._shell=t},setProcessed:function(t){this._isProcessed=t},interfaces_:function(){return[]},getClass:function(){return vs}}),vs.findDirEdgesInRing=function(t){var e=t,n=new P;do{n.add(e),e=e.getNext(),x.isTrue(null!==e,"found null DE in ring"),x.isTrue(e===t||!e.isInRing(),"found DE already in ring")}while(e!==t);return n},vs.addEdge=function(t,e,n){if(e)for(var i=0;i<t.length;i++)n.add(t[i],!1);else for(i=t.length-1;i>=0;i--)n.add(t[i],!1)},vs.findEdgeRingContaining=function(t,e){for(var n=t.getRing(),i=n.getEnvelopeInternal(),r=n.getCoordinateN(0),s=null,o=null,a=e.iterator();a.hasNext();){var u=a.next(),l=u.getRing(),h=l.getEnvelopeInternal();if(!h.equals(i)&&h.contains(i)){r=nt.ptNotInList(n.getCoordinates(),l.getCoordinates());var c=!1;qe.isInRing(r,l.getCoordinates())&&(c=!0),c&&(null===s||o.contains(h))&&(o=(s=u).getRing().getEnvelopeInternal())}}return s},e(ys.prototype,{compare:function(t,e){var n=e;return t.getRing().getEnvelope().compareTo(n.getRing().getEnvelope())},interfaces_:function(){return[_]},getClass:function(){return ys}}),vs.EnvelopeComparator=ys,v(xs,Wr),e(xs.prototype,{findEdgeRing:function(t){var e=new vs(this._factory);return e.build(t),e},computeDepthParity:function(){if(0===arguments.length)for(;;){return null}else arguments.length},computeNextCWEdges:function(){for(var t=this.nodeIterator();t.hasNext();){var e=t.next();xs.computeNextCWEdges(e)}},addEdge:function(t){if(t.isEmpty())return null;var e=nt.removeRepeatedPoints(t.getCoordinates());if(e.length<2)return null;var n=e[0],i=e[e.length-1],r=this.getNode(n),s=this.getNode(i),o=new ps(r,s,e[1],!0),a=new ps(s,r,e[e.length-2],!1),u=new ms(t);u.setDirectedEdges(o,a),this.add(u)},deleteCutEdges:function(){this.computeNextCWEdges(),xs.findLabeledEdgeRings(this._dirEdges);for(var t=new P,e=this._dirEdges.iterator();e.hasNext();){var n=e.next();if(!n.isMarked()){var i=n.getSym();if(n.getLabel()===i.getLabel()){n.setMarked(!0),i.setMarked(!0);var r=n.getEdge();t.add(r.getLine())}}}return t},getEdgeRings:function(){this.computeNextCWEdges(),xs.label(this._dirEdges,-1);var t=xs.findLabeledEdgeRings(this._dirEdges);this.convertMaximalToMinimalEdgeRings(t);for(var e=new P,n=this._dirEdges.iterator();n.hasNext();){var i=n.next();if(!i.isMarked()&&!i.isInRing()){var r=this.findEdgeRing(i);e.add(r)}}return e},getNode:function(t){var e=this.findNode(t);return null===e&&(e=new Ur(t),this.add(e)),e},convertMaximalToMinimalEdgeRings:function(t){for(var e=t.iterator();e.hasNext();){var n=e.next(),i=n.getLabel(),r=xs.findIntersectionNodes(n,i);if(null!==r)for(var s=r.iterator();s.hasNext();){var o=s.next();xs.computeNextCCWEdges(o,i)}}},deleteDangles:function(){for(var t=this.findNodesOfDegree(1),e=new ut,n=new je,i=t.iterator();i.hasNext();)n.push(i.next());for(;!n.isEmpty();){var r=n.pop();xs.deleteAllEdges(r);for(i=r.getOutEdges().getEdges().iterator();i.hasNext();){var s=i.next();s.setMarked(!0);var o=s.getSym();null!==o&&o.setMarked(!0);var a=s.getEdge();e.add(a.getLine());var u=s.getToNode();1===xs.getDegreeNonDeleted(u)&&n.push(u)}}return e},interfaces_:function(){return[]},getClass:function(){return xs}}),xs.findLabeledEdgeRings=function(t){for(var e=new P,n=1,i=t.iterator();i.hasNext();){var r=i.next();if(!r.isMarked()&&!(r.getLabel()>=0)){e.add(r);var s=vs.findDirEdgesInRing(r);xs.label(s,n),n++}}return e},xs.getDegreeNonDeleted=function(t){for(var e=0,n=t.getOutEdges().getEdges().iterator();n.hasNext();){n.next().isMarked()||e++}return e},xs.deleteAllEdges=function(t){for(var e=t.getOutEdges().getEdges().iterator();e.hasNext();){var n=e.next();n.setMarked(!0);var i=n.getSym();null!==i&&i.setMarked(!0)}},xs.label=function(t,e){for(var n=t.iterator();n.hasNext();){n.next().setLabel(e)}},xs.computeNextCWEdges=function(t){for(var e=null,n=null,i=t.getOutEdges().getEdges().iterator();i.hasNext();){var r=i.next();if(!r.isMarked()){if(null===e&&(e=r),null!==n)n.getSym().setNext(r);n=r}}null!==n&&n.getSym().setNext(e)},xs.computeNextCCWEdges=function(t,e){for(var n=null,i=null,r=t.getOutEdges().getEdges(),s=r.size()-1;s>=0;s--){var o=r.get(s),a=o.getSym(),u=null;o.getLabel()===e&&(u=o);var l=null;a.getLabel()===e&&(l=a),null===u&&null===l||(null!==l&&(i=l),null!==u&&(null!==i&&(i.setNext(u),i=null),null===n&&(n=u)))}null!==i&&(x.isTrue(null!==n),i.setNext(n))},xs.getDegree=function(t,e){for(var n=0,i=t.getOutEdges().getEdges().iterator();i.hasNext();){i.next().getLabel()===e&&n++}return n},xs.findIntersectionNodes=function(t,e){var n=t,i=null;do{var r=n.getFromNode();xs.getDegree(r,e)>1&&(null===i&&(i=new P),i.add(r)),n=n.getNext(),x.isTrue(null!==n,"found null DE in ring"),x.isTrue(n===t||!n.isInRing(),"found DE already in ring")}while(n!==t);return i},e(Es.prototype,{getGeometry:function(){return null===this._geomFactory&&(this._geomFactory=new se),this.polygonize(),this._extractOnlyPolygonal?this._geomFactory.buildGeometry(this._polyList):this._geomFactory.createGeometryCollection(se.toGeometryArray(this._polyList))},getInvalidRingLines:function(){return this.polygonize(),this._invalidRingLines},findValidRings:function(t,e,n){for(var i=t.iterator();i.hasNext();){var r=i.next();r.isValid()?e.add(r):n.add(r.getLineString())}},polygonize:function(){if(null!==this._polyList)return null;if(this._polyList=new P,null===this._graph)return null;this._dangles=this._graph.deleteDangles(),this._cutEdges=this._graph.deleteCutEdges();var t=this._graph.getEdgeRings(),e=new P;this._invalidRingLines=new P,this._isCheckingRingsValid?this.findValidRings(t,e,this._invalidRingLines):e=t,this.findShellsAndHoles(e),Es.assignHolesToShells(this._holeList,this._shellList),Te.sort(this._shellList,new vs.EnvelopeComparator);var n=!0;this._extractOnlyPolygonal&&(Es.findDisjointShells(this._shellList),n=!1),this._polyList=Es.extractPolygons(this._shellList,n)},getDangles:function(){return this.polygonize(),this._dangles},getCutEdges:function(){return this.polygonize(),this._cutEdges},getPolygons:function(){return this.polygonize(),this._polyList},add:function(){if(N(arguments[0],S))for(var t=arguments[0].iterator();t.hasNext();){var e=t.next();this.add(e)}else if(arguments[0]instanceof At){var n=arguments[0];this._geomFactory=n.getFactory(),null===this._graph&&(this._graph=new xs(this._geomFactory)),this._graph.addEdge(n)}else if(arguments[0]instanceof K){arguments[0].apply(this._lineStringAdder)}},setCheckRingsValid:function(t){this._isCheckingRingsValid=t},findShellsAndHoles:function(t){this._holeList=new P,this._shellList=new P;for(var e=t.iterator();e.hasNext();){var n=e.next();n.computeHole(),n.isHole()?this._holeList.add(n):this._shellList.add(n)}},interfaces_:function(){return[]},getClass:function(){return Es}}),Es.findOuterShells=function(t){for(var e=t.iterator();e.hasNext();){var n=e.next(),i=n.getOuterHole();null===i||i.isProcessed()||(n.setIncluded(!0),i.setProcessed(!0))}},Es.extractPolygons=function(t,e){for(var n=new P,i=t.iterator();i.hasNext();){var r=i.next();(e||r.isIncluded())&&n.add(r.getPolygon())}return n},Es.assignHolesToShells=function(t,e){for(var n=t.iterator();n.hasNext();){var i=n.next();Es.assignHoleToShell(i,e)}},Es.assignHoleToShell=function(t,e){var n=vs.findEdgeRingContaining(t,e);null!==n&&n.addHole(t)},Es.findDisjointShells=function(t){Es.findOuterShells(t);var e=null;do{e=!1;for(var n=t.iterator();n.hasNext();){var i=n.next();i.isIncludedSet()||(i.updateIncluded(),i.isIncludedSet()||(e=!0))}}while(e)},e(Is.prototype,{filter:function(t){t instanceof At&&this.p.add(t)},interfaces_:function(){return[j]},getClass:function(){return Is}}),Es.LineStringAdder=Is;var Ns=Object.freeze({Polygonizer:Es});function Cs(){}function Ss(){if(this._edgeEnds=new P,1===arguments.length){var t=arguments[0];Ss.call(this,null,t)}else if(2===arguments.length){arguments[0];var e=arguments[1];Qn.call(this,e.getEdge(),e.getCoordinate(),e.getDirectedCoordinate(),new zn(e.getLabel())),this.insert(e)}}function Ls(){pr.apply(this)}function ws(){var t=arguments[0],e=arguments[1];Kn.call(this,t,e)}function Rs(){ti.apply(this)}function Ts(){this._li=new fe,this._ptLocator=new Mn,this._arg=null,this._nodes=new Zn(new Rs),this._im=null,this._isolatedEdges=new P,this._invalidPoint=null;var t=arguments[0];this._arg=t}function Ps(){this._rectEnv=null;var t=arguments[0];this._rectEnv=t.getEnvelopeInternal()}function Os(){this._li=new fe,this._rectEnv=null,this._diagUp0=null,this._diagUp1=null,this._diagDown0=null,this._diagDown1=null;var t=arguments[0];this._rectEnv=t,this._diagUp0=new E(t.getMinX(),t.getMinY()),this._diagUp1=new E(t.getMaxX(),t.getMaxY()),this._diagDown0=new E(t.getMinX(),t.getMaxY()),this._diagDown1=new E(t.getMaxX(),t.getMinY())}function bs(){this._isDone=!1}function Ms(){this._rectangle=null,this._rectEnv=null;var t=arguments[0];this._rectangle=t,this._rectEnv=t.getEnvelopeInternal()}function Ds(){bs.apply(this),this._rectEnv=null,this._intersects=!1;var t=arguments[0];this._rectEnv=t}function As(){bs.apply(this),this._rectSeq=null,this._rectEnv=null,this._containsPoint=!1;var t=arguments[0];this._rectSeq=t.getExteriorRing().getCoordinateSequence(),this._rectEnv=t.getEnvelopeInternal()}function Fs(){bs.apply(this),this._rectEnv=null,this._rectIntersector=null,this._hasIntersection=!1,this._p0=new E,this._p1=new E;var t=arguments[0];this._rectEnv=t.getEnvelopeInternal(),this._rectIntersector=new Os(this._rectEnv)}function Gs(){if(this._relate=null,2===arguments.length){var t=arguments[0],e=arguments[1];gs.call(this,t,e),this._relate=new Ts(this._arg)}else if(3===arguments.length){var n=arguments[0],i=arguments[1],r=arguments[2];gs.call(this,n,i,r),this._relate=new Ts(this._arg)}}e(Cs.prototype,{createEdgeEndForNext:function(t,e,n,i){var r=n.segmentIndex+1;if(r>=t.getNumPoints()&&null===i)return null;var s=t.getCoordinate(r);null!==i&&i.segmentIndex===n.segmentIndex&&(s=i.coord);var o=new Qn(t,n.coord,s,new zn(t.getLabel()));e.add(o)},createEdgeEndForPrev:function(t,e,n,i){var r=n.segmentIndex;if(0===n.dist){if(0===r)return null;r--}var s=t.getCoordinate(r);null!==i&&i.segmentIndex>=r&&(s=i.coord);var o=new zn(t.getLabel());o.flip();var a=new Qn(t,n.coord,s,o);e.add(a)},computeEdgeEnds:function(){if(1===arguments.length){for(var t=arguments[0],e=new P,n=t;n.hasNext();){var i=n.next();this.computeEdgeEnds(i,e)}return e}if(2===arguments.length){var r=arguments[0],s=arguments[1],o=r.getEdgeIntersectionList();o.addEndpoints();var a=o.iterator(),u=null,l=null;if(!a.hasNext())return null;var h=a.next();do{u=l,l=h,h=null,a.hasNext()&&(h=a.next()),null!==l&&(this.createEdgeEndForPrev(r,s,l,u),this.createEdgeEndForNext(r,s,l,h))}while(null!==l)}},interfaces_:function(){return[]},getClass:function(){return Cs}}),v(Ss,Qn),e(Ss.prototype,{insert:function(t){this._edgeEnds.add(t)},print:function(t){t.println("EdgeEndBundle--\x3e Label: "+this._label);for(var e=this.iterator();e.hasNext();){e.next().print(t),t.println()}},iterator:function(){return this._edgeEnds.iterator()},getEdgeEnds:function(){return this._edgeEnds},computeLabelOn:function(t,e){for(var n=0,i=!1,r=this.iterator();r.hasNext();){(s=r.next().getLabel().getLocation(t))===de.BOUNDARY&&n++,s===de.INTERIOR&&(i=!0)}var s=de.NONE;i&&(s=de.INTERIOR),n>0&&(s=ni.determineBoundary(e,n)),this._label.setLocation(t,s)},computeLabelSide:function(t,e){for(var n=this.iterator();n.hasNext();){var i=n.next();if(i.getLabel().isArea()){var r=i.getLabel().getLocation(t,e);if(r===de.INTERIOR)return this._label.setLocation(t,e,de.INTERIOR),null;r===de.EXTERIOR&&this._label.setLocation(t,e,de.EXTERIOR)}}},getLabel:function(){return this._label},computeLabelSides:function(t){this.computeLabelSide(t,Dn.LEFT),this.computeLabelSide(t,Dn.RIGHT)},updateIM:function(t){jn.updateIM(this._label,t)},computeLabel:function(t){for(var e=!1,n=this.iterator();n.hasNext();){n.next().getLabel().isArea()&&(e=!0)}this._label=e?new zn(de.NONE,de.NONE,de.NONE):new zn(de.NONE);for(var i=0;i<2;i++)this.computeLabelOn(i,t),e&&this.computeLabelSides(i)},interfaces_:function(){return[]},getClass:function(){return Ss}}),v(Ls,pr),e(Ls.prototype,{updateIM:function(t){for(var e=this.iterator();e.hasNext();){e.next().updateIM(t)}},insert:function(t){var e=this._edgeMap.get(t);null===e?(e=new Ss(t),this.insertEdgeEnd(t,e)):e.insert(t)},interfaces_:function(){return[]},getClass:function(){return Ls}}),v(ws,Kn),e(ws.prototype,{updateIMFromEdges:function(t){this._edges.updateIM(t)},computeIM:function(t){t.setAtLeastIfValid(this._label.getLocation(0),this._label.getLocation(1),0)},interfaces_:function(){return[]},getClass:function(){return ws}}),v(Rs,ti),e(Rs.prototype,{createNode:function(t){return new ws(t,new Ls)},interfaces_:function(){return[]},getClass:function(){return Rs}}),e(Ts.prototype,{insertEdgeEnds:function(t){for(var e=t.iterator();e.hasNext();){var n=e.next();this._nodes.add(n)}},computeProperIntersectionIM:function(t,e){var n=this._arg[0].getGeometry().getDimension(),i=this._arg[1].getGeometry().getDimension(),r=t.hasProperIntersection(),s=t.hasProperInteriorIntersection();2===n&&2===i?r&&e.setAtLeast("212101212"):2===n&&1===i?(r&&e.setAtLeast("FFF0FFFF2"),s&&e.setAtLeast("1FFFFF1FF")):1===n&&2===i?(r&&e.setAtLeast("F0FFFFFF2"),s&&e.setAtLeast("1F1FFFFFF")):1===n&&1===i&&s&&e.setAtLeast("0FFFFFFFF")},labelIsolatedEdges:function(t,e){for(var n=this._arg[t].getEdgeIterator();n.hasNext();){var i=n.next();i.isIsolated()&&(this.labelIsolatedEdge(i,e,this._arg[e].getGeometry()),this._isolatedEdges.add(i))}},labelIsolatedEdge:function(t,e,n){if(n.getDimension()>0){var i=this._ptLocator.locate(t.getCoordinate(),n);t.getLabel().setAllLocations(e,i)}else t.getLabel().setAllLocations(e,de.EXTERIOR)},computeIM:function(){var t=new _e;if(t.set(de.EXTERIOR,de.EXTERIOR,2),!this._arg[0].getGeometry().getEnvelopeInternal().intersects(this._arg[1].getGeometry().getEnvelopeInternal()))return this.computeDisjointIM(t),t;this._arg[0].computeSelfNodes(this._li,!1),this._arg[1].computeSelfNodes(this._li,!1);var e=this._arg[0].computeEdgeIntersections(this._arg[1],this._li,!1);this.computeIntersectionNodes(0),this.computeIntersectionNodes(1),this.copyNodesAndLabels(0),this.copyNodesAndLabels(1),this.labelIsolatedNodes(),this.computeProperIntersectionIM(e,t);var n=new Cs,i=n.computeEdgeEnds(this._arg[0].getEdgeIterator());this.insertEdgeEnds(i);var r=n.computeEdgeEnds(this._arg[1].getEdgeIterator());return this.insertEdgeEnds(r),this.labelNodeEdges(),this.labelIsolatedEdges(0,1),this.labelIsolatedEdges(1,0),this.updateIM(t),t},labelNodeEdges:function(){for(var t=this._nodes.iterator();t.hasNext();){t.next().getEdges().computeLabelling(this._arg)}},copyNodesAndLabels:function(t){for(var e=this._arg[t].getNodeIterator();e.hasNext();){var n=e.next();this._nodes.addNode(n.getCoordinate()).setLabel(t,n.getLabel().getLocation(t))}},labelIntersectionNodes:function(t){for(var e=this._arg[t].getEdgeIterator();e.hasNext();)for(var n=e.next(),i=n.getLabel().getLocation(t),r=n.getEdgeIntersectionList().iterator();r.hasNext();){var s=r.next(),o=this._nodes.find(s.coord);o.getLabel().isNull(t)&&(i===de.BOUNDARY?o.setLabelBoundary(t):o.setLabel(t,de.INTERIOR))}},labelIsolatedNode:function(t,e){var n=this._ptLocator.locate(t.getCoordinate(),this._arg[e].getGeometry());t.getLabel().setAllLocations(e,n)},computeIntersectionNodes:function(t){for(var e=this._arg[t].getEdgeIterator();e.hasNext();)for(var n=e.next(),i=n.getLabel().getLocation(t),r=n.getEdgeIntersectionList().iterator();r.hasNext();){var s=r.next(),o=this._nodes.addNode(s.coord);i===de.BOUNDARY?o.setLabelBoundary(t):o.getLabel().isNull(t)&&o.setLabel(t,de.INTERIOR)}},labelIsolatedNodes:function(){for(var t=this._nodes.iterator();t.hasNext();){var e=t.next(),n=e.getLabel();x.isTrue(n.getGeometryCount()>0,"node with empty label found"),e.isIsolated()&&(n.isNull(0)?this.labelIsolatedNode(e,0):this.labelIsolatedNode(e,1))}},updateIM:function(t){for(var e=this._isolatedEdges.iterator();e.hasNext();){e.next().updateIM(t)}for(var n=this._nodes.iterator();n.hasNext();){var i=n.next();i.updateIM(t),i.updateIMFromEdges(t)}},computeDisjointIM:function(t){var e=this._arg[0].getGeometry();e.isEmpty()||(t.set(de.INTERIOR,de.EXTERIOR,e.getDimension()),t.set(de.BOUNDARY,de.EXTERIOR,e.getBoundaryDimension()));var n=this._arg[1].getGeometry();n.isEmpty()||(t.set(de.EXTERIOR,de.INTERIOR,n.getDimension()),t.set(de.EXTERIOR,de.BOUNDARY,n.getBoundaryDimension()))},interfaces_:function(){return[]},getClass:function(){return Ts}}),e(Ps.prototype,{isContainedInBoundary:function(t){if(t instanceof Vt)return!1;if(t instanceof Gt)return this.isPointContainedInBoundary(t);if(t instanceof At)return this.isLineStringContainedInBoundary(t);for(var e=0;e<t.getNumGeometries();e++){var n=t.getGeometryN(e);if(!this.isContainedInBoundary(n))return!1}return!0},isLineSegmentContainedInBoundary:function(t,e){if(t.equals(e))return this.isPointContainedInBoundary(t);if(t.x===e.x){if(t.x===this._rectEnv.getMinX()||t.x===this._rectEnv.getMaxX())return!0}else if(t.y===e.y&&(t.y===this._rectEnv.getMinY()||t.y===this._rectEnv.getMaxY()))return!0;return!1},isLineStringContainedInBoundary:function(t){for(var e=t.getCoordinateSequence(),n=new E,i=new E,r=0;r<e.size()-1;r++)if(e.getCoordinate(r,n),e.getCoordinate(r+1,i),!this.isLineSegmentContainedInBoundary(n,i))return!1;return!0},isPointContainedInBoundary:function(){if(arguments[0]instanceof Gt){var t=arguments[0];return this.isPointContainedInBoundary(t.getCoordinate())}if(arguments[0]instanceof E){var e=arguments[0];return e.x===this._rectEnv.getMinX()||e.x===this._rectEnv.getMaxX()||e.y===this._rectEnv.getMinY()||e.y===this._rectEnv.getMaxY()}},contains:function(t){return!!this._rectEnv.contains(t.getEnvelopeInternal())&&!this.isContainedInBoundary(t)},interfaces_:function(){return[]},getClass:function(){return Ps}}),Ps.contains=function(t,e){return new Ps(t).contains(e)},e(Os.prototype,{intersects:function(t,e){var n=new M(t,e);if(!this._rectEnv.intersects(n))return!1;if(this._rectEnv.intersects(t))return!0;if(this._rectEnv.intersects(e))return!0;if(t.compareTo(e)>0){var i=t;t=e,e=i}var r=!1;return e.y>t.y&&(r=!0),r?this._li.computeIntersection(t,e,this._diagDown0,this._diagDown1):this._li.computeIntersection(t,e,this._diagUp0,this._diagUp1),!!this._li.hasIntersection()},interfaces_:function(){return[]},getClass:function(){return Os}}),e(bs.prototype,{applyTo:function(t){for(var e=0;e<t.getNumGeometries()&&!this._isDone;e++){var n=t.getGeometryN(e);if(n instanceof Lt)this.applyTo(n);else if(this.visit(n),this.isDone())return this._isDone=!0,null}},interfaces_:function(){return[]},getClass:function(){return bs}}),e(Ms.prototype,{intersects:function(t){if(!this._rectEnv.intersects(t.getEnvelopeInternal()))return!1;var e=new Ds(this._rectEnv);if(e.applyTo(t),e.intersects())return!0;var n=new As(this._rectangle);if(n.applyTo(t),n.containsPoint())return!0;var i=new Fs(this._rectangle);return i.applyTo(t),!!i.intersects()},interfaces_:function(){return[]},getClass:function(){return Ms}}),Ms.intersects=function(t,e){return new Ms(t).intersects(e)},v(Ds,bs),e(Ds.prototype,{isDone:function(){return!0===this._intersects},visit:function(t){var e=t.getEnvelopeInternal();return this._rectEnv.intersects(e)?this._rectEnv.contains(e)?(this._intersects=!0,null):e.getMinX()>=this._rectEnv.getMinX()&&e.getMaxX()<=this._rectEnv.getMaxX()?(this._intersects=!0,null):e.getMinY()>=this._rectEnv.getMinY()&&e.getMaxY()<=this._rectEnv.getMaxY()?(this._intersects=!0,null):void 0:null},intersects:function(){return this._intersects},interfaces_:function(){return[]},getClass:function(){return Ds}}),v(As,bs),e(As.prototype,{isDone:function(){return!0===this._containsPoint},visit:function(t){if(!(t instanceof Vt))return null;var e=t.getEnvelopeInternal();if(!this._rectEnv.intersects(e))return null;for(var n=new E,i=0;i<4;i++)if(this._rectSeq.getCoordinate(i,n),e.contains(n)&&Ve.containsPointInPolygon(n,t))return this._containsPoint=!0,null},containsPoint:function(){return this._containsPoint},interfaces_:function(){return[]},getClass:function(){return As}}),v(Fs,bs),e(Fs.prototype,{intersects:function(){return this._hasIntersection},isDone:function(){return!0===this._hasIntersection},visit:function(t){var e=t.getEnvelopeInternal();if(!this._rectEnv.intersects(e))return null;var n=be.getLines(t);this.checkIntersectionWithLineStrings(n)},checkIntersectionWithLineStrings:function(t){for(var e=t.iterator();e.hasNext();){var n=e.next();if(this.checkIntersectionWithSegments(n),this._hasIntersection)return null}},checkIntersectionWithSegments:function(t){for(var e=t.getCoordinateSequence(),n=1;n<e.size();n++)if(e.getCoordinate(n-1,this._p0),e.getCoordinate(n,this._p1),this._rectIntersector.intersects(this._p0,this._p1))return this._hasIntersection=!0,null},interfaces_:function(){return[]},getClass:function(){return Fs}}),v(Gs,gs),e(Gs.prototype,{getIntersectionMatrix:function(){return this._relate.computeIM()},interfaces_:function(){return[]},getClass:function(){return Gs}}),Gs.covers=function(t,e){return!(2===e.getDimension()&&t.getDimension()<2)&&(!(1===e.getDimension()&&t.getDimension()<1&&e.getLength()>0)&&(!!t.getEnvelopeInternal().covers(e.getEnvelopeInternal())&&(!!t.isRectangle()||new Gs(t,e).getIntersectionMatrix().isCovers())))},Gs.intersects=function(t,e){if(!t.getEnvelopeInternal().intersects(e.getEnvelopeInternal()))return!1;if(t.isRectangle())return Ms.intersects(t,e);if(e.isRectangle())return Ms.intersects(e,t);if(t.isGeometryCollection()||e.isGeometryCollection()){for(var n=0;n<t.getNumGeometries();n++)for(var i=0;i<e.getNumGeometries();i++)if(t.getGeometryN(n).intersects(e.getGeometryN(i)))return!0;return!1}return new Gs(t,e).getIntersectionMatrix().isIntersects()},Gs.touches=function(t,e){return!!t.getEnvelopeInternal().intersects(e.getEnvelopeInternal())&&new Gs(t,e).getIntersectionMatrix().isTouches(t.getDimension(),e.getDimension())},Gs.relate=function(){return 2===arguments.length?new Gs(arguments[0],arguments[1]).getIntersectionMatrix():3===arguments.length?new Gs(arguments[0],arguments[1],arguments[2]).getIntersectionMatrix():void 0},Gs.overlaps=function(t,e){return!!t.getEnvelopeInternal().intersects(e.getEnvelopeInternal())&&new Gs(t,e).getIntersectionMatrix().isOverlaps(t.getDimension(),e.getDimension())},Gs.crosses=function(t,e){return!!t.getEnvelopeInternal().intersects(e.getEnvelopeInternal())&&new Gs(t,e).getIntersectionMatrix().isCrosses(t.getDimension(),e.getDimension())},Gs.contains=function(t,e){return!(2===e.getDimension()&&t.getDimension()<2)&&(!(1===e.getDimension()&&t.getDimension()<1&&e.getLength()>0)&&(!!t.getEnvelopeInternal().contains(e.getEnvelopeInternal())&&(t.isRectangle()?Ps.contains(t,e):new Gs(t,e).getIntersectionMatrix().isContains())))};var qs=Object.freeze({RelateOp:Gs});function Bs(){this._geomFactory=null,this._skipEmpty=!1,this._inputGeoms=null;var t=arguments[0];this._geomFactory=Bs.extractFactory(t),this._inputGeoms=t}function Vs(){this._pointGeom=null,this._otherGeom=null,this._geomFact=null;var t=arguments[0],e=arguments[1];this._pointGeom=t,this._otherGeom=e,this._geomFact=e.getFactory()}function zs(){this._geometryType=null,this._comps=null;var t=arguments[0],e=arguments[1];this._geometryType=t,this._comps=e}function Ys(){this._inputPolys=null,this._geomFactory=null;var t=arguments[0];this._inputPolys=t,null===this._inputPolys&&(this._inputPolys=new P)}function ks(){if(this._polygons=new P,this._lines=new P,this._points=new P,this._geomFact=null,1===arguments.length){if(N(arguments[0],S)){var t=arguments[0];this.extract(t)}else if(arguments[0]instanceof K){var e=arguments[0];this.extract(e)}}else if(2===arguments.length){var n=arguments[0],i=arguments[1];this._geomFact=i,this.extract(n)}}e(Bs.prototype,{extractElements:function(t,e){if(null===t)return null;for(var n=0;n<t.getNumGeometries();n++){var i=t.getGeometryN(n);this._skipEmpty&&i.isEmpty()||e.add(i)}},combine:function(){for(var t=new P,e=this._inputGeoms.iterator();e.hasNext();){var n=e.next();this.extractElements(n,t)}return 0===t.size()?null!==this._geomFactory?this._geomFactory.createGeometryCollection():null:this._geomFactory.buildGeometry(t)},interfaces_:function(){return[]},getClass:function(){return Bs}}),Bs.combine=function(){if(1===arguments.length)return new Bs(arguments[0]).combine();if(2===arguments.length){var t=arguments[0],e=arguments[1];return new Bs(Bs.createList(t,e)).combine()}if(3===arguments.length){var n=arguments[0],i=arguments[1],r=arguments[2];return new Bs(Bs.createList(n,i,r)).combine()}},Bs.extractFactory=function(t){return t.isEmpty()?null:t.iterator().next().getFactory()},Bs.createList=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1];return(n=new P).add(t),n.add(e),n}if(3===arguments.length){var n,i=arguments[0],r=arguments[1],s=arguments[2];return(n=new P).add(i),n.add(r),n.add(s),n}},e(Vs.prototype,{union:function(){for(var t=new Mn,e=new yt,n=0;n<this._pointGeom.getNumGeometries();n++){var i=this._pointGeom.getGeometryN(n).getCoordinate();t.locate(i,this._otherGeom)===de.EXTERIOR&&e.add(i)}if(0===e.size())return this._otherGeom;var r=null,s=nt.toCoordinateArray(e);return r=1===s.length?this._geomFact.createPoint(s[0]):this._geomFact.createMultiPointFromCoords(s),Bs.combine(r,this._otherGeom)},interfaces_:function(){return[]},getClass:function(){return Vs}}),Vs.union=function(t,e){return new Vs(t,e).union()},e(zs.prototype,{filter:function(t){(null===this._geometryType||zs.isOfType(t,this._geometryType))&&this._comps.add(t)},interfaces_:function(){return[Ct]},getClass:function(){return zs}}),zs.isOfType=function(t,e){return t.getGeometryType()===e||e===K.TYPENAME_LINESTRING&&t.getGeometryType()===K.TYPENAME_LINEARRING},zs.extract=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1];return zs.extract(t,e,new P)}if(3===arguments.length){if(N(arguments[2],w)&&arguments[0]instanceof K&&"string"==typeof arguments[1]){var n=arguments[0],i=arguments[1],r=arguments[2];return n.getGeometryType()===i?r.add(n):n instanceof Lt&&n.apply(new zs(i,r)),r}if(N(arguments[2],w)&&arguments[0]instanceof K&&arguments[1]instanceof Class){var s=arguments[0],o=arguments[1],a=arguments[2];return zs.extract(s,zs.toGeometryType(o),a)}}},e(Ys.prototype,{reduceToGeometries:function(t){for(var e=new P,n=t.iterator();n.hasNext();){var i=n.next(),r=null;N(i,w)?r=this.unionTree(i):i instanceof K&&(r=i),e.add(r)}return e},extractByEnvelope:function(t,e,n){for(var i=new P,r=0;r<e.getNumGeometries();r++){var s=e.getGeometryN(r);s.getEnvelopeInternal().intersects(t)?i.add(s):n.add(s)}return this._geomFactory.buildGeometry(i)},unionOptimized:function(t,e){var n=t.getEnvelopeInternal(),i=e.getEnvelopeInternal();if(!n.intersects(i))return Bs.combine(t,e);if(t.getNumGeometries()<=1&&e.getNumGeometries()<=1)return this.unionActual(t,e);var r=n.intersection(i);return this.unionUsingEnvelopeIntersection(t,e,r)},union:function(){if(null===this._inputPolys)throw new IllegalStateException("union() method cannot be called twice");if(this._inputPolys.isEmpty())return null;this._geomFactory=this._inputPolys.iterator().next().getFactory();for(var t=new Ci(Ys.STRTREE_NODE_CAPACITY),e=this._inputPolys.iterator();e.hasNext();){var n=e.next();t.insert(n.getEnvelopeInternal(),n)}this._inputPolys=null;var i=t.itemsTree();return this.unionTree(i)},binaryUnion:function(){if(1===arguments.length){var t=arguments[0];return this.binaryUnion(t,0,t.size())}if(3===arguments.length){var e=arguments[0],n=arguments[1],i=arguments[2];if(i-n<=1){var r=Ys.getGeometry(e,n);return this.unionSafe(r,null)}if(i-n==2)return this.unionSafe(Ys.getGeometry(e,n),Ys.getGeometry(e,n+1));var s=Math.trunc((i+n)/2),o=(r=this.binaryUnion(e,n,s),this.binaryUnion(e,s,i));return this.unionSafe(r,o)}},repeatedUnion:function(t){for(var e=null,n=t.iterator();n.hasNext();){var i=n.next();e=null===e?i.copy():e.union(i)}return e},unionSafe:function(t,e){return null===t&&null===e?null:null===t?e.copy():null===e?t.copy():this.unionOptimized(t,e)},unionActual:function(t,e){return Ys.restrictToPolygons(t.union(e))},unionTree:function(t){var e=this.reduceToGeometries(t);return this.binaryUnion(e)},unionUsingEnvelopeIntersection:function(t,e,n){var i=new P,r=this.extractByEnvelope(n,t,i),s=this.extractByEnvelope(n,e,i),o=this.unionActual(r,s);return i.add(o),Bs.combine(i)},bufferUnion:function(){if(1===arguments.length){var t=arguments[0];return t.get(0).getFactory().buildGeometry(t).buffer(0)}if(2===arguments.length){var e=arguments[0],n=arguments[1];return e.getFactory().createGeometryCollection([e,n]).buffer(0)}},interfaces_:function(){return[]},getClass:function(){return Ys}}),Ys.restrictToPolygons=function(t){if(N(t,Bt))return t;var e=br.getPolygons(t);return 1===e.size()?e.get(0):t.getFactory().createMultiPolygon(se.toPolygonArray(e))},Ys.getGeometry=function(t,e){return e>=t.size()?null:t.get(e)},Ys.union=function(t){return new Ys(t).union()},Ys.STRTREE_NODE_CAPACITY=4,e(ks.prototype,{unionNoOpt:function(t){var e=this._geomFact.createPoint();return fs.overlayOp(t,e,ds.UNION)},unionWithNull:function(t,e){return null===t&&null===e?null:null===e?t:null===t?e:t.union(e)},extract:function(){if(N(arguments[0],S))for(var t=arguments[0].iterator();t.hasNext();){var e=t.next();this.extract(e)}else if(arguments[0]instanceof K){var n=arguments[0];null===this._geomFact&&(this._geomFact=n.getFactory()),zs.extract(n,K.TYPENAME_POLYGON,this._polygons),zs.extract(n,K.TYPENAME_LINESTRING,this._lines),zs.extract(n,K.TYPENAME_POINT,this._points)}},union:function(){if(null===this._geomFact)return null;var t=null;if(this._points.size()>0){var e=this._geomFact.buildGeometry(this._points);t=this.unionNoOpt(e)}var n=null;if(this._lines.size()>0){var i=this._geomFact.buildGeometry(this._lines);n=this.unionNoOpt(i)}var r=null;this._polygons.size()>0&&(r=Ys.union(this._polygons));var s=this.unionWithNull(n,r),o=null;return o=null===t?s:null===s?t:Vs.union(t,s),null===o?this._geomFact.createGeometryCollection():o},interfaces_:function(){return[]},getClass:function(){return ks}}),ks.union=function(){if(1===arguments.length){if(N(arguments[0],S))return new ks(arguments[0]).union();if(arguments[0]instanceof K)return new ks(arguments[0]).union()}else if(2===arguments.length){return new ks(arguments[0],arguments[1]).union()}};var Us=Object.freeze({UnaryUnionOp:ks});function Xs(){this._geometryFactory=new se,this._geomGraph=null,this._disconnectedRingcoord=null;var t=arguments[0];this._geomGraph=t}function Hs(){this._nodes=new Zn(new Rs)}function Ws(){this._li=new fe,this._geomGraph=null,this._nodeGraph=new Hs,this._invalidPoint=null;var t=arguments[0];this._geomGraph=t}function js(){this._graph=null,this._rings=new P,this._totalEnv=new M,this._index=null,this._nestedPt=null;var t=arguments[0];this._graph=t}function Ks(){if(this._errorType=null,this._pt=null,1===arguments.length){var t=arguments[0];Ks.call(this,t,null)}else if(2===arguments.length){var e=arguments[0],n=arguments[1];this._errorType=e,null!==n&&(this._pt=n.copy())}}function Zs(){this._parentGeometry=null,this._isSelfTouchingRingFormingHoleValid=!1,this._validErr=null;var t=arguments[0];this._parentGeometry=t}e(Xs.prototype,{visitInteriorRing:function(t,e){var n=t.getCoordinates(),i=n[0],r=Xs.findDifferentPoint(n,i),s=e.findEdgeInSameDirection(i,r),o=e.findEdgeEnd(s),a=null;o.getLabel().getLocation(0,Dn.RIGHT)===de.INTERIOR?a=o:o.getSym().getLabel().getLocation(0,Dn.RIGHT)===de.INTERIOR&&(a=o.getSym()),x.isTrue(null!==a,"unable to find dirEdge with Interior on RHS"),this.visitLinkedDirectedEdges(a)},visitShellInteriors:function(t,e){if(t instanceof Vt){var n=t;this.visitInteriorRing(n.getExteriorRing(),e)}if(t instanceof kt)for(var i=t,r=0;r<i.getNumGeometries();r++){n=i.getGeometryN(r);this.visitInteriorRing(n.getExteriorRing(),e)}},getCoordinate:function(){return this._disconnectedRingcoord},setInteriorEdgesInResult:function(t){for(var e=t.getEdgeEnds().iterator();e.hasNext();){var n=e.next();n.getLabel().getLocation(0,Dn.RIGHT)===de.INTERIOR&&n.setInResult(!0)}},visitLinkedDirectedEdges:function(t){var e=t,n=t;do{x.isTrue(null!==n,"found null Directed Edge"),n.setVisited(!0),n=n.getNext()}while(n!==e)},buildEdgeRings:function(t){for(var e=new P,n=t.iterator();n.hasNext();){var i=n.next();if(i.isInResult()&&null===i.getEdgeRing()){var r=new ar(i,this._geometryFactory);r.linkDirectedEdgesForMinimalEdgeRings();var s=r.buildMinimalRings();e.addAll(s)}}return e},hasUnvisitedShellEdge:function(t){for(var e=0;e<t.size();e++){var n=t.get(e);if(!n.isHole()){var i=n.getEdges(),r=i.get(0);if(r.getLabel().getLocation(0,Dn.RIGHT)===de.INTERIOR)for(var s=0;s<i.size();s++)if(!(r=i.get(s)).isVisited())return this._disconnectedRingcoord=r.getCoordinate(),!0}}return!1},isInteriorsConnected:function(){var t=new P;this._geomGraph.computeSplitEdges(t);var e=new ei(new vr);e.addEdges(t),this.setInteriorEdgesInResult(e),e.linkResultDirectedEdges();var n=this.buildEdgeRings(e.getEdgeEnds());return this.visitShellInteriors(this._geomGraph.getGeometry(),e),!this.hasUnvisitedShellEdge(n)},interfaces_:function(){return[]},getClass:function(){return Xs}}),Xs.findDifferentPoint=function(t,e){for(var n=0;n<t.length;n++)if(!t[n].equals(e))return t[n];return null},e(Hs.prototype,{insertEdgeEnds:function(t){for(var e=t.iterator();e.hasNext();){var n=e.next();this._nodes.add(n)}},getNodeIterator:function(){return this._nodes.iterator()},copyNodesAndLabels:function(t,e){for(var n=t.getNodeIterator();n.hasNext();){var i=n.next();this._nodes.addNode(i.getCoordinate()).setLabel(e,i.getLabel().getLocation(e))}},build:function(t){this.computeIntersectionNodes(t,0),this.copyNodesAndLabels(t,0);var e=(new Cs).computeEdgeEnds(t.getEdgeIterator());this.insertEdgeEnds(e)},computeIntersectionNodes:function(t,e){for(var n=t.getEdgeIterator();n.hasNext();)for(var i=n.next(),r=i.getLabel().getLocation(e),s=i.getEdgeIntersectionList().iterator();s.hasNext();){var o=s.next(),a=this._nodes.addNode(o.coord);r===de.BOUNDARY?a.setLabelBoundary(e):a.getLabel().isNull(e)&&a.setLabel(e,de.INTERIOR)}},interfaces_:function(){return[]},getClass:function(){return Hs}}),e(Ws.prototype,{isNodeEdgeAreaLabelsConsistent:function(){for(var t=this._nodeGraph.getNodeIterator();t.hasNext();){var e=t.next();if(!e.getEdges().isAreaLabelsConsistent(this._geomGraph))return this._invalidPoint=e.getCoordinate().copy(),!1}return!0},getInvalidPoint:function(){return this._invalidPoint},hasDuplicateRings:function(){for(var t=this._nodeGraph.getNodeIterator();t.hasNext();)for(var e=t.next().getEdges().iterator();e.hasNext();){var n=e.next();if(n.getEdgeEnds().size()>1)return this._invalidPoint=n.getEdge().getCoordinate(0),!0}return!1},isNodeConsistentArea:function(){var t=this._geomGraph.computeSelfNodes(this._li,!0,!0);return t.hasProperIntersection()?(this._invalidPoint=t.getProperIntersectionPoint(),!1):(this._nodeGraph.build(this._geomGraph),this.isNodeEdgeAreaLabelsConsistent())},interfaces_:function(){return[]},getClass:function(){return Ws}}),e(js.prototype,{buildIndex:function(){this._index=new Ci;for(var t=0;t<this._rings.size();t++){var e=this._rings.get(t),n=e.getEnvelopeInternal();this._index.insert(n,e)}},getNestedPoint:function(){return this._nestedPt},isNonNested:function(){this.buildIndex();for(var t=0;t<this._rings.size();t++)for(var e=this._rings.get(t),n=e.getCoordinates(),i=this._index.query(e.getEnvelopeInternal()),r=0;r<i.size();r++){var s=i.get(r),o=s.getCoordinates();if(e!==s&&e.getEnvelopeInternal().intersects(s.getEnvelopeInternal())){var a=Zs.findPtNotNode(n,s,this._graph);if(null!==a)if(qe.isInRing(a,o))return this._nestedPt=a,!1}}return!0},add:function(t){this._rings.add(t),this._totalEnv.expandToInclude(t.getEnvelopeInternal())},interfaces_:function(){return[]},getClass:function(){return js}}),e(Ks.prototype,{getErrorType:function(){return this._errorType},getMessage:function(){return Ks.errMsg[this._errorType]},getCoordinate:function(){return this._pt},toString:function(){var t="";return null!==this._pt&&(t=" at or near point "+this._pt),this.getMessage()+t},interfaces_:function(){return[]},getClass:function(){return Ks}}),Ks.ERROR=0,Ks.REPEATED_POINT=1,Ks.HOLE_OUTSIDE_SHELL=2,Ks.NESTED_HOLES=3,Ks.DISCONNECTED_INTERIOR=4,Ks.SELF_INTERSECTION=5,Ks.RING_SELF_INTERSECTION=6,Ks.NESTED_SHELLS=7,Ks.DUPLICATE_RINGS=8,Ks.TOO_FEW_POINTS=9,Ks.INVALID_COORDINATE=10,Ks.RING_NOT_CLOSED=11,Ks.errMsg=["Topology Validation Error","Repeated Point","Hole lies outside shell","Holes are nested","Interior is disconnected","Self-intersection","Ring Self-intersection","Nested shells","Duplicate Rings","Too few distinct points in geometry component","Invalid Coordinate","Ring is not closed"],e(Zs.prototype,{checkInvalidCoordinates:function(){if(arguments[0]instanceof Array){for(var t=arguments[0],e=0;e<t.length;e++)if(!Zs.isValid(t[e]))return this._validErr=new Ks(Ks.INVALID_COORDINATE,t[e]),null}else if(arguments[0]instanceof Vt){var n=arguments[0];if(this.checkInvalidCoordinates(n.getExteriorRing().getCoordinates()),null!==this._validErr)return null;for(e=0;e<n.getNumInteriorRing();e++)if(this.checkInvalidCoordinates(n.getInteriorRingN(e).getCoordinates()),null!==this._validErr)return null}},checkHolesNotNested:function(t,e){for(var n=new js(e),i=0;i<t.getNumInteriorRing();i++){var r=t.getInteriorRingN(i);n.add(r)}n.isNonNested()||(this._validErr=new Ks(Ks.NESTED_HOLES,n.getNestedPoint()))},checkConsistentArea:function(t){var e=new Ws(t);if(!e.isNodeConsistentArea())return this._validErr=new Ks(Ks.SELF_INTERSECTION,e.getInvalidPoint()),null;e.hasDuplicateRings()&&(this._validErr=new Ks(Ks.DUPLICATE_RINGS,e.getInvalidPoint()))},isValid:function(){return this.checkValid(this._parentGeometry),null===this._validErr},checkShellInsideHole:function(t,e,n){var i=t.getCoordinates(),r=e.getCoordinates(),s=Zs.findPtNotNode(i,e,n);if(null!==s&&!qe.isInRing(s,r))return s;var o=Zs.findPtNotNode(r,t,n);return null!==o?qe.isInRing(o,i)?o:null:(x.shouldNeverReachHere("points in shell and hole appear to be equal"),null)},checkNoSelfIntersectingRings:function(t){for(var e=t.getEdgeIterator();e.hasNext();){var n=e.next();if(this.checkNoSelfIntersectingRing(n.getEdgeIntersectionList()),null!==this._validErr)return null}},checkConnectedInteriors:function(t){var e=new Xs(t);e.isInteriorsConnected()||(this._validErr=new Ks(Ks.DISCONNECTED_INTERIOR,e.getCoordinate()))},checkNoSelfIntersectingRing:function(t){for(var e=new yt,n=!0,i=t.iterator();i.hasNext();){var r=i.next();if(n)n=!1;else{if(e.contains(r.coord))return this._validErr=new Ks(Ks.RING_SELF_INTERSECTION,r.coord),null;e.add(r.coord)}}},checkHolesInShell:function(t,e){for(var n=t.getExteriorRing(),i=new Ae(n),r=0;r<t.getNumInteriorRing();r++){var s=t.getInteriorRingN(r),o=Zs.findPtNotNode(s.getCoordinates(),n,e);if(null===o)return null;if(de.EXTERIOR===i.locate(o))return this._validErr=new Ks(Ks.HOLE_OUTSIDE_SHELL,o),null}},checkTooFewPoints:function(t){if(t.hasTooFewPoints())return this._validErr=new Ks(Ks.TOO_FEW_POINTS,t.getInvalidPoint()),null},getValidationError:function(){return this.checkValid(this._parentGeometry),this._validErr},checkValid:function(){if(arguments[0]instanceof Gt){var t=arguments[0];this.checkInvalidCoordinates(t.getCoordinates())}else if(arguments[0]instanceof zt){var e=arguments[0];this.checkInvalidCoordinates(e.getCoordinates())}else if(arguments[0]instanceof Yt){var n=arguments[0];if(this.checkInvalidCoordinates(n.getCoordinates()),null!==this._validErr)return null;if(this.checkClosedRing(n),null!==this._validErr)return null;var i=new ni(0,n);if(this.checkTooFewPoints(i),null!==this._validErr)return null;var r=new fe;i.computeSelfNodes(r,!0,!0),this.checkNoSelfIntersectingRings(i)}else if(arguments[0]instanceof At){var s=arguments[0];if(this.checkInvalidCoordinates(s.getCoordinates()),null!==this._validErr)return null;i=new ni(0,s);this.checkTooFewPoints(i)}else if(arguments[0]instanceof Vt){var o=arguments[0];if(this.checkInvalidCoordinates(o),null!==this._validErr)return null;if(this.checkClosedRings(o),null!==this._validErr)return null;i=new ni(0,o);if(this.checkTooFewPoints(i),null!==this._validErr)return null;if(this.checkConsistentArea(i),null!==this._validErr)return null;if(!this._isSelfTouchingRingFormingHoleValid&&(this.checkNoSelfIntersectingRings(i),null!==this._validErr))return null;if(this.checkHolesInShell(o,i),null!==this._validErr)return null;if(this.checkHolesNotNested(o,i),null!==this._validErr)return null;this.checkConnectedInteriors(i)}else if(arguments[0]instanceof kt){for(var a=arguments[0],u=0;u<a.getNumGeometries();u++){var l=a.getGeometryN(u);if(this.checkInvalidCoordinates(l),null!==this._validErr)return null;if(this.checkClosedRings(l),null!==this._validErr)return null}i=new ni(0,a);if(this.checkTooFewPoints(i),null!==this._validErr)return null;if(this.checkConsistentArea(i),null!==this._validErr)return null;if(!this._isSelfTouchingRingFormingHoleValid&&(this.checkNoSelfIntersectingRings(i),null!==this._validErr))return null;for(u=0;u<a.getNumGeometries();u++){l=a.getGeometryN(u);if(this.checkHolesInShell(l,i),null!==this._validErr)return null}for(u=0;u<a.getNumGeometries();u++){l=a.getGeometryN(u);if(this.checkHolesNotNested(l,i),null!==this._validErr)return null}if(this.checkShellsNotNested(a,i),null!==this._validErr)return null;this.checkConnectedInteriors(i)}else if(arguments[0]instanceof Lt){var h=arguments[0];for(u=0;u<h.getNumGeometries();u++){var c=h.getGeometryN(u);if(this.checkValid(c),null!==this._validErr)return null}}else if(arguments[0]instanceof K){var f=arguments[0];if(this._validErr=null,f.isEmpty())return null;if(f instanceof Gt)this.checkValid(f);else if(f instanceof zt)this.checkValid(f);else if(f instanceof Yt)this.checkValid(f);else if(f instanceof At)this.checkValid(f);else if(f instanceof Vt)this.checkValid(f);else if(f instanceof kt)this.checkValid(f);else{if(!(f instanceof Lt))throw new UnsupportedOperationException(f.getClass().getName());this.checkValid(f)}}},setSelfTouchingRingFormingHoleValid:function(t){this._isSelfTouchingRingFormingHoleValid=t},checkShellNotNested:function(t,e,n){var i=t.getCoordinates(),r=e.getExteriorRing(),s=r.getCoordinates(),o=Zs.findPtNotNode(i,r,n);if(null===o)return null;if(!qe.isInRing(o,s))return null;if(e.getNumInteriorRing()<=0)return this._validErr=new Ks(Ks.NESTED_SHELLS,o),null;for(var a=null,u=0;u<e.getNumInteriorRing();u++){var l=e.getInteriorRingN(u);if(null===(a=this.checkShellInsideHole(t,l,n)))return null}this._validErr=new Ks(Ks.NESTED_SHELLS,a)},checkClosedRings:function(t){if(this.checkClosedRing(t.getExteriorRing()),null!==this._validErr)return null;for(var e=0;e<t.getNumInteriorRing();e++)if(this.checkClosedRing(t.getInteriorRingN(e)),null!==this._validErr)return null},checkClosedRing:function(t){if(!t.isClosed()){var e=null;t.getNumPoints()>=1&&(e=t.getCoordinateN(0)),this._validErr=new Ks(Ks.RING_NOT_CLOSED,e)}},checkShellsNotNested:function(t,e){for(var n=0;n<t.getNumGeometries();n++)for(var i=t.getGeometryN(n).getExteriorRing(),r=0;r<t.getNumGeometries();r++)if(n!==r){var s=t.getGeometryN(r);if(this.checkShellNotNested(i,s,e),null!==this._validErr)return null}},interfaces_:function(){return[]},getClass:function(){return Zs}}),Zs.findPtNotNode=function(t,e,n){for(var i=n.findEdge(e).getEdgeIntersectionList(),r=0;r<t.length;r++){var s=t[r];if(!i.isIntersection(s))return s}return null},Zs.isValid=function(){if(arguments[0]instanceof K)return new Zs(arguments[0]).isValid();if(arguments[0]instanceof E){var t=arguments[0];return!s.isNaN(t.x)&&(!s.isInfinite(t.x)&&(!s.isNaN(t.y)&&!s.isInfinite(t.y)))}};var Qs=Object.freeze({IsValidOp:Zs,ConsistentAreaTester:Ws}),Js=Object.freeze({BoundaryOp:Rt,IsSimpleOp:$i,buffer:Or,distance:Gr,linemerge:Zr,overlay:_s,polygonize:Ns,relate:qs,union:Us,valid:Qs});function $s(){Ut.CoordinateOperation.apply(this),this._targetPM=null,this._removeCollapsed=!0;var t=arguments[0],e=arguments[1];this._targetPM=t,this._removeCollapsed=e}function to(){this._targetPM=null,this._removeCollapsed=!0,this._changePrecisionModel=!1,this._isPointwise=!1;var t=arguments[0];this._targetPM=t}v($s,Ut.CoordinateOperation),e($s.prototype,{edit:function(){if(2===arguments.length&&arguments[1]instanceof K&&arguments[0]instanceof Array){var t=arguments[0],e=arguments[1];if(0===t.length)return null;for(var n=new Array(t.length).fill(null),i=0;i<t.length;i++){var r=new E(t[i]);this._targetPM.makePrecise(r),n[i]=r}var s=new b(n,!1).toCoordinateArray(),o=0;e instanceof At&&(o=2),e instanceof Yt&&(o=4);var a=n;return this._removeCollapsed&&(a=null),s.length<o?a:s}return Ut.CoordinateOperation.prototype.edit.apply(this,arguments)},interfaces_:function(){return[]},getClass:function(){return $s}}),e(to.prototype,{fixPolygonalTopology:function(t){var e=t;this._changePrecisionModel||(e=this.changePM(t,this._targetPM));var n=Pr.bufferOp(e,0),i=n;return this._changePrecisionModel||(i=n.copy(),this.changePM(i,t.getPrecisionModel())),i},reducePointwise:function(t){var e=null;this._changePrecisionModel?e=new Ut(this.createFactory(t.getFactory(),this._targetPM)):e=new Ut;var n=this._removeCollapsed;return t.getDimension()>=2&&(n=!0),e.edit(t,new $s(this._targetPM,n))},changePM:function(t,e){return this.createEditor(t.getFactory(),e).edit(t,new Ut.NoOpGeometryOperation)},setRemoveCollapsedComponents:function(t){this._removeCollapsed=t},createFactory:function(t,e){return new se(e,t.getSRID(),t.getCoordinateSequenceFactory())},setChangePrecisionModel:function(t){this._changePrecisionModel=t},reduce:function(t){var e=this.reducePointwise(t);return this._isPointwise?e:N(e,Bt)?Zs.isValid(e)?e:this.fixPolygonalTopology(e):e},setPointwise:function(t){this._isPointwise=t},createEditor:function(t,e){return t.getPrecisionModel()===e?new Ut:new Ut(this.createFactory(t,e))},interfaces_:function(){return[]},getClass:function(){return to}}),to.reduce=function(t,e){return new to(e).reduce(t)},to.reducePointwise=function(t,e){var n=new to(e);return n.setPointwise(!0),n.reduce(t)};var eo=Object.freeze({GeometryPrecisionReducer:to});function no(){this._pts=null,this._usePt=null,this._distanceTolerance=null,this._seg=new ge;var t=arguments[0];this._pts=t}function io(){this._inputGeom=null,this._distanceTolerance=null,this._isEnsureValidTopology=!0;var t=arguments[0];this._inputGeom=t}function ro(){In.apply(this),this._isEnsureValidTopology=!0,this._distanceTolerance=null;var t=arguments[0],e=arguments[1];this._isEnsureValidTopology=t,this._distanceTolerance=e}function so(){if(this._parent=null,this._index=null,2===arguments.length){var t=arguments[0],e=arguments[1];so.call(this,t,e,null,-1)}else if(4===arguments.length){var n=arguments[0],i=arguments[1],r=arguments[2],s=arguments[3];ge.call(this,n,i),this._parent=r,this._index=s}}function oo(){if(this._parentLine=null,this._segs=null,this._resultSegs=new P,this._minimumSize=null,1===arguments.length){var t=arguments[0];oo.call(this,t,2)}else if(2===arguments.length){var e=arguments[0],n=arguments[1];this._parentLine=e,this._minimumSize=n,this.init()}}function ao(){this._index=new di}function uo(){this._querySeg=null,this._items=new P;var t=arguments[0];this._querySeg=t}function lo(){this._li=new fe,this._inputIndex=new ao,this._outputIndex=new ao,this._line=null,this._linePts=null,this._distanceTolerance=0;var t=arguments[0],e=arguments[1];this._inputIndex=t,this._outputIndex=e}function ho(){this._inputIndex=new ao,this._outputIndex=new ao,this._distanceTolerance=0}function co(){this._inputGeom=null,this._lineSimplifier=new ho,this._linestringMap=null;var t=arguments[0];this._inputGeom=t}function fo(){In.apply(this),this._linestringMap=null;var t=arguments[0];this._linestringMap=t}function go(){this.tps=null;var t=arguments[0];this.tps=t}e(no.prototype,{simplifySection:function(t,e){if(t+1===e)return null;this._seg.p0=this._pts[t],this._seg.p1=this._pts[e];for(var n=-1,i=t,r=t+1;r<e;r++){var s=this._seg.distance(this._pts[r]);s>n&&(n=s,i=r)}if(n<=this._distanceTolerance)for(r=t+1;r<e;r++)this._usePt[r]=!1;else this.simplifySection(t,i),this.simplifySection(i,e)},setDistanceTolerance:function(t){this._distanceTolerance=t},simplify:function(){this._usePt=new Array(this._pts.length).fill(null);for(var t=0;t<this._pts.length;t++)this._usePt[t]=!0;this.simplifySection(0,this._pts.length-1);var e=new b;for(t=0;t<this._pts.length;t++)this._usePt[t]&&e.add(new E(this._pts[t]));return e.toCoordinateArray()},interfaces_:function(){return[]},getClass:function(){return no}}),no.simplify=function(t,e){var n=new no(t);return n.setDistanceTolerance(e),n.simplify()},e(io.prototype,{setEnsureValid:function(t){this._isEnsureValidTopology=t},getResultGeometry:function(){return this._inputGeom.isEmpty()?this._inputGeom.copy():new ro(this._isEnsureValidTopology,this._distanceTolerance).transform(this._inputGeom)},setDistanceTolerance:function(t){if(t<0)throw new i("Tolerance must be non-negative");this._distanceTolerance=t},interfaces_:function(){return[]},getClass:function(){return io}}),io.simplify=function(t,e){var n=new io(t);return n.setDistanceTolerance(e),n.getResultGeometry()},v(ro,In),e(ro.prototype,{transformPolygon:function(t,e){if(t.isEmpty())return null;var n=In.prototype.transformPolygon.call(this,t,e);return e instanceof kt?n:this.createValidArea(n)},createValidArea:function(t){return this._isEnsureValidTopology?t.buffer(0):t},transformCoordinates:function(t,e){var n=t.toCoordinateArray(),i=null;return i=0===n.length?new Array(0).fill(null):no.simplify(n,this._distanceTolerance),this._factory.getCoordinateSequenceFactory().create(i)},transformMultiPolygon:function(t,e){var n=In.prototype.transformMultiPolygon.call(this,t,e);return this.createValidArea(n)},transformLinearRing:function(t,e){var n=e instanceof Vt,i=In.prototype.transformLinearRing.call(this,t,e);return!n||i instanceof Yt?i:null},interfaces_:function(){return[]},getClass:function(){return ro}}),io.DPTransformer=ro,v(so,ge),e(so.prototype,{getIndex:function(){return this._index},getParent:function(){return this._parent},interfaces_:function(){return[]},getClass:function(){return so}}),e(oo.prototype,{addToResult:function(t){this._resultSegs.add(t)},asLineString:function(){return this._parentLine.getFactory().createLineString(oo.extractCoordinates(this._resultSegs))},getResultSize:function(){var t=this._resultSegs.size();return 0===t?0:t+1},getParent:function(){return this._parentLine},getSegment:function(t){return this._segs[t]},getParentCoordinates:function(){return this._parentLine.getCoordinates()},getMinimumSize:function(){return this._minimumSize},asLinearRing:function(){return this._parentLine.getFactory().createLinearRing(oo.extractCoordinates(this._resultSegs))},getSegments:function(){return this._segs},init:function(){var t=this._parentLine.getCoordinates();this._segs=new Array(t.length-1).fill(null);for(var e=0;e<t.length-1;e++){var n=new so(t[e],t[e+1],this._parentLine,e);this._segs[e]=n}},getResultCoordinates:function(){return oo.extractCoordinates(this._resultSegs)},interfaces_:function(){return[]},getClass:function(){return oo}}),oo.extractCoordinates=function(t){for(var e=new Array(t.size()+1).fill(null),n=null,i=0;i<t.size();i++)n=t.get(i),e[i]=n.p0;return e[e.length-1]=n.p1,e},e(ao.prototype,{remove:function(t){this._index.remove(new M(t.p0,t.p1),t)},add:function(){if(arguments[0]instanceof oo)for(var t=arguments[0].getSegments(),e=0;e<t.length;e++){var n=t[e];this.add(n)}else if(arguments[0]instanceof ge){var i=arguments[0];this._index.insert(new M(i.p0,i.p1),i)}},query:function(t){var e=new M(t.p0,t.p1),n=new uo(t);return this._index.query(e,n),n.getItems()},interfaces_:function(){return[]},getClass:function(){return ao}}),e(uo.prototype,{visitItem:function(t){var e=t;M.intersects(e.p0,e.p1,this._querySeg.p0,this._querySeg.p1)&&this._items.add(t)},getItems:function(){return this._items},interfaces_:function(){return[Ce]},getClass:function(){return uo}}),e(lo.prototype,{flatten:function(t,e){var n=new ge(this._linePts[t],this._linePts[e]);return this.remove(this._line,t,e),this._outputIndex.add(n),n},hasBadIntersection:function(t,e,n){return!!this.hasBadOutputIntersection(n)||!!this.hasBadInputIntersection(t,e,n)},setDistanceTolerance:function(t){this._distanceTolerance=t},simplifySection:function(t,e,n){n+=1;var i=new Array(2).fill(null);if(t+1===e){var r=this._line.getSegment(t);return this._line.addToResult(r),null}var s=!0;this._line.getResultSize()<this._line.getMinimumSize()&&(n+1<this._line.getMinimumSize()&&(s=!1));var o=new Array(1).fill(null),a=this.findFurthestPoint(this._linePts,t,e,o);o[0]>this._distanceTolerance&&(s=!1);var u=new ge;if(u.p0=this._linePts[t],u.p1=this._linePts[e],i[0]=t,i[1]=e,this.hasBadIntersection(this._line,i,u)&&(s=!1),s){r=this.flatten(t,e);return this._line.addToResult(r),null}this.simplifySection(t,a,n),this.simplifySection(a,e,n)},hasBadOutputIntersection:function(t){for(var e=this._outputIndex.query(t).iterator();e.hasNext();){var n=e.next();if(this.hasInteriorIntersection(n,t))return!0}return!1},findFurthestPoint:function(t,e,n,i){var r=new ge;r.p0=t[e],r.p1=t[n];for(var s=-1,o=e,a=e+1;a<n;a++){var u=t[a],l=r.distance(u);l>s&&(s=l,o=a)}return i[0]=s,o},simplify:function(t){this._line=t,this._linePts=t.getParentCoordinates(),this.simplifySection(0,this._linePts.length-1,0)},remove:function(t,e,n){for(var i=e;i<n;i++){var r=t.getSegment(i);this._inputIndex.remove(r)}},hasInteriorIntersection:function(t,e){return this._li.computeIntersection(t.p0,t.p1,e.p0,e.p1),this._li.isInteriorIntersection()},hasBadInputIntersection:function(t,e,n){for(var i=this._inputIndex.query(n).iterator();i.hasNext();){var r=i.next();if(this.hasInteriorIntersection(r,n)){if(lo.isInLineSection(t,e,r))continue;return!0}}return!1},interfaces_:function(){return[]},getClass:function(){return lo}}),lo.isInLineSection=function(t,e,n){if(n.getParent()!==t.getParent())return!1;var i=n.getIndex();return i>=e[0]&&i<e[1]},e(ho.prototype,{setDistanceTolerance:function(t){this._distanceTolerance=t},simplify:function(t){for(var e=t.iterator();e.hasNext();)this._inputIndex.add(e.next());for(e=t.iterator();e.hasNext();){var n=new lo(this._inputIndex,this._outputIndex);n.setDistanceTolerance(this._distanceTolerance),n.simplify(e.next())}},interfaces_:function(){return[]},getClass:function(){return ho}}),e(co.prototype,{getResultGeometry:function(){return this._inputGeom.isEmpty()?this._inputGeom.copy():(this._linestringMap=new ne,this._inputGeom.apply(new go(this)),this._lineSimplifier.simplify(this._linestringMap.values()),new fo(this._linestringMap).transform(this._inputGeom))},setDistanceTolerance:function(t){if(t<0)throw new i("Tolerance must be non-negative");this._lineSimplifier.setDistanceTolerance(t)},interfaces_:function(){return[]},getClass:function(){return co}}),co.simplify=function(t,e){var n=new co(t);return n.setDistanceTolerance(e),n.getResultGeometry()},v(fo,In),e(fo.prototype,{transformCoordinates:function(t,e){if(0===t.size())return null;if(e instanceof At){var n=this._linestringMap.get(e);return this.createCoordinateSequence(n.getResultCoordinates())}return In.prototype.transformCoordinates.call(this,t,e)},interfaces_:function(){return[]},getClass:function(){return fo}}),e(go.prototype,{filter:function(t){if(t instanceof At){var e=t;if(e.isEmpty())return null;var n=new oo(e,e.isClosed()?4:2);this.tps._linestringMap.put(e,n)}},interfaces_:function(){return[j]},getClass:function(){return go}}),co.LineStringTransformer=fo,co.LineStringMapBuilderFilter=go;var _o=Object.freeze({DouglasPeuckerSimplifier:io,TopologyPreservingSimplifier:co});function po(){this._seg=null,this._segLen=null,this._splitPt=null,this._minimumLen=0;var t=arguments[0];this._seg=t,this._segLen=t.getLength()}function mo(){}function vo(){}function yo(){}function xo(){if(this._p=null,1===arguments.length){var t=arguments[0];this._p=new E(t)}else if(2===arguments.length){var e=arguments[0],n=arguments[1];this._p=new E(e,n)}else if(3===arguments.length){var i=arguments[0],r=arguments[1],s=arguments[2];this._p=new E(i,r,s)}}function Eo(){this._isOnConstraint=null,this._constraint=null;var t=arguments[0];xo.call(this,t)}function Io(){this._rot=null,this._vertex=null,this._next=null,this._data=null}function No(){this._subdiv=null,this._isUsingTolerance=!1;var t=arguments[0];this._subdiv=t,this._isUsingTolerance=t.getTolerance()>0}function Co(){}function So(){this._subdiv=null,this._lastEdge=null;var t=arguments[0];this._subdiv=t,this.init()}function Lo(){if(this._seg=null,1===arguments.length){if("string"==typeof arguments[0]){var t=arguments[0];m.call(this,t)}else if(arguments[0]instanceof ge){var e=arguments[0];m.call(this,"Locate failed to converge (at edge: "+e+").  Possible causes include invalid Subdivision topology or very close sites"),this._seg=new ge(e)}}else if(2===arguments.length){var n=arguments[0],i=arguments[1];m.call(this,Lo.msgWithSpatial(n,i)),this._seg=new ge(i)}}function wo(){}function Ro(){this._visitedKey=0,this._quadEdges=new P,this._startingEdge=null,this._tolerance=null,this._edgeCoincidenceTolerance=null,this._frameVertex=new Array(3).fill(null),this._frameEnv=null,this._locator=null,this._seg=new ge,this._triEdges=new Array(3).fill(null);var t=arguments[0],e=arguments[1];this._tolerance=e,this._edgeCoincidenceTolerance=e/Ro.EDGE_COINCIDENCE_TOL_FACTOR,this.createFrame(t),this._startingEdge=this.initSubdiv(),this._locator=new So(this)}function To(){}function Po(){this._triList=new P}function Oo(){this._triList=new P}function bo(){this._coordList=new b,this._triCoords=new P}function Mo(){if(this._ls=null,this._data=null,2===arguments.length){var t=arguments[0],e=arguments[1];this._ls=new ge(t,e)}else if(3===arguments.length){var n=arguments[0],i=arguments[1],r=arguments[2];this._ls=new ge(n,i),this._data=r}else if(6===arguments.length){var s=arguments[0],o=arguments[1],a=arguments[2],u=arguments[3],l=arguments[4],h=arguments[5];Mo.call(this,new E(s,o,a),new E(u,l,h))}else if(7===arguments.length){var c=arguments[0],f=arguments[1],g=arguments[2],d=arguments[3],_=arguments[4],p=arguments[5],m=arguments[6];Mo.call(this,new E(c,f,g),new E(d,_,p),m)}}function Do(){this._initialVertices=null,this._segVertices=null,this._segments=new P,this._subdiv=null,this._incDel=null,this._convexHull=null,this._splitFinder=new vo,this._kdt=null,this._vertexFactory=null,this._computeAreaEnv=null,this._splitPt=null,this._tolerance=null;var t=arguments[0],e=arguments[1];this._initialVertices=new P(t),this._tolerance=e,this._kdt=new oi(e)}function Ao(){this._siteCoords=null,this._tolerance=0,this._subdiv=null}function Fo(){this._siteCoords=null,this._constraintLines=null,this._tolerance=0,this._subdiv=null,this._constraintVertexMap=new pt}function Go(){this._siteCoords=null,this._tolerance=0,this._subdiv=null,this._clipEnv=null,this._diagramEnv=null}e(po.prototype,{splitAt:function(){if(1===arguments.length){var t=arguments[0],e=this._minimumLen/this._segLen;if(t.distance(this._seg.p0)<this._minimumLen)return this._splitPt=this._seg.pointAlong(e),null;if(t.distance(this._seg.p1)<this._minimumLen)return this._splitPt=po.pointAlongReverse(this._seg,e),null;this._splitPt=t}else if(2===arguments.length){var n=arguments[0],i=arguments[1],r=this.getConstrainedLength(n)/this._segLen;i.equals2D(this._seg.p0)?this._splitPt=this._seg.pointAlong(r):this._splitPt=po.pointAlongReverse(this._seg,r)}},setMinimumLength:function(t){this._minimumLen=t},getConstrainedLength:function(t){return t<this._minimumLen?this._minimumLen:t},getSplitPoint:function(){return this._splitPt},interfaces_:function(){return[]},getClass:function(){return po}}),po.pointAlongReverse=function(t,e){var n=new E;return n.x=t.p1.x-e*(t.p1.x-t.p0.x),n.y=t.p1.y-e*(t.p1.y-t.p0.y),n},e(mo.prototype,{findSplitPoint:function(t,e){},interfaces_:function(){return[]},getClass:function(){return mo}}),e(vo.prototype,{findSplitPoint:function(t,e){var n=t.getLineSegment(),i=n.getLength()/2,r=new po(n),s=vo.projectedSplitPoint(t,e),o=2*s.distance(e)*.8;return o>i&&(o=i),r.setMinimumLength(o),r.splitAt(s),r.getSplitPoint()},interfaces_:function(){return[mo]},getClass:function(){return vo}}),vo.projectedSplitPoint=function(t,e){return t.getLineSegment().project(e)},e(yo.prototype,{interfaces_:function(){return[]},getClass:function(){return yo}}),yo.triArea=function(t,e,n){return(e.x-t.x)*(n.y-t.y)-(e.y-t.y)*(n.x-t.x)},yo.isInCircleDDNormalized=function(t,e,n,i){var r=B.valueOf(t.x).selfSubtract(i.x),s=B.valueOf(t.y).selfSubtract(i.y),o=B.valueOf(e.x).selfSubtract(i.x),a=B.valueOf(e.y).selfSubtract(i.y),u=B.valueOf(n.x).selfSubtract(i.x),l=B.valueOf(n.y).selfSubtract(i.y),h=r.multiply(a).selfSubtract(o.multiply(s)),c=o.multiply(l).selfSubtract(u.multiply(a)),f=u.multiply(s).selfSubtract(r.multiply(l)),g=r.multiply(r).selfAdd(s.multiply(s)),d=o.multiply(o).selfAdd(a.multiply(a)),_=u.multiply(u).selfAdd(l.multiply(l));return g.selfMultiply(c).selfAdd(d.selfMultiply(f)).selfAdd(_.selfMultiply(h)).doubleValue()>0},yo.checkRobustInCircle=function(t,e,n,i){var r=yo.isInCircleNonRobust(t,e,n,i),s=yo.isInCircleDDSlow(t,e,n,i),o=yo.isInCircleCC(t,e,n,i),a=me.circumcentre(t,e,n);Y.out.println("p radius diff a = "+Math.abs(i.distance(a)-t.distance(a))/t.distance(a)),r===s&&r===o||(Y.out.println("inCircle robustness failure (double result = "+r+", DD result = "+s+", CC result = "+o+")"),Y.out.println(he.toLineString(new Kt([t,e,n,i]))),Y.out.println("Circumcentre = "+he.toPoint(a)+" radius = "+t.distance(a)),Y.out.println("p radius diff a = "+Math.abs(i.distance(a)/t.distance(a)-1)),Y.out.println("p radius diff b = "+Math.abs(i.distance(a)/e.distance(a)-1)),Y.out.println("p radius diff c = "+Math.abs(i.distance(a)/n.distance(a)-1)),Y.out.println())},yo.isInCircleDDFast=function(t,e,n,i){var r=B.sqr(t.x).selfAdd(B.sqr(t.y)).selfMultiply(yo.triAreaDDFast(e,n,i)),s=B.sqr(e.x).selfAdd(B.sqr(e.y)).selfMultiply(yo.triAreaDDFast(t,n,i)),o=B.sqr(n.x).selfAdd(B.sqr(n.y)).selfMultiply(yo.triAreaDDFast(t,e,i)),a=B.sqr(i.x).selfAdd(B.sqr(i.y)).selfMultiply(yo.triAreaDDFast(t,e,n));return r.selfSubtract(s).selfAdd(o).selfSubtract(a).doubleValue()>0},yo.isInCircleCC=function(t,e,n,i){var r=me.circumcentre(t,e,n),s=t.distance(r);return i.distance(r)-s<=0},yo.isInCircleNormalized=function(t,e,n,i){var r=t.x-i.x,s=t.y-i.y,o=e.x-i.x,a=e.y-i.y,u=n.x-i.x,l=n.y-i.y;return(r*r+s*s)*(o*l-u*a)+(o*o+a*a)*(u*s-r*l)+(u*u+l*l)*(r*a-o*s)>0},yo.isInCircleDDSlow=function(t,e,n,i){var r=B.valueOf(i.x),s=B.valueOf(i.y),o=B.valueOf(t.x),a=B.valueOf(t.y),u=B.valueOf(e.x),l=B.valueOf(e.y),h=B.valueOf(n.x),c=B.valueOf(n.y),f=o.multiply(o).add(a.multiply(a)).multiply(yo.triAreaDDSlow(u,l,h,c,r,s)),g=u.multiply(u).add(l.multiply(l)).multiply(yo.triAreaDDSlow(o,a,h,c,r,s)),d=h.multiply(h).add(c.multiply(c)).multiply(yo.triAreaDDSlow(o,a,u,l,r,s)),_=r.multiply(r).add(s.multiply(s)).multiply(yo.triAreaDDSlow(o,a,u,l,h,c));return f.subtract(g).add(d).subtract(_).doubleValue()>0},yo.isInCircleNonRobust=function(t,e,n,i){return(t.x*t.x+t.y*t.y)*yo.triArea(e,n,i)-(e.x*e.x+e.y*e.y)*yo.triArea(t,n,i)+(n.x*n.x+n.y*n.y)*yo.triArea(t,e,i)-(i.x*i.x+i.y*i.y)*yo.triArea(t,e,n)>0},yo.isInCircleRobust=function(t,e,n,i){return yo.isInCircleNormalized(t,e,n,i)},yo.triAreaDDSlow=function(t,e,n,i,r,s){return n.subtract(t).multiply(s.subtract(e)).subtract(i.subtract(e).multiply(r.subtract(t)))},yo.triAreaDDFast=function(t,e,n){var i=B.valueOf(e.x).selfSubtract(t.x).selfMultiply(B.valueOf(n.y).selfSubtract(t.y)),r=B.valueOf(e.y).selfSubtract(t.y).selfMultiply(B.valueOf(n.x).selfSubtract(t.x));return i.selfSubtract(r)},e(xo.prototype,{circleCenter:function(t,e){var n=new xo(this.getX(),this.getY()),i=new k(this.bisector(n,t),this.bisector(t,e)),r=null;try{r=new xo(i.getX(),i.getY())}catch(i){if(!(i instanceof A))throw i;Y.err.println("a: "+n+"  b: "+t+"  c: "+e),Y.err.println(i)}return r},dot:function(t){return this._p.x*t.getX()+this._p.y*t.getY()},magn:function(){return Math.sqrt(this._p.x*this._p.x+this._p.y*this._p.y)},getZ:function(){return this._p.z},bisector:function(t,e){var n=e.getX()-t.getX(),i=e.getY()-t.getY();return new k(new k(t.getX()+n/2,t.getY()+i/2,1),new k(t.getX()-i+n/2,t.getY()+n+i/2,1))},equals:function(){if(1===arguments.length){var t=arguments[0];return this._p.x===t.getX()&&this._p.y===t.getY()}if(2===arguments.length){var e=arguments[0],n=arguments[1];return this._p.distance(e.getCoordinate())<n}},getCoordinate:function(){return this._p},isInCircle:function(t,e,n){return yo.isInCircleRobust(t._p,e._p,n._p,this._p)},interpolateZValue:function(t,e,n){var i=t.getX(),r=t.getY(),s=e.getX()-i,o=n.getX()-i,a=e.getY()-r,u=n.getY()-r,l=s*u-o*a,h=this.getX()-i,c=this.getY()-r,f=(u*h-o*c)/l,g=(-a*h+s*c)/l;return t.getZ()+f*(e.getZ()-t.getZ())+g*(n.getZ()-t.getZ())},midPoint:function(t){return new xo((this._p.x+t.getX())/2,(this._p.y+t.getY())/2,(this._p.z+t.getZ())/2)},rightOf:function(t){return this.isCCW(t.dest(),t.orig())},isCCW:function(t,e){return(t._p.x-this._p.x)*(e._p.y-this._p.y)-(t._p.y-this._p.y)*(e._p.x-this._p.x)>0},getX:function(){return this._p.x},crossProduct:function(t){return this._p.x*t.getY()-this._p.y*t.getX()},setZ:function(t){this._p.z=t},times:function(t){return new xo(t*this._p.x,t*this._p.y)},cross:function(){return new xo(this._p.y,-this._p.x)},leftOf:function(t){return this.isCCW(t.orig(),t.dest())},toString:function(){return"POINT ("+this._p.x+" "+this._p.y+")"},sub:function(t){return new xo(this._p.x-t.getX(),this._p.y-t.getY())},getY:function(){return this._p.y},classify:function(t,e){var n=e.sub(t),i=this.sub(t),r=n.crossProduct(i);return r>0?xo.LEFT:r<0?xo.RIGHT:n.getX()*i.getX()<0||n.getY()*i.getY()<0?xo.BEHIND:n.magn()<i.magn()?xo.BEYOND:t.equals(this)?xo.ORIGIN:e.equals(this)?xo.DESTINATION:xo.BETWEEN},sum:function(t){return new xo(this._p.x+t.getX(),this._p.y+t.getY())},distance:function(t,e){return Math.sqrt(Math.pow(e.getX()-t.getX(),2)+Math.pow(e.getY()-t.getY(),2))},circumRadiusRatio:function(t,e){var n=this.circleCenter(t,e),i=this.distance(n,t),r=this.distance(this,t),s=this.distance(t,e);return s<r&&(r=s),(s=this.distance(e,this))<r&&(r=s),i/r},interfaces_:function(){return[]},getClass:function(){return xo}}),xo.interpolateZ=function(){if(3===arguments.length){var t=arguments[0],e=arguments[1],n=arguments[2],i=e.distance(n),r=t.distance(e),s=n.z-e.z;return e.z+s*(r/i)}if(4===arguments.length){var o=arguments[0],a=arguments[1],u=arguments[2],l=arguments[3],h=a.x,c=a.y,f=u.x-h,g=l.x-h,d=u.y-c,_=l.y-c,p=f*_-g*d,m=o.x-h,v=o.y-c,y=(_*m-g*v)/p,x=(-d*m+f*v)/p;return a.z+y*(u.z-a.z)+x*(l.z-a.z)}},xo.LEFT=0,xo.RIGHT=1,xo.BEYOND=2,xo.BEHIND=3,xo.BETWEEN=4,xo.ORIGIN=5,xo.DESTINATION=6,v(Eo,xo),e(Eo.prototype,{getConstraint:function(){return this._constraint},setOnConstraint:function(t){this._isOnConstraint=t},merge:function(t){t._isOnConstraint&&(this._isOnConstraint=!0,this._constraint=t._constraint)},isOnConstraint:function(){return this._isOnConstraint},setConstraint:function(t){this._isOnConstraint=!0,this._constraint=t},interfaces_:function(){return[]},getClass:function(){return Eo}}),e(Io.prototype,{equalsNonOriented:function(t){return!!this.equalsOriented(t)||!!this.equalsOriented(t.sym())},toLineSegment:function(){return new ge(this._vertex.getCoordinate(),this.dest().getCoordinate())},dest:function(){return this.sym().orig()},oNext:function(){return this._next},equalsOriented:function(t){return!(!this.orig().getCoordinate().equals2D(t.orig().getCoordinate())||!this.dest().getCoordinate().equals2D(t.dest().getCoordinate()))},dNext:function(){return this.sym().oNext().sym()},lPrev:function(){return this._next.sym()},rPrev:function(){return this.sym().oNext()},rot:function(){return this._rot},oPrev:function(){return this._rot._next._rot},sym:function(){return this._rot._rot},setOrig:function(t){this._vertex=t},lNext:function(){return this.invRot().oNext().rot()},getLength:function(){return this.orig().getCoordinate().distance(this.dest().getCoordinate())},invRot:function(){return this._rot.sym()},setDest:function(t){this.sym().setOrig(t)},setData:function(t){this._data=t},getData:function(){return this._data},delete:function(){this._rot=null},orig:function(){return this._vertex},rNext:function(){return this._rot._next.invRot()},toString:function(){var t=this._vertex.getCoordinate(),e=this.dest().getCoordinate();return he.toLineString(t,e)},isLive:function(){return null!==this._rot},getPrimary:function(){return this.orig().getCoordinate().compareTo(this.dest().getCoordinate())<=0?this:this.sym()},dPrev:function(){return this.invRot().oNext().invRot()},setNext:function(t){this._next=t},interfaces_:function(){return[]},getClass:function(){return Io}}),Io.makeEdge=function(t,e){var n=new Io,i=new Io,r=new Io,s=new Io;n._rot=i,i._rot=r,r._rot=s,s._rot=n,n.setNext(n),i.setNext(s),r.setNext(r),s.setNext(i);var o=n;return o.setOrig(t),o.setDest(e),o},Io.swap=function(t){var e=t.oPrev(),n=t.sym().oPrev();Io.splice(t,e),Io.splice(t.sym(),n),Io.splice(t,e.lNext()),Io.splice(t.sym(),n.lNext()),t.setOrig(e.dest()),t.setDest(n.dest())},Io.splice=function(t,e){var n=t.oNext().rot(),i=e.oNext().rot(),r=e.oNext(),s=t.oNext(),o=i.oNext(),a=n.oNext();t.setNext(r),e.setNext(s),n.setNext(o),i.setNext(a)},Io.connect=function(t,e){var n=Io.makeEdge(t.dest(),e.orig());return Io.splice(n,t.lNext()),Io.splice(n.sym(),e),n},e(No.prototype,{insertSite:function(t){var e=this._subdiv.locate(t);if(this._subdiv.isVertexOfEdge(e,t))return e;this._subdiv.isOnEdge(e,t.getCoordinate())&&(e=e.oPrev(),this._subdiv.delete(e.oNext()));var n=this._subdiv.makeEdge(e.orig(),t);Io.splice(n,e);var i=n;do{e=(n=this._subdiv.connect(e,n.sym())).oPrev()}while(e.lNext()!==i);for(;;){var r=e.oPrev();if(r.dest().rightOf(e)&&t.isInCircle(e.orig(),r.dest(),e.dest()))Io.swap(e),e=e.oPrev();else{if(e.oNext()===i)return n;e=e.oNext().lPrev()}}},insertSites:function(t){for(var e=t.iterator();e.hasNext();){var n=e.next();this.insertSite(n)}},interfaces_:function(){return[]},getClass:function(){return No}}),e(Co.prototype,{locate:function(t){},interfaces_:function(){return[]},getClass:function(){return Co}}),e(So.prototype,{init:function(){this._lastEdge=this.findEdge()},locate:function(t){this._lastEdge.isLive()||this.init();var e=this._subdiv.locateFromEdge(t,this._lastEdge);return this._lastEdge=e,e},findEdge:function(){return this._subdiv.getEdges().iterator().next()},interfaces_:function(){return[Co]},getClass:function(){return So}}),v(Lo,m),e(Lo.prototype,{getSegment:function(){return this._seg},interfaces_:function(){return[]},getClass:function(){return Lo}}),Lo.msgWithSpatial=function(t,e){return null!==e?t+" [ "+e+" ]":t},e(wo.prototype,{visit:function(t){},interfaces_:function(){return[]},getClass:function(){return wo}}),e(Ro.prototype,{getTriangleVertices:function(t){var e=new Oo;return this.visitTriangles(e,t),e.getTriangleVertices()},isFrameVertex:function(t){return!!t.equals(this._frameVertex[0])||(!!t.equals(this._frameVertex[1])||!!t.equals(this._frameVertex[2]))},isVertexOfEdge:function(t,e){return!(!e.equals(t.orig(),this._tolerance)&&!e.equals(t.dest(),this._tolerance))},connect:function(t,e){var n=Io.connect(t,e);return this._quadEdges.add(n),n},getVoronoiCellPolygon:function(t,e){var n=new P,i=t;do{var r=t.rot().orig().getCoordinate();n.add(r),t=t.oPrev()}while(t!==i);var s=new b;s.addAll(n,!1),s.closeRing(),s.size()<4&&(Y.out.println(s),s.add(s.get(s.size()-1),!0));var o=s.toCoordinateArray(),a=e.createPolygon(e.createLinearRing(o)),u=i.orig();return a.setUserData(u.getCoordinate()),a},setLocator:function(t){this._locator=t},initSubdiv:function(){var t=this.makeEdge(this._frameVertex[0],this._frameVertex[1]),e=this.makeEdge(this._frameVertex[1],this._frameVertex[2]);Io.splice(t.sym(),e);var n=this.makeEdge(this._frameVertex[2],this._frameVertex[0]);return Io.splice(e.sym(),n),Io.splice(n.sym(),t),t},isFrameBorderEdge:function(t){var e=new Array(3).fill(null);Ro.getTriangleEdges(t,e);var n=new Array(3).fill(null);Ro.getTriangleEdges(t.sym(),n);var i=t.lNext().dest();if(this.isFrameVertex(i))return!0;var r=t.sym().lNext().dest();return!!this.isFrameVertex(r)},makeEdge:function(t,e){var n=Io.makeEdge(t,e);return this._quadEdges.add(n),n},visitTriangles:function(t,e){this._visitedKey++;var n=new je;n.push(this._startingEdge);for(var i=new ut;!n.empty();){var r=n.pop();if(!i.contains(r)){var s=this.fetchTriangleToVisit(r,n,e,i);null!==s&&t.visit(s)}}},isFrameEdge:function(t){return!(!this.isFrameVertex(t.orig())&&!this.isFrameVertex(t.dest()))},isOnEdge:function(t,e){return this._seg.setCoordinates(t.orig().getCoordinate(),t.dest().getCoordinate()),this._seg.distance(e)<this._edgeCoincidenceTolerance},getEnvelope:function(){return new M(this._frameEnv)},createFrame:function(t){var e=t.getWidth(),n=t.getHeight(),i=0;i=e>n?10*e:10*n,this._frameVertex[0]=new xo((t.getMaxX()+t.getMinX())/2,t.getMaxY()+i),this._frameVertex[1]=new xo(t.getMinX()-i,t.getMinY()-i),this._frameVertex[2]=new xo(t.getMaxX()+i,t.getMinY()-i),this._frameEnv=new M(this._frameVertex[0].getCoordinate(),this._frameVertex[1].getCoordinate()),this._frameEnv.expandToInclude(this._frameVertex[2].getCoordinate())},getTriangleCoordinates:function(t){var e=new bo;return this.visitTriangles(e,t),e.getTriangles()},getVertices:function(t){for(var e=new ut,n=this._quadEdges.iterator();n.hasNext();){var i=n.next(),r=i.orig();!t&&this.isFrameVertex(r)||e.add(r);var s=i.dest();!t&&this.isFrameVertex(s)||e.add(s)}return e},fetchTriangleToVisit:function(t,e,n,i){var r=t,s=0,o=!1;do{this._triEdges[s]=r,this.isFrameEdge(r)&&(o=!0);var a=r.sym();i.contains(a)||e.push(a),i.add(r),s++,r=r.lNext()}while(r!==t);return o&&!n?null:this._triEdges},getEdges:function(){if(0===arguments.length)return this._quadEdges;if(1===arguments.length){for(var t=arguments[0],e=this.getPrimaryEdges(!1),n=new Array(e.size()).fill(null),i=0,r=e.iterator();r.hasNext();){var s=r.next();n[i++]=t.createLineString([s.orig().getCoordinate(),s.dest().getCoordinate()])}return t.createMultiLineString(n)}},getVertexUniqueEdges:function(t){for(var e=new P,n=new ut,i=this._quadEdges.iterator();i.hasNext();){var r=i.next(),s=r.orig();n.contains(s)||(n.add(s),!t&&this.isFrameVertex(s)||e.add(r));var o=r.sym(),a=o.orig();n.contains(a)||(n.add(a),!t&&this.isFrameVertex(a)||e.add(o))}return e},getTriangleEdges:function(t){var e=new Po;return this.visitTriangles(e,t),e.getTriangleEdges()},getPrimaryEdges:function(t){this._visitedKey++;var e=new P,n=new je;n.push(this._startingEdge);for(var i=new ut;!n.empty();){var r=n.pop();if(!i.contains(r)){var s=r.getPrimary();!t&&this.isFrameEdge(s)||e.add(s),n.push(r.oNext()),n.push(r.sym().oNext()),i.add(r),i.add(r.sym())}}return e},delete:function(t){Io.splice(t,t.oPrev()),Io.splice(t.sym(),t.sym().oPrev());var e=t.sym(),n=t.rot(),i=t.rot().sym();this._quadEdges.remove(t),this._quadEdges.remove(e),this._quadEdges.remove(n),this._quadEdges.remove(i),t.delete(),e.delete(),n.delete(),i.delete()},locateFromEdge:function(t,e){for(var n=0,i=this._quadEdges.size(),r=e;;){if(++n>i)throw new Lo(r.toLineSegment());if(t.equals(r.orig())||t.equals(r.dest()))break;if(t.rightOf(r))r=r.sym();else if(t.rightOf(r.oNext())){if(t.rightOf(r.dPrev()))break;r=r.dPrev()}else r=r.oNext()}return r},getTolerance:function(){return this._tolerance},getVoronoiCellPolygons:function(t){this.visitTriangles(new To,!0);for(var e=new P,n=this.getVertexUniqueEdges(!1).iterator();n.hasNext();){var i=n.next();e.add(this.getVoronoiCellPolygon(i,t))}return e},getVoronoiDiagram:function(t){var e=this.getVoronoiCellPolygons(t);return t.createGeometryCollection(se.toGeometryArray(e))},getTriangles:function(t){for(var e=this.getTriangleCoordinates(!1),n=new Array(e.size()).fill(null),i=0,r=e.iterator();r.hasNext();){var s=r.next();n[i++]=t.createPolygon(t.createLinearRing(s))}return t.createGeometryCollection(n)},insertSite:function(t){var e=this.locate(t);if(t.equals(e.orig(),this._tolerance)||t.equals(e.dest(),this._tolerance))return e;var n=this.makeEdge(e.orig(),t);Io.splice(n,e);var i=n;do{e=(n=this.connect(e,n.sym())).oPrev()}while(e.lNext()!==i);return i},locate:function(){if(1===arguments.length){if(arguments[0]instanceof xo){var t=arguments[0];return this._locator.locate(t)}if(arguments[0]instanceof E){var e=arguments[0];return this._locator.locate(new xo(e))}}else if(2===arguments.length){var n=arguments[0],i=arguments[1],r=this._locator.locate(new xo(n));if(null===r)return null;var s=r;r.dest().getCoordinate().equals2D(n)&&(s=r.sym());var o=s;do{if(o.dest().getCoordinate().equals2D(i))return o;o=o.oNext()}while(o!==s);return null}},interfaces_:function(){return[]},getClass:function(){return Ro}}),Ro.getTriangleEdges=function(t,e){if(e[0]=t,e[1]=e[0].lNext(),e[2]=e[1].lNext(),e[2].lNext()!==e[0])throw new i("Edges do not form a triangle")},e(To.prototype,{visit:function(t){for(var e=t[0].orig().getCoordinate(),n=t[1].orig().getCoordinate(),i=t[2].orig().getCoordinate(),r=new xo(me.circumcentre(e,n,i)),s=0;s<3;s++)t[s].rot().setOrig(r)},interfaces_:function(){return[wo]},getClass:function(){return To}}),e(Po.prototype,{getTriangleEdges:function(){return this._triList},visit:function(t){this._triList.add(t)},interfaces_:function(){return[wo]},getClass:function(){return Po}}),e(Oo.prototype,{visit:function(t){this._triList.add([t[0].orig(),t[1].orig(),t[2].orig()])},getTriangleVertices:function(){return this._triList},interfaces_:function(){return[wo]},getClass:function(){return Oo}}),e(bo.prototype,{checkTriangleSize:function(t){t.length>=2?he.toLineString(t[0],t[1]):t.length>=1&&he.toPoint(t[0])},visit:function(t){this._coordList.clear();for(var e=0;e<3;e++){var n=t[e].orig();this._coordList.add(n.getCoordinate())}if(this._coordList.size()>0){this._coordList.closeRing();var i=this._coordList.toCoordinateArray();if(4!==i.length)return null;this._triCoords.add(i)}},getTriangles:function(){return this._triCoords},interfaces_:function(){return[wo]},getClass:function(){return bo}}),Ro.TriangleCircumcentreVisitor=To,Ro.TriangleEdgesListVisitor=Po,Ro.TriangleVertexListVisitor=Oo,Ro.TriangleCoordinatesVisitor=bo,Ro.EDGE_COINCIDENCE_TOL_FACTOR=1e3,e(Mo.prototype,{getLineSegment:function(){return this._ls},getEndZ:function(){return this._ls.getCoordinate(1).z},getStartZ:function(){return this._ls.getCoordinate(0).z},intersection:function(t){return this._ls.intersection(t.getLineSegment())},getStart:function(){return this._ls.getCoordinate(0)},getEnd:function(){return this._ls.getCoordinate(1)},getEndY:function(){return this._ls.getCoordinate(1).y},getStartX:function(){return this._ls.getCoordinate(0).x},equalsTopo:function(t){return this._ls.equalsTopo(t.getLineSegment())},getStartY:function(){return this._ls.getCoordinate(0).y},setData:function(t){this._data=t},getData:function(){return this._data},getEndX:function(){return this._ls.getCoordinate(1).x},toString:function(){return this._ls.toString()},interfaces_:function(){return[]},getClass:function(){return Mo}}),e(Do.prototype,{getInitialVertices:function(){return this._initialVertices},getKDT:function(){return this._kdt},enforceConstraints:function(){this.addConstraintVertices();var t=0,e=0;do{e=this.enforceGabriel(this._segments),t++}while(e>0&&t<Do.MAX_SPLIT_ITER)},insertSites:function(t){for(var e=t.iterator();e.hasNext();){var n=e.next();this.insertSite(n)}},getVertexFactory:function(){return this._vertexFactory},getPointArray:function(){for(var t=new Array(this._initialVertices.size()+this._segVertices.size()).fill(null),e=0,n=this._initialVertices.iterator();n.hasNext();){var i=n.next();t[e++]=i.getCoordinate()}for(var r=this._segVertices.iterator();r.hasNext();){i=r.next();t[e++]=i.getCoordinate()}return t},setConstraints:function(t,e){this._segments=t,this._segVertices=e},computeConvexHull:function(){var t=new se,e=new Ze(this.getPointArray(),t);this._convexHull=e.getConvexHull()},addConstraintVertices:function(){this.computeConvexHull(),this.insertSites(this._segVertices)},findNonGabrielPoint:function(t){var e=t.getStart(),n=t.getEnd(),i=new E((e.x+n.x)/2,(e.y+n.y)/2),r=e.distance(i),o=new M(i);o.expandBy(r);for(var a=this._kdt.query(o),u=null,l=s.MAX_VALUE,h=a.iterator();h.hasNext();){var c=h.next().getCoordinate();if(!c.equals2D(e)&&!c.equals2D(n)){var f=i.distance(c);if(f<r){(null===u||f<l)&&(u=c,l=f)}}}return u},getConstraintSegments:function(){return this._segments},setSplitPointFinder:function(t){this._splitFinder=t},getConvexHull:function(){return this._convexHull},getTolerance:function(){return this._tolerance},enforceGabriel:function(t){for(var e=new P,n=0,i=new P,r=t.iterator();r.hasNext();){var s=r.next(),o=this.findNonGabrielPoint(s);if(null!==o){this._splitPt=this._splitFinder.findSplitPoint(s,o);var a=this.createVertex(this._splitPt,s);this.insertSite(a).getCoordinate().equals2D(this._splitPt);var u=new Mo(s.getStartX(),s.getStartY(),s.getStartZ(),a.getX(),a.getY(),a.getZ(),s.getData()),l=new Mo(a.getX(),a.getY(),a.getZ(),s.getEndX(),s.getEndY(),s.getEndZ(),s.getData());e.add(u),e.add(l),i.add(s),n+=1}}return t.removeAll(i),t.addAll(e),n},createVertex:function(){if(1===arguments.length){var t=arguments[0],e=null;return e=null!==this._vertexFactory?this._vertexFactory.createVertex(t,null):new Eo(t)}if(2===arguments.length){var n=arguments[0],i=arguments[1];e=null;return(e=null!==this._vertexFactory?this._vertexFactory.createVertex(n,i):new Eo(n)).setOnConstraint(!0),e}},getSubdivision:function(){return this._subdiv},computeBoundingBox:function(){var t=Do.computeVertexEnvelope(this._initialVertices),e=Do.computeVertexEnvelope(this._segVertices),n=new M(t);n.expandToInclude(e);var i=.2*n.getWidth(),r=.2*n.getHeight(),s=Math.max(i,r);this._computeAreaEnv=new M(n),this._computeAreaEnv.expandBy(s)},setVertexFactory:function(t){this._vertexFactory=t},formInitialDelaunay:function(){this.computeBoundingBox(),this._subdiv=new Ro(this._computeAreaEnv,this._tolerance),this._subdiv.setLocator(new So(this._subdiv)),this._incDel=new No(this._subdiv),this.insertSites(this._initialVertices)},insertSite:function(){if(arguments[0]instanceof Eo){var t=arguments[0],e=this._kdt.insert(t.getCoordinate(),t);if(e.isRepeated()){var n=e.getData();return n.merge(t),n}return this._incDel.insertSite(t),t}if(arguments[0]instanceof E){var i=arguments[0];this.insertSite(this.createVertex(i))}},interfaces_:function(){return[]},getClass:function(){return Do}}),Do.computeVertexEnvelope=function(t){for(var e=new M,n=t.iterator();n.hasNext();){var i=n.next();e.expandToInclude(i.getCoordinate())}return e},Do.MAX_SPLIT_ITER=99,e(Ao.prototype,{create:function(){if(null!==this._subdiv)return null;var t=Ao.envelope(this._siteCoords),e=Ao.toVertices(this._siteCoords);this._subdiv=new Ro(t,this._tolerance),new No(this._subdiv).insertSites(e)},setTolerance:function(t){this._tolerance=t},setSites:function(){if(arguments[0]instanceof K){var t=arguments[0];this._siteCoords=Ao.extractUniqueCoordinates(t)}else if(N(arguments[0],S)){var e=arguments[0];this._siteCoords=Ao.unique(nt.toCoordinateArray(e))}},getEdges:function(t){return this.create(),this._subdiv.getEdges(t)},getSubdivision:function(){return this.create(),this._subdiv},getTriangles:function(t){return this.create(),this._subdiv.getTriangles(t)},interfaces_:function(){return[]},getClass:function(){return Ao}}),Ao.extractUniqueCoordinates=function(t){if(null===t)return new b;var e=t.getCoordinates();return Ao.unique(e)},Ao.envelope=function(t){for(var e=new M,n=t.iterator();n.hasNext();){var i=n.next();e.expandToInclude(i)}return e},Ao.unique=function(t){var e=nt.copyDeep(t);return It.sort(e),new b(e,!1)},Ao.toVertices=function(t){for(var e=new P,n=t.iterator();n.hasNext();){var i=n.next();e.add(new xo(i))}return e},e(Fo.prototype,{createSiteVertices:function(t){for(var e=new P,n=t.iterator();n.hasNext();){var i=n.next();this._constraintVertexMap.containsKey(i)||e.add(new Eo(i))}return e},create:function(){if(null!==this._subdiv)return null;var t=Ao.envelope(this._siteCoords),e=new P;null!==this._constraintLines&&(t.expandToInclude(this._constraintLines.getEnvelopeInternal()),this.createVertices(this._constraintLines),e=Fo.createConstraintSegments(this._constraintLines));var n=new Do(this.createSiteVertices(this._siteCoords),this._tolerance);n.setConstraints(e,new P(this._constraintVertexMap.values())),n.formInitialDelaunay(),n.enforceConstraints(),this._subdiv=n.getSubdivision()},setTolerance:function(t){this._tolerance=t},setConstraints:function(t){this._constraintLines=t},setSites:function(t){this._siteCoords=Ao.extractUniqueCoordinates(t)},getEdges:function(t){return this.create(),this._subdiv.getEdges(t)},getSubdivision:function(){return this.create(),this._subdiv},getTriangles:function(t){return this.create(),this._subdiv.getTriangles(t)},createVertices:function(t){for(var e=t.getCoordinates(),n=0;n<e.length;n++){var i=new Eo(e[n]);this._constraintVertexMap.put(e[n],i)}},interfaces_:function(){return[]},getClass:function(){return Fo}}),Fo.createConstraintSegments=function(){if(1===arguments.length){for(var t=arguments[0],e=be.getLines(t),n=new P,i=e.iterator();i.hasNext();){var r=i.next();Fo.createConstraintSegments(r,n)}return n}if(2===arguments.length){var s=arguments[0],o=arguments[1],a=s.getCoordinates();for(i=1;i<a.length;i++)o.add(new Mo(a[i-1],a[i]))}},e(Go.prototype,{create:function(){if(null!==this._subdiv)return null;var t=Ao.envelope(this._siteCoords);this._diagramEnv=t;var e=Math.max(this._diagramEnv.getWidth(),this._diagramEnv.getHeight());this._diagramEnv.expandBy(e),null!==this._clipEnv&&this._diagramEnv.expandToInclude(this._clipEnv);var n=Ao.toVertices(this._siteCoords);this._subdiv=new Ro(t,this._tolerance),new No(this._subdiv).insertSites(n)},getDiagram:function(t){this.create();var e=this._subdiv.getVoronoiDiagram(t);return Go.clipGeometryCollection(e,this._diagramEnv)},setTolerance:function(t){this._tolerance=t},setSites:function(){if(arguments[0]instanceof K){var t=arguments[0];this._siteCoords=Ao.extractUniqueCoordinates(t)}else if(N(arguments[0],S)){var e=arguments[0];this._siteCoords=Ao.unique(nt.toCoordinateArray(e))}},setClipEnvelope:function(t){this._clipEnv=t},getSubdivision:function(){return this.create(),this._subdiv},interfaces_:function(){return[]},getClass:function(){return Go}}),Go.clipGeometryCollection=function(t,e){for(var n=t.getFactory().toGeometry(e),i=new P,r=0;r<t.getNumGeometries();r++){var s=t.getGeometryN(r),o=null;e.contains(s.getEnvelopeInternal())?o=s:e.intersects(s.getEnvelopeInternal())&&(o=n.intersection(s)).setUserData(s.getUserData()),null===o||o.isEmpty()||i.add(o)}return t.getFactory().createGeometryCollection(se.toGeometryArray(i))};var qo=Object.freeze({Vertex:xo}),Bo=Object.freeze({ConformingDelaunayTriangulationBuilder:Fo,DelaunayTriangulationBuilder:Ao,VoronoiDiagramBuilder:Go,quadedge:qo});function Vo(){if(this._componentIndex=0,this._segmentIndex=0,this._segmentFraction=0,0===arguments.length);else if(1===arguments.length){var t=arguments[0];this._componentIndex=t._componentIndex,this._segmentIndex=t._segmentIndex,this._segmentFraction=t._segmentFraction}else if(2===arguments.length){var e=arguments[0],n=arguments[1];Vo.call(this,0,e,n)}else if(3===arguments.length){var i=arguments[0],r=arguments[1],s=arguments[2];this._componentIndex=i,this._segmentIndex=r,this._segmentFraction=s,this.normalize()}else if(4===arguments.length){var o=arguments[0],a=arguments[1],u=arguments[2],l=arguments[3];this._componentIndex=o,this._segmentIndex=a,this._segmentFraction=u,l&&this.normalize()}}function zo(){if(this._linearGeom=null,this._numLines=null,this._currentLine=null,this._componentIndex=0,this._vertexIndex=0,1===arguments.length){var t=arguments[0];zo.call(this,t,0,0)}else if(2===arguments.length){var e=arguments[0],n=arguments[1];zo.call(this,e,n.getComponentIndex(),zo.segmentEndVertexIndex(n))}else if(3===arguments.length){var r=arguments[0],s=arguments[1],o=arguments[2];if(!N(r,mt))throw new i("Lineal geometry is required");this._linearGeom=r,this._numLines=r.getNumGeometries(),this._componentIndex=s,this._vertexIndex=o,this.loadCurrentLine()}}function Yo(){this._linearGeom=null;var t=arguments[0];this._linearGeom=t}function ko(){this._linearGeom=null;var t=arguments[0];this._linearGeom=t}function Uo(){this._geomFact=null,this._lines=new P,this._coordList=null,this._ignoreInvalidLines=!1,this._fixInvalidLines=!1,this._lastPt=null;var t=arguments[0];this._geomFact=t}function Xo(){this._line=null;var t=arguments[0];this._line=t}function Ho(){this._linearGeom=null;var t=arguments[0];this._linearGeom=t,this.checkGeometryType()}function Wo(){this._linearGeom=null;var t=arguments[0];this._linearGeom=t}function jo(){this._linearGeom=null;var t=arguments[0];this._linearGeom=t}function Ko(){this._linearGeom=null;var t=arguments[0];this._linearGeom=t}e(Vo.prototype,{getSegmentIndex:function(){return this._segmentIndex},getComponentIndex:function(){return this._componentIndex},isEndpoint:function(t){var e=t.getGeometryN(this._componentIndex).getNumPoints()-1;return this._segmentIndex>=e||this._segmentIndex===e&&this._segmentFraction>=1},isValid:function(t){if(this._componentIndex<0||this._componentIndex>=t.getNumGeometries())return!1;var e=t.getGeometryN(this._componentIndex);return!(this._segmentIndex<0||this._segmentIndex>e.getNumPoints())&&((this._segmentIndex!==e.getNumPoints()||0===this._segmentFraction)&&!(this._segmentFraction<0||this._segmentFraction>1))},normalize:function(){this._segmentFraction<0&&(this._segmentFraction=0),this._segmentFraction>1&&(this._segmentFraction=1),this._componentIndex<0&&(this._componentIndex=0,this._segmentIndex=0,this._segmentFraction=0),this._segmentIndex<0&&(this._segmentIndex=0,this._segmentFraction=0),1===this._segmentFraction&&(this._segmentFraction=0,this._segmentIndex+=1)},toLowest:function(t){var e=t.getGeometryN(this._componentIndex).getNumPoints()-1;return this._segmentIndex<e?this:new Vo(this._componentIndex,e,1,!1)},getCoordinate:function(t){var e=t.getGeometryN(this._componentIndex),n=e.getCoordinateN(this._segmentIndex);if(this._segmentIndex>=e.getNumPoints()-1)return n;var i=e.getCoordinateN(this._segmentIndex+1);return Vo.pointAlongSegmentByFraction(n,i,this._segmentFraction)},getSegmentFraction:function(){return this._segmentFraction},getSegment:function(t){var e=t.getGeometryN(this._componentIndex),n=e.getCoordinateN(this._segmentIndex);return this._segmentIndex>=e.getNumPoints()-1?new ge(e.getCoordinateN(e.getNumPoints()-2),n):new ge(n,e.getCoordinateN(this._segmentIndex+1))},clamp:function(t){if(this._componentIndex>=t.getNumGeometries())return this.setToEnd(t),null;if(this._segmentIndex>=t.getNumPoints()){var e=t.getGeometryN(this._componentIndex);this._segmentIndex=e.getNumPoints()-1,this._segmentFraction=1}},setToEnd:function(t){this._componentIndex=t.getNumGeometries()-1;var e=t.getGeometryN(this._componentIndex);this._segmentIndex=e.getNumPoints()-1,this._segmentFraction=1},compareTo:function(t){var e=t;return this._componentIndex<e._componentIndex?-1:this._componentIndex>e._componentIndex?1:this._segmentIndex<e._segmentIndex?-1:this._segmentIndex>e._segmentIndex?1:this._segmentFraction<e._segmentFraction?-1:this._segmentFraction>e._segmentFraction?1:0},copy:function(){return new Vo(this._componentIndex,this._segmentIndex,this._segmentFraction)},toString:function(){return"LinearLoc["+this._componentIndex+", "+this._segmentIndex+", "+this._segmentFraction+"]"},isOnSameSegment:function(t){return this._componentIndex===t._componentIndex&&(this._segmentIndex===t._segmentIndex||(t._segmentIndex-this._segmentIndex==1&&0===t._segmentFraction||this._segmentIndex-t._segmentIndex==1&&0===this._segmentFraction))},snapToVertex:function(t,e){if(this._segmentFraction<=0||this._segmentFraction>=1)return null;var n=this.getSegmentLength(t),i=this._segmentFraction*n,r=n-i;i<=r&&i<e?this._segmentFraction=0:r<=i&&r<e&&(this._segmentFraction=1)},compareLocationValues:function(t,e,n){return this._componentIndex<t?-1:this._componentIndex>t?1:this._segmentIndex<e?-1:this._segmentIndex>e?1:this._segmentFraction<n?-1:this._segmentFraction>n?1:0},getSegmentLength:function(t){var e=t.getGeometryN(this._componentIndex),n=this._segmentIndex;this._segmentIndex>=e.getNumPoints()-1&&(n=e.getNumPoints()-2);var i=e.getCoordinateN(n),r=e.getCoordinateN(n+1);return i.distance(r)},isVertex:function(){return this._segmentFraction<=0||this._segmentFraction>=1},interfaces_:function(){return[g]},getClass:function(){return Vo}}),Vo.getEndLocation=function(t){var e=new Vo;return e.setToEnd(t),e},Vo.pointAlongSegmentByFraction=function(t,e,n){return n<=0?t:n>=1?e:new E((e.x-t.x)*n+t.x,(e.y-t.y)*n+t.y,(e.z-t.z)*n+t.z)},Vo.compareLocationValues=function(t,e,n,i,r,s){return t<i?-1:t>i?1:e<r?-1:e>r?1:n<s?-1:n>s?1:0},e(zo.prototype,{getComponentIndex:function(){return this._componentIndex},getLine:function(){return this._currentLine},getVertexIndex:function(){return this._vertexIndex},getSegmentEnd:function(){return this._vertexIndex<this.getLine().getNumPoints()-1?this._currentLine.getCoordinateN(this._vertexIndex+1):null},next:function(){if(!this.hasNext())return null;this._vertexIndex++,this._vertexIndex>=this._currentLine.getNumPoints()&&(this._componentIndex++,this.loadCurrentLine(),this._vertexIndex=0)},loadCurrentLine:function(){if(this._componentIndex>=this._numLines)return this._currentLine=null,null;this._currentLine=this._linearGeom.getGeometryN(this._componentIndex)},getSegmentStart:function(){return this._currentLine.getCoordinateN(this._vertexIndex)},isEndOfLine:function(){return!(this._componentIndex>=this._numLines)&&!(this._vertexIndex<this._currentLine.getNumPoints()-1)},hasNext:function(){return!(this._componentIndex>=this._numLines)&&!(this._componentIndex===this._numLines-1&&this._vertexIndex>=this._currentLine.getNumPoints())},interfaces_:function(){return[]},getClass:function(){return zo}}),zo.segmentEndVertexIndex=function(t){return t.getSegmentFraction()>0?t.getSegmentIndex()+1:t.getSegmentIndex()},e(Yo.prototype,{indexOf:function(t){return this.indexOfFromStart(t,null)},indexOfFromStart:function(t,e){for(var n=s.MAX_VALUE,i=0,r=0,o=-1,a=new ge,u=new zo(this._linearGeom);u.hasNext();u.next())if(!u.isEndOfLine()){a.p0=u.getSegmentStart(),a.p1=u.getSegmentEnd();var l=a.distance(t),h=a.segmentFraction(t),c=u.getComponentIndex(),f=u.getVertexIndex();l<n&&(null===e||e.compareLocationValues(c,f,h)<0)&&(i=c,r=f,o=h,n=l)}return n===s.MAX_VALUE?new Vo(e):new Vo(i,r,o)},indexOfAfter:function(t,e){if(null===e)return this.indexOf(t);var n=Vo.getEndLocation(this._linearGeom);if(n.compareTo(e)<=0)return n;var i=this.indexOfFromStart(t,e);return x.isTrue(i.compareTo(e)>=0,"computed location is before specified minimum location"),i},interfaces_:function(){return[]},getClass:function(){return Yo}}),Yo.indexOf=function(t,e){return new Yo(t).indexOf(e)},Yo.indexOfAfter=function(t,e,n){return new Yo(t).indexOfAfter(e,n)},e(ko.prototype,{indicesOf:function(t){var e=t.getGeometryN(0).getCoordinateN(0),n=t.getGeometryN(t.getNumGeometries()-1),i=n.getCoordinateN(n.getNumPoints()-1),r=new Yo(this._linearGeom),s=new Array(2).fill(null);return s[0]=r.indexOf(e),0===t.getLength()?s[1]=s[0].copy():s[1]=r.indexOfAfter(i,s[0]),s},interfaces_:function(){return[]},getClass:function(){return ko}}),ko.indicesOf=function(t,e){return new ko(t).indicesOf(e)},e(Uo.prototype,{getGeometry:function(){return this.endLine(),this._geomFact.buildGeometry(this._lines)},getLastCoordinate:function(){return this._lastPt},endLine:function(){if(null===this._coordList)return null;if(this._ignoreInvalidLines&&this._coordList.size()<2)return this._coordList=null,null;var t=this._coordList.toCoordinateArray(),e=t;this._fixInvalidLines&&(e=this.validCoordinateSequence(t)),this._coordList=null;var n=null;try{n=this._geomFact.createLineString(e)}catch(t){if(!(t instanceof i))throw t;if(!this._ignoreInvalidLines)throw t}null!==n&&this._lines.add(n)},setFixInvalidLines:function(t){this._fixInvalidLines=t},add:function(){if(1===arguments.length){var t=arguments[0];this.add(t,!0)}else if(2===arguments.length){var e=arguments[0],n=arguments[1];null===this._coordList&&(this._coordList=new b),this._coordList.add(e,n),this._lastPt=e}},setIgnoreInvalidLines:function(t){this._ignoreInvalidLines=t},validCoordinateSequence:function(t){return t.length>=2?t:[t[0],t[0]]},interfaces_:function(){return[]},getClass:function(){return Uo}}),e(Xo.prototype,{computeLinear:function(t,e){var n=new Uo(this._line.getFactory());n.setFixInvalidLines(!0),t.isVertex()||n.add(t.getCoordinate(this._line));for(var i=new zo(this._line,t);i.hasNext()&&!(e.compareLocationValues(i.getComponentIndex(),i.getVertexIndex(),0)<0);i.next()){var r=i.getSegmentStart();n.add(r),i.isEndOfLine()&&n.endLine()}return e.isVertex()||n.add(e.getCoordinate(this._line)),n.getGeometry()},computeLine:function(t,e){var n=this._line.getCoordinates(),i=new b,r=t.getSegmentIndex();t.getSegmentFraction()>0&&(r+=1);var s=e.getSegmentIndex();1===e.getSegmentFraction()&&(s+=1),s>=n.length&&(s=n.length-1),t.isVertex()||i.add(t.getCoordinate(this._line));for(var o=r;o<=s;o++)i.add(n[o]);e.isVertex()||i.add(e.getCoordinate(this._line)),i.size()<=0&&i.add(t.getCoordinate(this._line));var a=i.toCoordinateArray();return a.length<=1&&(a=[a[0],a[0]]),this._line.getFactory().createLineString(a)},extract:function(t,e){return e.compareTo(t)<0?this.reverse(this.computeLinear(e,t)):this.computeLinear(t,e)},reverse:function(t){return t instanceof At?t.reverse():t instanceof wt?t.reverse():(x.shouldNeverReachHere("non-linear geometry encountered"),null)},interfaces_:function(){return[]},getClass:function(){return Xo}}),Xo.extract=function(t,e,n){return new Xo(t).extract(e,n)},e(Ho.prototype,{clampIndex:function(t){var e=t.copy();return e.clamp(this._linearGeom),e},project:function(t){return Yo.indexOf(this._linearGeom,t)},checkGeometryType:function(){if(!(this._linearGeom instanceof At||this._linearGeom instanceof wt))throw new i("Input geometry must be linear")},extractPoint:function(){if(1===arguments.length)return arguments[0].getCoordinate(this._linearGeom);if(2===arguments.length){var t=arguments[0],e=arguments[1],n=t.toLowest(this._linearGeom);return n.getSegment(this._linearGeom).pointAlongOffset(n.getSegmentFraction(),e)}},isValidIndex:function(t){return t.isValid(this._linearGeom)},getEndIndex:function(){return Vo.getEndLocation(this._linearGeom)},getStartIndex:function(){return new Vo},indexOfAfter:function(t,e){return Yo.indexOfAfter(this._linearGeom,t,e)},extractLine:function(t,e){return Xo.extract(this._linearGeom,t,e)},indexOf:function(t){return Yo.indexOf(this._linearGeom,t)},indicesOf:function(t){return ko.indicesOf(this._linearGeom,t)},interfaces_:function(){return[]},getClass:function(){return Ho}}),e(Wo.prototype,{indexOf:function(t){return this.indexOfFromStart(t,-1)},indexOfFromStart:function(t,e){for(var n=s.MAX_VALUE,i=e,r=0,o=new ge,a=new zo(this._linearGeom);a.hasNext();){if(!a.isEndOfLine()){o.p0=a.getSegmentStart(),o.p1=a.getSegmentEnd();var u=o.distance(t),l=this.segmentNearestMeasure(o,t,r);u<n&&l>e&&(i=l,n=u),r+=o.getLength()}a.next()}return i},indexOfAfter:function(t,e){if(e<0)return this.indexOf(t);var n=this._linearGeom.getLength();if(n<e)return n;var i=this.indexOfFromStart(t,e);return x.isTrue(i>=e,"computed index is before specified minimum index"),i},segmentNearestMeasure:function(t,e,n){var i=t.projectionFactor(e);return i<=0?n:i<=1?n+i*t.getLength():n+t.getLength()},interfaces_:function(){return[]},getClass:function(){return Wo}}),Wo.indexOf=function(t,e){return new Wo(t).indexOf(e)},Wo.indexOfAfter=function(t,e,n){return new Wo(t).indexOfAfter(e,n)},e(jo.prototype,{getLength:function(t){for(var e=0,n=new zo(this._linearGeom);n.hasNext();){if(!n.isEndOfLine()){var i=n.getSegmentStart(),r=n.getSegmentEnd().distance(i);if(t.getComponentIndex()===n.getComponentIndex()&&t.getSegmentIndex()===n.getVertexIndex())return e+r*t.getSegmentFraction();e+=r}n.next()}return e},resolveHigher:function(t){if(!t.isEndpoint(this._linearGeom))return t;var e=t.getComponentIndex();if(e>=this._linearGeom.getNumGeometries()-1)return t;do{e++}while(e<this._linearGeom.getNumGeometries()-1&&0===this._linearGeom.getGeometryN(e).getLength());return new Vo(e,0,0)},getLocation:function(){if(1===arguments.length){var t=arguments[0];return this.getLocation(t,!0)}if(2===arguments.length){var e=arguments[0],n=arguments[1],i=e;if(e<0)i=this._linearGeom.getLength()+e;var r=this.getLocationForward(i);return n?r:this.resolveHigher(r)}},getLocationForward:function(t){if(t<=0)return new Vo;for(var e=0,n=new zo(this._linearGeom);n.hasNext();){if(n.isEndOfLine()){if(e===t)return new Vo(n.getComponentIndex(),n.getVertexIndex(),0)}else{var i=n.getSegmentStart(),r=n.getSegmentEnd().distance(i);if(e+r>t){var s=(t-e)/r;return new Vo(n.getComponentIndex(),n.getVertexIndex(),s)}e+=r}n.next()}return Vo.getEndLocation(this._linearGeom)},interfaces_:function(){return[]},getClass:function(){return jo}}),jo.getLength=function(t,e){return new jo(t).getLength(e)},jo.getLocation=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1];return new jo(t).getLocation(e)}if(3===arguments.length){var n=arguments[0],i=arguments[1],r=arguments[2];return new jo(n).getLocation(i,r)}},e(Ko.prototype,{clampIndex:function(t){var e=this.positiveIndex(t),n=this.getStartIndex();if(e<n)return n;var i=this.getEndIndex();return e>i?i:e},locationOf:function(){if(1===arguments.length){var t=arguments[0];return jo.getLocation(this._linearGeom,t)}if(2===arguments.length){var e=arguments[0],n=arguments[1];return jo.getLocation(this._linearGeom,e,n)}},project:function(t){return Wo.indexOf(this._linearGeom,t)},positiveIndex:function(t){return t>=0?t:this._linearGeom.getLength()+t},extractPoint:function(){if(1===arguments.length){var t=arguments[0];return jo.getLocation(this._linearGeom,t).getCoordinate(this._linearGeom)}if(2===arguments.length){var e=arguments[0],n=arguments[1],i=jo.getLocation(this._linearGeom,e).toLowest(this._linearGeom);return i.getSegment(this._linearGeom).pointAlongOffset(i.getSegmentFraction(),n)}},isValidIndex:function(t){return t>=this.getStartIndex()&&t<=this.getEndIndex()},getEndIndex:function(){return this._linearGeom.getLength()},getStartIndex:function(){return 0},indexOfAfter:function(t,e){return Wo.indexOfAfter(this._linearGeom,t,e)},extractLine:function(t,e){new Ho(this._linearGeom);var n=this.clampIndex(t),i=this.clampIndex(e),r=n===i,s=this.locationOf(n,r),o=this.locationOf(i);return Xo.extract(this._linearGeom,s,o)},indexOf:function(t){return Wo.indexOf(this._linearGeom,t)},indicesOf:function(t){var e=ko.indicesOf(this._linearGeom,t);return[jo.getLength(this._linearGeom,e[0]),jo.getLength(this._linearGeom,e[1])]},interfaces_:function(){return[]},getClass:function(){return Ko}});var Zo=Object.freeze({LengthIndexedLine:Ko,LengthLocationMap:jo,LinearGeometryBuilder:Uo,LinearIterator:zo,LinearLocation:Vo,LocationIndexedLine:Ho});function Qo(){}e(Qo.prototype,{interfaces_:function(){return[]},getClass:function(){return Qo}}),Qo.union=function(t,e){if(t.isEmpty()||e.isEmpty()){if(t.isEmpty()&&e.isEmpty())return ds.createEmptyResult(ds.UNION,t,e,t.getFactory());if(t.isEmpty())return e.copy();if(e.isEmpty())return t.copy()}return t.checkNotGeometryCollection(t),t.checkNotGeometryCollection(e),fs.overlayOp(t,e,ds.UNION)},e(K.prototype,{equalsTopo:function(t){return!!this.getEnvelopeInternal().equals(t.getEnvelopeInternal())&&Gs.relate(this,t).isEquals(this.getDimension(),t.getDimension())},union:function(){if(0===arguments.length)return ks.union(this);if(1===arguments.length){var t=arguments[0];return Qo.union(this,t)}},isValid:function(){return Zs.isValid(this)},intersection:function(t){if(this.isEmpty()||t.isEmpty())return ds.createEmptyResult(ds.INTERSECTION,this,t,this._factory);if(this.isGeometryCollection()){var e=t;return es.map(this,{interfaces_:function(){return[MapOp]},map:function(t){return t.intersection(e)}})}return this.checkNotGeometryCollection(this),this.checkNotGeometryCollection(t),fs.overlayOp(this,t,ds.INTERSECTION)},covers:function(t){return Gs.covers(this,t)},coveredBy:function(t){return Gs.covers(t,this)},touches:function(t){return Gs.touches(this,t)},intersects:function(t){return Gs.intersects(this,t)},within:function(t){return Gs.within(this,t)},overlaps:function(t){return Gs.overlaps(this,t)},disjoint:function(t){return Gs.disjoint(this,t)},crosses:function(t){return Gs.crosses(this,t)},buffer:function(){if(1===arguments.length){var t=arguments[0];return Pr.bufferOp(this,t)}if(2===arguments.length){var e=arguments[0],n=arguments[1];return Pr.bufferOp(this,e,n)}if(3===arguments.length){var i=arguments[0],r=arguments[1],s=arguments[2];return Pr.bufferOp(this,i,r,s)}},convexHull:function(){return new Ze(this).getConvexHull()},relate:function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];if(1===arguments.length){var i=arguments[0];return Gs.relate(this,i)}if(2===arguments.length){var r=arguments[0],s=arguments[1];return Gs.relate(this,r).matches(s)}},getCentroid:function(){if(this.isEmpty())return this._factory.createPoint();var t=Xe.getCentroid(this);return this.createPointFromInternalCoord(t,this)},getInteriorPoint:function(){if(this.isEmpty())return this._factory.createPoint();var t=null,e=this.getDimension();if(0===e)t=new en(this).getInteriorPoint();else if(1===e){t=new tn(this).getInteriorPoint()}else{t=new Je(this).getInteriorPoint()}return this.createPointFromInternalCoord(t,this)},symDifference:function(t){if(this.isEmpty()||t.isEmpty()){if(this.isEmpty()&&t.isEmpty())return ds.createEmptyResult(ds.SYMDIFFERENCE,this,t,this._factory);if(this.isEmpty())return t.copy();if(t.isEmpty())return this.copy()}return this.checkNotGeometryCollection(this),this.checkNotGeometryCollection(t),fs.overlayOp(this,t,ds.SYMDIFFERENCE)},createPointFromInternalCoord:function(t,e){return e.getPrecisionModel().makePrecise(t),e.getFactory().createPoint(t)},toText:function(){return(new he).write(this)},toString:function(){this.toText()},contains:function(t){return Gs.contains(this,t)},difference:function(t){return this.isEmpty()?ds.createEmptyResult(ds.DIFFERENCE,this,t,this._factory):t.isEmpty()?this.copy():(this.checkNotGeometryCollection(this),this.checkNotGeometryCollection(t),fs.overlayOp(this,t,ds.DIFFERENCE))},isSimple:function(){return new $i(this).isSimple()},isWithinDistance:function(t,e){return!(this.getEnvelopeInternal().distance(t.getEnvelopeInternal())>e)&&Fr.isWithinDistance(this,t,e)},distance:function(t){return Fr.distance(this,t)},isEquivalentClass:function(t){return this.getClass()===t.getClass()}});t.version="1.6.0 (ac4d0f6)",t.algorithm=En,t.densify=Sn,t.dissolve=bn,t.geom=ve,t.geomgraph=ii,t.index=wi,t.io=Gi,t.noding=Ji,t.operation=Js,t.precision=eo,t.simplify=_o,t.triangulate=Bo,t.linearref=Zo,Object.defineProperty(t,"__esModule",{value:!0})});
//
//../pacotes/mobileesp/mdetect_compacto.js
function DetectaMobile(funcao){var isIphone=false;var isTierTablet=false;var isTierIphone=false;var isTierRichCss=false;var isTierGenericMobile=false;var engineWebKit="webkit";var deviceIphone="iphone";var deviceIpod="ipod";var deviceIpad="ipad";var deviceMacPpc="macintosh";var deviceAndroid="android";var deviceGoogleTV="googletv";var deviceXoom="xoom";var deviceNuvifone="nuvifone";var deviceSymbian="symbian";var deviceS60="series60";var deviceS70="series70";var deviceS80="series80";var deviceS90="series90";var deviceWinPhone7="windows phone os 7";var deviceWinMob="windows ce";var deviceWindows="windows";var deviceIeMob="iemobile";var devicePpc="ppc";var enginePie="wm5 pie";var deviceBB="blackberry";var vndRIM="vnd.rim";var deviceBBStorm="blackberry95";var deviceBBBold="blackberry97";var deviceBBTour="blackberry96";var deviceBBCurve="blackberry89";var deviceBBTorch="blackberry 98";var deviceBBPlaybook="playbook";var devicePalm="palm";var deviceWebOS="webos";var engineBlazer="blazer";var engineXiino="xiino";var deviceKindle="kindle";var vndwap="vnd.wap";var wml="wml";var deviceBrew="brew";var deviceDanger="danger";var deviceHiptop="hiptop";var devicePlaystation="playstation";var deviceNintendoDs="nitro";var deviceNintendo="nintendo";var deviceWii="wii";var deviceXbox="xbox";var deviceArchos="archos";var engineOpera="opera";var engineNetfront="netfront";var engineUpBrowser="up.browser";var engineOpenWeb="openweb";var deviceMidp="midp";var uplink="up.link";var engineTelecaQ='teleca q';var devicePda="pda";var mini="mini";var mobile="mobile";var mobi="mobi";var maemo="maemo";var maemoTablet="tablet";var linux="linux";var qtembedded="qt embedded";var mylocom2="com2";var manuSonyEricsson="sonyericsson";var manuericsson="ericsson";var manuSamsung1="sec-sgh";var manuSony="sony";var manuHtc="htc";var svcDocomo="docomo";var svcKddi="kddi";var svcVodafone="vodafone";var disUpdate="update";var uagent=navigator.userAgent.toLowerCase();function DetectIphone(){if(uagent.search(deviceIphone)>-1){if(DetectIpad()||DetectIpod())return false;else return true}else return false}function DetectIpod(){if(uagent.search(deviceIpod)>-1)return true;else return false}function DetectIpad(){if(uagent.search(deviceIpad)>-1&&DetectWebkit())return true;else return false}function DetectIphoneOrIpod(){if(uagent.search(deviceIphone)>-1||uagent.search(deviceIpod)>-1)return true;else return false}function DetectAndroid(){if(DetectAndroidTablet())return false;if(uagent.search(deviceAndroid)>-1)return true;else return false}function DetectAndroidTablet(){if(uagent.search(deviceXoom)>-1)return true;else return false}function DetectAndroidWebKit(){if(DetectAndroid()&&DetectWebkit())return true;else return false}function DetectGoogleTV(){if(uagent.search(deviceGoogleTV)>-1)return true;else return false}function DetectWebkit(){if(uagent.search(engineWebKit)>-1)return true;else return false}function DetectS60OssBrowser(){if(DetectWebkit()){if((uagent.search(deviceS60)>-1||uagent.search(deviceSymbian)>-1))return true;else return false}else return false}function DetectSymbianOS(){if(uagent.search(deviceSymbian)>-1||uagent.search(deviceS60)>-1||uagent.search(deviceS70)>-1||uagent.search(deviceS80)>-1||uagent.search(deviceS90)>-1)return true;else return false}function DetectWindowsPhone7(){if(uagent.search(deviceWinPhone7)>-1)return true;else return false}function DetectWindowsMobile(){if(DetectWindowsPhone7())return false;if(uagent.search(deviceWinMob)>-1||uagent.search(deviceIeMob)>-1||uagent.search(enginePie)>-1)return true;if((uagent.search(devicePpc)>-1)&&!(uagent.search(deviceMacPpc)>-1))return true;if(uagent.search(manuHtc)>-1&&uagent.search(deviceWindows)>-1)return true;else return false}function DetectBlackBerry(){if(uagent.search(deviceBB)>-1)return true;if(uagent.search(vndRIM)>-1)return true;else return false}function DetectBlackBerryTablet(){if(uagent.search(deviceBBPlaybook)>-1)return true;else return false}function DetectBlackBerryWebKit(){if(uagent.search(deviceBB)>-1&&uagent.search(engineWebKit)>-1)return true;else return false}function DetectBlackBerryTouch(){if((uagent.search(deviceBBStorm)>-1)||(uagent.search(deviceBBTorch)>-1))return true;else return false}function DetectBlackBerryHigh(){if(DetectBlackBerryWebKit())return false;if(DetectBlackBerry()){if(DetectBlackBerryTouch()||uagent.search(deviceBBBold)>-1||uagent.search(deviceBBTour)>-1||uagent.search(deviceBBCurve)>-1)return true;else return false}else return false}function DetectBlackBerryLow(){if(DetectBlackBerry()){if(DetectBlackBerryHigh())return false;else return true}else return false}function DetectPalmOS(){if(uagent.search(devicePalm)>-1||uagent.search(engineBlazer)>-1||uagent.search(engineXiino)>-1){if(DetectPalmWebOS())return false;else return true}else return false}function DetectPalmWebOS(){if(uagent.search(deviceWebOS)>-1)return true;else return false}function DetectGarminNuvifone(){if(uagent.search(deviceNuvifone)>-1)return true;else return false}function DetectSmartphone(){if(DetectIphoneOrIpod())return true;if(DetectS60OssBrowser())return true;if(DetectSymbianOS())return true;if(DetectWindowsMobile())return true;if(DetectWindowsPhone7())return true;if(DetectAndroid())return true;if(DetectBlackBerry())return true;if(DetectPalmWebOS())return true;if(DetectPalmOS())return true;if(DetectGarminNuvifone())return true;return false};function DetectArchos(){if(uagent.search(deviceArchos)>-1)return true;else return false}function DetectBrewDevice(){if(uagent.search(deviceBrew)>-1)return true;else return false}function DetectDangerHiptop(){if(uagent.search(deviceDanger)>-1||uagent.search(deviceHiptop)>-1)return true;else return false}function DetectMaemoTablet(){if(uagent.search(maemo)>-1)return true;if(uagent.search(maemoTablet)>-1&&uagent.search(linux)>-1)return true;else return false}function DetectSonyMylo(){if(uagent.search(manuSony)>-1){if(uagent.search(qtembedded)>-1||uagent.search(mylocom2)>-1)return true;else return false}else return false}function DetectOperaMobile(){if(uagent.search(engineOpera)>-1){if(uagent.search(mini)>-1||uagent.search(mobi)>-1)return true;else return false}else return false}function DetectSonyPlaystation(){if(uagent.search(devicePlaystation)>-1)return true;else return false};function DetectNintendo(){if(uagent.search(deviceNintendo)>-1||uagent.search(deviceWii)>-1||uagent.search(deviceNintendoDs)>-1)return true;else return false};function DetectXbox(){if(uagent.search(deviceXbox)>-1)return true;else return false};function DetectGameConsole(){if(DetectSonyPlaystation())return true;if(DetectNintendo())return true;if(DetectXbox())return true;else return false};function DetectKindle(){if(uagent.search(deviceKindle)>-1)return true;else return false}function DetectMobileQuick(){if(DetectIpad())return false;if(DetectSmartphone())return true;if(uagent.search(deviceMidp)>-1||DetectBrewDevice())return true;if(DetectOperaMobile())return true;if(uagent.search(engineNetfront)>-1)return true;if(uagent.search(engineUpBrowser)>-1)return true;if(uagent.search(engineOpenWeb)>-1)return true;if(DetectDangerHiptop())return true;if(DetectMaemoTablet())return true;if(DetectArchos())return true;if((uagent.search(devicePda)>-1)&&(uagent.search(disUpdate)<0))return true;if(uagent.search(mobile)>-1)return true;if(DetectKindle())return true;return false};function DetectMobileLong(){if(DetectMobileQuick())return true;if(DetectGameConsole())return true;if(DetectSonyMylo())return true;if(uagent.search(manuSamsung1)>-1||uagent.search(manuSonyEricsson)>-1||uagent.search(manuericsson)>-1)return true;if(uagent.search(svcDocomo)>-1)return true;if(uagent.search(svcKddi)>-1)return true;if(uagent.search(svcVodafone)>-1)return true;return false};function DetectTierTablet(){if(DetectIpad()||DetectAndroidTablet()||DetectBlackBerryTablet())return true;else return false};function DetectTierIphone(){if(DetectIphoneOrIpod())return true;if(DetectAndroid())return true;if(DetectAndroidWebKit())return true;if(DetectBlackBerryWebKit())return true;if(DetectPalmWebOS())return true;if(DetectGarminNuvifone())return true;if(DetectMaemoTablet())return true;else return false};function DetectTierRichCss(){if(DetectMobileQuick()){if(DetectTierIphone())return false;if(DetectWebkit())return true;if(DetectS60OssBrowser())return true;if(DetectBlackBerryHigh())return true;if(DetectWindowsPhone7())return true;if(DetectWindowsMobile())return true;if(uagent.search(engineTelecaQ)>-1)return true;else return false}else return false};function DetectTierOtherPhones(){if(DetectMobileLong()){if(DetectTierIphone())return false;if(DetectTierRichCss())return false;else return true}else return false};if(funcao=="DetectMobileLong"){return DetectMobileLong()}if(funcao=="DetectAndroidTablet"){return DetectAndroidTablet()}if(funcao=="DetectAndroid"){return DetectAndroid()}if(funcao=="DetectTierTablet"){return DetectTierTablet()}}
//
//compactados/proj4js.js
Proj4js={defaultDatum:'WGS84',transform:function(source,dest,point){if(!source.readyToUse||!dest.readyToUse){this.reportError("Proj4js initialization for "+source.srsCode+" not yet complete");return point}if((source.srsProjNumber=="900913"&&dest.datumCode!="WGS84")||(dest.srsProjNumber=="900913"&&source.datumCode!="WGS84")){var wgs84=Proj4js.WGS84;this.transform(source,wgs84,point);source=wgs84}if(source.projName=="longlat"){point.x*=Proj4js.common.D2R;point.y*=Proj4js.common.D2R}else{if(source.to_meter){point.x*=source.to_meter;point.y*=source.to_meter}source.inverse(point)}if(source.from_greenwich){point.x+=source.from_greenwich}point=this.datum_transform(source.datum,dest.datum,point);if(dest.from_greenwich){point.x-=dest.from_greenwich}if(dest.projName=="longlat"){point.x*=Proj4js.common.R2D;point.y*=Proj4js.common.R2D}else{dest.forward(point);if(dest.to_meter){point.x/=dest.to_meter;point.y/=dest.to_meter}}return point},datum_transform:function(source,dest,point){if(source.compare_datums(dest)){return point}if(source.datum_type==Proj4js.common.PJD_NODATUM||dest.datum_type==Proj4js.common.PJD_NODATUM){return point}if(source.datum_type==Proj4js.common.PJD_GRIDSHIFT){alert("ERROR: Grid shift transformations are not implemented yet.")}if(dest.datum_type==Proj4js.common.PJD_GRIDSHIFT){alert("ERROR: Grid shift transformations are not implemented yet.")}if(source.es!=dest.es||source.a!=dest.a||source.datum_type==Proj4js.common.PJD_3PARAM||source.datum_type==Proj4js.common.PJD_7PARAM||dest.datum_type==Proj4js.common.PJD_3PARAM||dest.datum_type==Proj4js.common.PJD_7PARAM){source.geodetic_to_geocentric(point);if(source.datum_type==Proj4js.common.PJD_3PARAM||source.datum_type==Proj4js.common.PJD_7PARAM){source.geocentric_to_wgs84(point)}if(dest.datum_type==Proj4js.common.PJD_3PARAM||dest.datum_type==Proj4js.common.PJD_7PARAM){dest.geocentric_from_wgs84(point)}dest.geocentric_to_geodetic(point)}if(dest.datum_type==Proj4js.common.PJD_GRIDSHIFT){alert("ERROR: Grid shift transformations are not implemented yet.")}return point},reportError:function(msg){},extend:function(destination,source){destination=destination||{};if(source){for(var property in source){var value=source[property];if(value!==undefined){destination[property]=value}}}return destination},Class:function(){var Class=function(){this.initialize.apply(this,arguments)};var extended={};var parent;for(var i=0;i<arguments.length;++i){if(typeof arguments[i]=="function"){parent=arguments[i].prototype}else{parent=arguments[i]}Proj4js.extend(extended,parent)}Class.prototype=extended;return Class},bind:function(func,object){var args=Array.prototype.slice.apply(arguments,[2]);return function(){var newArgs=args.concat(Array.prototype.slice.apply(arguments,[0]));return func.apply(object,newArgs)}},scriptName:"proj4js.js",defsLookupService:'http://spatialreference.org/ref',libPath:null,getScriptLocation:function(){if(this.libPath)return this.libPath;var scriptName=this.scriptName;var scriptNameLen=scriptName.length;var scripts=document.getElementsByTagName('script');for(var i=0;i<scripts.length;i++){var src=scripts[i].getAttribute('src');if(src){var index=src.lastIndexOf(scriptName);if((index>-1)&&(index+scriptNameLen==src.length)){this.libPath=src.slice(0,-scriptNameLen);break}}}return this.libPath||""},loadScript:function(url,onload,onfail,loadCheck){var script=document.createElement('script');script.defer=false;script.type="text/javascript";script.id=url;script.src=url;script.onload=onload;script.onerror=onfail;script.loadCheck=loadCheck;if(/MSIE/.test(navigator.userAgent)){script.onreadystatechange=this.checkReadyState}document.getElementsByTagName('head')[0].appendChild(script)},checkReadyState:function(){if(this.readyState=='loaded'){if(!this.loadCheck()){this.onerror()}else{this.onload()}}}};Proj4js.Proj=Proj4js.Class({readyToUse:false,title:null,projName:null,units:null,datum:null,initialize:function(srsCode){this.srsCodeInput=srsCode;if(srsCode.indexOf('urn:')==0){var urn=srsCode.split(':');if((urn[1]=='ogc'||urn[1]=='x-ogc')&&(urn[2]=='def')&&(urn[3]=='crs')&&urn.length==7){srsCode=urn[4]+':'+urn[6]}}else if(srsCode.indexOf('http://')==0){var url=srsCode.split('#');if(url[0].match(/epsg.org/)){srsCode='EPSG:'+url[1]}else if(url[0].match(/RIG.xml/)){srsCode='IGNF:'+url[1]}}this.srsCode=srsCode.toUpperCase();if(this.srsCode.indexOf("EPSG")==0){this.srsCode=this.srsCode;this.srsAuth='epsg';this.srsProjNumber=this.srsCode.substring(5)}else if(this.srsCode.indexOf("IGNF")==0){this.srsCode=this.srsCode;this.srsAuth='IGNF';this.srsProjNumber=this.srsCode.substring(5)}else if(this.srsCode.indexOf("CRS")==0){this.srsCode=this.srsCode;this.srsAuth='CRS';this.srsProjNumber=this.srsCode.substring(4)}else{this.srsAuth='';this.srsProjNumber=this.srsCode}this.loadProjDefinition()},loadProjDefinition:function(){if(Proj4js.defs[this.srsCode]){this.defsLoaded();return}var url=Proj4js.getScriptLocation()+'defs/'+this.srsAuth.toUpperCase()+this.srsProjNumber+'.js';Proj4js.loadScript(url,Proj4js.bind(this.defsLoaded,this),Proj4js.bind(this.loadFromService,this),Proj4js.bind(this.checkDefsLoaded,this))},loadFromService:function(){var url=Proj4js.defsLookupService+'/'+this.srsAuth+'/'+this.srsProjNumber+'/proj4js/';Proj4js.loadScript(url,Proj4js.bind(this.defsLoaded,this),Proj4js.bind(this.defsFailed,this),Proj4js.bind(this.checkDefsLoaded,this))},defsLoaded:function(){this.parseDefs();this.loadProjCode(this.projName)},checkDefsLoaded:function(){if(Proj4js.defs[this.srsCode]){return true}else{return false}},defsFailed:function(){Proj4js.reportError('failed to load projection definition for: '+this.srsCode);Proj4js.defs[this.srsCode]=Proj4js.defs['WGS84'];this.defsLoaded()},loadProjCode:function(projName){if(Proj4js.Proj[projName]){this.initTransforms();return}var url=Proj4js.getScriptLocation()+'projCode/'+projName+'.js';Proj4js.loadScript(url,Proj4js.bind(this.loadProjCodeSuccess,this,projName),Proj4js.bind(this.loadProjCodeFailure,this,projName),Proj4js.bind(this.checkCodeLoaded,this,projName))},loadProjCodeSuccess:function(projName){if(Proj4js.Proj[projName].dependsOn){this.loadProjCode(Proj4js.Proj[projName].dependsOn)}else{this.initTransforms()}},loadProjCodeFailure:function(projName){Proj4js.reportError("failed to find projection file for: "+projName)},checkCodeLoaded:function(projName){if(Proj4js.Proj[projName]){return true}else{return false}},initTransforms:function(){Proj4js.extend(this,Proj4js.Proj[this.projName]);this.init();this.readyToUse=true},parseDefs:function(){this.defData=Proj4js.defs[this.srsCode];var paramName,paramVal;if(!this.defData){return}var paramArray=this.defData.split("+");for(var prop=0;prop<paramArray.length;prop++){var property=paramArray[prop].split("=");paramName=property[0].toLowerCase();paramVal=property[1];switch(paramName.replace(/\s/gi,"")){case"":break;case"title":this.title=paramVal;break;case"proj":this.projName=paramVal.replace(/\s/gi,"");break;case"units":this.units=paramVal.replace(/\s/gi,"");break;case"datum":this.datumCode=paramVal.replace(/\s/gi,"");break;case"nadgrids":this.nagrids=paramVal.replace(/\s/gi,"");break;case"ellps":this.ellps=paramVal.replace(/\s/gi,"");break;case"a":this.a=parseFloat(paramVal);break;case"b":this.b=parseFloat(paramVal);break;case"rf":this.rf=parseFloat(paramVal);break;case"lat_0":this.lat0=paramVal*Proj4js.common.D2R;break;case"lat_1":this.lat1=paramVal*Proj4js.common.D2R;break;case"lat_2":this.lat2=paramVal*Proj4js.common.D2R;break;case"lat_ts":this.lat_ts=paramVal*Proj4js.common.D2R;break;case"lon_0":this.long0=paramVal*Proj4js.common.D2R;break;case"alpha":this.alpha=parseFloat(paramVal)*Proj4js.common.D2R;break;case"lonc":this.longc=paramVal*Proj4js.common.D2R;break;case"x_0":this.x0=parseFloat(paramVal);break;case"y_0":this.y0=parseFloat(paramVal);break;case"k_0":this.k0=parseFloat(paramVal);break;case"k":this.k0=parseFloat(paramVal);break;case"r_a":this.R_A=true;break;case"zone":this.zone=parseInt(paramVal);break;case"south":this.utmSouth=true;break;case"towgs84":this.datum_params=paramVal.split(",");break;case"to_meter":this.to_meter=parseFloat(paramVal);break;case"from_greenwich":this.from_greenwich=paramVal*Proj4js.common.D2R;break;case"pm":paramVal=paramVal.replace(/\s/gi,"");this.from_greenwich=Proj4js.PrimeMeridian[paramVal]?Proj4js.PrimeMeridian[paramVal]:parseFloat(paramVal);this.from_greenwich*=Proj4js.common.D2R;break;case"no_defs":break;default:}}this.deriveConstants()},deriveConstants:function(){if(this.nagrids=='@null')this.datumCode='none';if(this.datumCode&&this.datumCode!='none'){var datumDef=Proj4js.Datum[this.datumCode];if(datumDef){this.datum_params=datumDef.towgs84.split(',');this.ellps=datumDef.ellipse;this.datumName=datumDef.datumName?datumDef.datumName:this.datumCode}}if(!this.a){var ellipse=Proj4js.Ellipsoid[this.ellps]?Proj4js.Ellipsoid[this.ellps]:Proj4js.Ellipsoid['WGS84'];Proj4js.extend(this,ellipse)}if(this.rf&&!this.b)this.b=(1.0-1.0/this.rf)*this.a;if(Math.abs(this.a-this.b)<Proj4js.common.EPSLN){this.sphere=true;this.b=this.a}this.a2=this.a*this.a;this.b2=this.b*this.b;this.es=(this.a2-this.b2)/this.a2;this.e=Math.sqrt(this.es);if(this.R_A){this.a*=1.-this.es*(Proj4js.common.SIXTH+this.es*(Proj4js.common.RA4+this.es*Proj4js.common.RA6));this.a2=this.a*this.a;this.b2=this.b*this.b;this.es=0.}this.ep2=(this.a2-this.b2)/this.b2;if(!this.k0)this.k0=1.0;this.datum=new Proj4js.datum(this)}});Proj4js.Proj.longlat={init:function(){},forward:function(pt){return pt},inverse:function(pt){return pt}};Proj4js.defs={'WGS84':"+title=long/lat:WGS84 +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees",'EPSG:4326':"+title=long/lat:WGS84 +proj=longlat +a=6378137.0 +b=6356752.31424518 +ellps=WGS84 +datum=WGS84 +units=degrees",'EPSG:4269':"+title=long/lat:NAD83 +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees",'EPSG:3785':"+title= Google Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs"};Proj4js.defs['GOOGLE']=Proj4js.defs['EPSG:3785'];Proj4js.defs['EPSG:900913']=Proj4js.defs['EPSG:3785'];Proj4js.defs['EPSG:102113']=Proj4js.defs['EPSG:3785'];Proj4js.common={PI:3.141592653589793238,HALF_PI:1.570796326794896619,TWO_PI:6.283185307179586477,FORTPI:0.78539816339744833,R2D:57.29577951308232088,D2R:0.01745329251994329577,SEC_TO_RAD:4.84813681109535993589914102357e-6,EPSLN:1.0e-10,MAX_ITER:20,COS_67P5:0.38268343236508977,AD_C:1.0026000,PJD_UNKNOWN:0,PJD_3PARAM:1,PJD_7PARAM:2,PJD_GRIDSHIFT:3,PJD_WGS84:4,PJD_NODATUM:5,SRS_WGS84_SEMIMAJOR:6378137.0,SIXTH:.1666666666666666667,RA4:.04722222222222222222,RA6:.02215608465608465608,RV4:.06944444444444444444,RV6:.04243827160493827160,msfnz:function(eccent,sinphi,cosphi){var con=eccent*sinphi;return cosphi/(Math.sqrt(1.0-con*con))},tsfnz:function(eccent,phi,sinphi){var con=eccent*sinphi;var com=.5*eccent;con=Math.pow(((1.0-con)/(1.0+con)),com);return(Math.tan(.5*(this.HALF_PI-phi))/con)},phi2z:function(eccent,ts){var eccnth=.5*eccent;var con,dphi;var phi=this.HALF_PI-2*Math.atan(ts);for(i=0;i<=15;i++){con=eccent*Math.sin(phi);dphi=this.HALF_PI-2*Math.atan(ts*(Math.pow(((1.0-con)/(1.0+con)),eccnth)))-phi;phi+=dphi;if(Math.abs(dphi)<=.0000000001)return phi}alert("phi2z has NoConvergence");return(-9999)},qsfnz:function(eccent,sinphi){var con;if(eccent>1.0e-7){con=eccent*sinphi;return((1.0-eccent*eccent)*(sinphi/(1.0-con*con)-(.5/eccent)*Math.log((1.0-con)/(1.0+con))))}else{return(2.0*sinphi)}},asinz:function(x){if(Math.abs(x)>1.0){x=(x>1.0)?1.0:-1.0}return Math.asin(x)},e0fn:function(x){return(1.0-0.25*x*(1.0+x/16.0*(3.0+1.25*x)))},e1fn:function(x){return(0.375*x*(1.0+0.25*x*(1.0+0.46875*x)))},e2fn:function(x){return(0.05859375*x*x*(1.0+0.75*x))},e3fn:function(x){return(x*x*x*(35.0/3072.0))},mlfn:function(e0,e1,e2,e3,phi){return(e0*phi-e1*Math.sin(2.0*phi)+e2*Math.sin(4.0*phi)-e3*Math.sin(6.0*phi))},srat:function(esinp,exp){return(Math.pow((1.0-esinp)/(1.0+esinp),exp))},sign:function(x){if(x<0.0)return(-1);else return(1)},adjust_lon:function(x){x=(Math.abs(x)<this.PI)?x:(x-(this.sign(x)*this.TWO_PI));return x},adjust_lat:function(x){x=(Math.abs(x)<this.HALF_PI)?x:(x-(this.sign(x)*this.PI));return x},latiso:function(eccent,phi,sinphi){if(Math.abs(phi)>this.HALF_PI)return+Number.NaN;if(phi==this.HALF_PI)return Number.POSITIVE_INFINITY;if(phi==-1.0*this.HALF_PI)return-1.0*Number.POSITIVE_INFINITY;var con=eccent*sinphi;return Math.log(Math.tan((this.HALF_PI+phi)/2.0))+eccent*Math.log((1.0-con)/(1.0+con))/2.0},fL:function(x,L){return 2.0*Math.atan(x*Math.exp(L))-this.HALF_PI},invlatiso:function(eccent,ts){var phi=this.fL(1.0,ts);var Iphi=0.0;var con=0.0;do{Iphi=phi;con=eccent*Math.sin(Iphi);phi=this.fL(Math.exp(eccent*Math.log((1.0+con)/(1.0-con))/2.0),ts)}while(Math.abs(phi-Iphi)>1.0e-12);return phi},sinh:function(x){var r=Math.exp(x);r=(r-1.0/r)/2.0;return r},cosh:function(x){var r=Math.exp(x);r=(r+1.0/r)/2.0;return r},tanh:function(x){var r=Math.exp(x);r=(r-1.0/r)/(r+1.0/r);return r},asinh:function(x){var s=(x>=0?1.0:-1.0);return s*(Math.log(Math.abs(x)+Math.sqrt(x*x+1.0)))},acosh:function(x){return 2.0*Math.log(Math.sqrt((x+1.0)/2.0)+Math.sqrt((x-1.0)/2.0))},atanh:function(x){return Math.log((x-1.0)/(x+1.0))/2.0},gN:function(a,e,sinphi){var temp=e*sinphi;return a/Math.sqrt(1.0-temp*temp)}};Proj4js.datum=Proj4js.Class({initialize:function(proj){this.datum_type=Proj4js.common.PJD_WGS84;if(proj.datumCode&&proj.datumCode=='none'){this.datum_type=Proj4js.common.PJD_NODATUM}if(proj&&proj.datum_params){for(var i=0;i<proj.datum_params.length;i++){proj.datum_params[i]=parseFloat(proj.datum_params[i])}if(proj.datum_params[0]!=0||proj.datum_params[1]!=0||proj.datum_params[2]!=0){this.datum_type=Proj4js.common.PJD_3PARAM}if(proj.datum_params.length>3){if(proj.datum_params[3]!=0||proj.datum_params[4]!=0||proj.datum_params[5]!=0||proj.datum_params[6]!=0){this.datum_type=Proj4js.common.PJD_7PARAM;proj.datum_params[3]*=Proj4js.common.SEC_TO_RAD;proj.datum_params[4]*=Proj4js.common.SEC_TO_RAD;proj.datum_params[5]*=Proj4js.common.SEC_TO_RAD;proj.datum_params[6]=(proj.datum_params[6]/1000000.0)+1.0}}}if(proj){this.a=proj.a;this.b=proj.b;this.es=proj.es;this.ep2=proj.ep2;this.datum_params=proj.datum_params}},compare_datums:function(dest){if(this.datum_type!=dest.datum_type){return false}else if(this.a!=dest.a||Math.abs(this.es-dest.es)>0.000000000050){return false}else if(this.datum_type==Proj4js.common.PJD_3PARAM){return(this.datum_params[0]==dest.datum_params[0]&&this.datum_params[1]==dest.datum_params[1]&&this.datum_params[2]==dest.datum_params[2])}else if(this.datum_type==Proj4js.common.PJD_7PARAM){return(this.datum_params[0]==dest.datum_params[0]&&this.datum_params[1]==dest.datum_params[1]&&this.datum_params[2]==dest.datum_params[2]&&this.datum_params[3]==dest.datum_params[3]&&this.datum_params[4]==dest.datum_params[4]&&this.datum_params[5]==dest.datum_params[5]&&this.datum_params[6]==dest.datum_params[6])}else if(this.datum_type==Proj4js.common.PJD_GRIDSHIFT){return strcmp(pj_param(this.params,"snadgrids").s,pj_param(dest.params,"snadgrids").s)==0}else{return true}},geodetic_to_geocentric:function(p){var Longitude=p.x;var Latitude=p.y;var Height=p.z?p.z:0;var X;var Y;var Z;var Error_Code=0;var Rn;var Sin_Lat;var Sin2_Lat;var Cos_Lat;if(Latitude<-Proj4js.common.HALF_PI&&Latitude>-1.001*Proj4js.common.HALF_PI){Latitude=-Proj4js.common.HALF_PI}else if(Latitude>Proj4js.common.HALF_PI&&Latitude<1.001*Proj4js.common.HALF_PI){Latitude=Proj4js.common.HALF_PI}else if((Latitude<-Proj4js.common.HALF_PI)||(Latitude>Proj4js.common.HALF_PI)){Proj4js.reportError('geocent:lat out of range:'+Latitude);return null}if(Longitude>Proj4js.common.PI)Longitude-=(2*Proj4js.common.PI);Sin_Lat=Math.sin(Latitude);Cos_Lat=Math.cos(Latitude);Sin2_Lat=Sin_Lat*Sin_Lat;Rn=this.a/(Math.sqrt(1.0e0-this.es*Sin2_Lat));X=(Rn+Height)*Cos_Lat*Math.cos(Longitude);Y=(Rn+Height)*Cos_Lat*Math.sin(Longitude);Z=((Rn*(1-this.es))+Height)*Sin_Lat;p.x=X;p.y=Y;p.z=Z;return Error_Code},geocentric_to_geodetic:function(p){var genau=1.E-12;var genau2=(genau*genau);var maxiter=30;var P;var RR;var CT;var ST;var RX;var RK;var RN;var CPHI0;var SPHI0;var CPHI;var SPHI;var SDPHI;var At_Pole;var iter;var X=p.x;var Y=p.y;var Z=p.z?p.z:0.0;var Longitude;var Latitude;var Height;At_Pole=false;P=Math.sqrt(X*X+Y*Y);RR=Math.sqrt(X*X+Y*Y+Z*Z);if(P/this.a<genau){At_Pole=true;Longitude=0.0;if(RR/this.a<genau){Latitude=Proj4js.common.HALF_PI;Height=-this.b;return}}else{Longitude=Math.atan2(Y,X)}CT=Z/RR;ST=P/RR;RX=1.0/Math.sqrt(1.0-this.es*(2.0-this.es)*ST*ST);CPHI0=ST*(1.0-this.es)*RX;SPHI0=CT*RX;iter=0;do{iter++;RN=this.a/Math.sqrt(1.0-this.es*SPHI0*SPHI0);Height=P*CPHI0+Z*SPHI0-RN*(1.0-this.es*SPHI0*SPHI0);RK=this.es*RN/(RN+Height);RX=1.0/Math.sqrt(1.0-RK*(2.0-RK)*ST*ST);CPHI=ST*(1.0-RK)*RX;SPHI=CT*RX;SDPHI=SPHI*CPHI0-CPHI*SPHI0;CPHI0=CPHI;SPHI0=SPHI}while(SDPHI*SDPHI>genau2&&iter<maxiter);Latitude=Math.atan(SPHI/Math.abs(CPHI));p.x=Longitude;p.y=Latitude;p.z=Height;return p},geocentric_to_geodetic_noniter:function(p){var X=p.x;var Y=p.y;var Z=p.z?p.z:0;var Longitude;var Latitude;var Height;var W;var W2;var T0;var T1;var S0;var S1;var Sin_B0;var Sin3_B0;var Cos_B0;var Sin_p1;var Cos_p1;var Rn;var Sum;var At_Pole;X=parseFloat(X);Y=parseFloat(Y);Z=parseFloat(Z);At_Pole=false;if(X!=0.0){Longitude=Math.atan2(Y,X)}else{if(Y>0){Longitude=Proj4js.common.HALF_PI}else if(Y<0){Longitude=-Proj4js.common.HALF_PI}else{At_Pole=true;Longitude=0.0;if(Z>0.0){Latitude=Proj4js.common.HALF_PI}else if(Z<0.0){Latitude=-Proj4js.common.HALF_PI}else{Latitude=Proj4js.common.HALF_PI;Height=-this.b;return}}}W2=X*X+Y*Y;W=Math.sqrt(W2);T0=Z*Proj4js.common.AD_C;S0=Math.sqrt(T0*T0+W2);Sin_B0=T0/S0;Cos_B0=W/S0;Sin3_B0=Sin_B0*Sin_B0*Sin_B0;T1=Z+this.b*this.ep2*Sin3_B0;Sum=W-this.a*this.es*Cos_B0*Cos_B0*Cos_B0;S1=Math.sqrt(T1*T1+Sum*Sum);Sin_p1=T1/S1;Cos_p1=Sum/S1;Rn=this.a/Math.sqrt(1.0-this.es*Sin_p1*Sin_p1);if(Cos_p1>=Proj4js.common.COS_67P5){Height=W/Cos_p1-Rn}else if(Cos_p1<=-Proj4js.common.COS_67P5){Height=W/-Cos_p1-Rn}else{Height=Z/Sin_p1+Rn*(this.es-1.0)}if(At_Pole==false){Latitude=Math.atan(Sin_p1/Cos_p1)}p.x=Longitude;p.y=Latitude;p.z=Height;return p},geocentric_to_wgs84:function(p){if(this.datum_type==Proj4js.common.PJD_3PARAM){p.x+=this.datum_params[0];p.y+=this.datum_params[1];p.z+=this.datum_params[2]}else if(this.datum_type==Proj4js.common.PJD_7PARAM){var Dx_BF=this.datum_params[0];var Dy_BF=this.datum_params[1];var Dz_BF=this.datum_params[2];var Rx_BF=this.datum_params[3];var Ry_BF=this.datum_params[4];var Rz_BF=this.datum_params[5];var M_BF=this.datum_params[6];var x_out=M_BF*(p.x-Rz_BF*p.y+Ry_BF*p.z)+Dx_BF;var y_out=M_BF*(Rz_BF*p.x+p.y-Rx_BF*p.z)+Dy_BF;var z_out=M_BF*(-Ry_BF*p.x+Rx_BF*p.y+p.z)+Dz_BF;p.x=x_out;p.y=y_out;p.z=z_out}},geocentric_from_wgs84:function(p){if(this.datum_type==Proj4js.common.PJD_3PARAM){p.x-=this.datum_params[0];p.y-=this.datum_params[1];p.z-=this.datum_params[2]}else if(this.datum_type==Proj4js.common.PJD_7PARAM){var Dx_BF=this.datum_params[0];var Dy_BF=this.datum_params[1];var Dz_BF=this.datum_params[2];var Rx_BF=this.datum_params[3];var Ry_BF=this.datum_params[4];var Rz_BF=this.datum_params[5];var M_BF=this.datum_params[6];var x_tmp=(p.x-Dx_BF)/M_BF;var y_tmp=(p.y-Dy_BF)/M_BF;var z_tmp=(p.z-Dz_BF)/M_BF;p.x=x_tmp+Rz_BF*y_tmp-Ry_BF*z_tmp;p.y=-Rz_BF*x_tmp+y_tmp+Rx_BF*z_tmp;p.z=Ry_BF*x_tmp-Rx_BF*y_tmp+z_tmp}}});Proj4js.Point=Proj4js.Class({initialize:function(x,y,z){if(typeof x=='object'){this.x=x[0];this.y=x[1];this.z=x[2]||0.0}else if(typeof x=='string'){var coords=x.split(',');this.x=parseFloat(coords[0]);this.y=parseFloat(coords[1]);this.z=parseFloat(coords[2])||0.0}else{this.x=x;this.y=y;this.z=z||0.0}},clone:function(){return new Proj4js.Point(this.x,this.y,this.z)},toString:function(){return("x="+this.x+",y="+this.y)},toShortString:function(){return(this.x+", "+this.y)}});Proj4js.PrimeMeridian={"greenwich":0.0,"lisbon":-9.131906111111,"paris":2.337229166667,"bogota":-74.080916666667,"madrid":-3.687938888889,"rome":12.452333333333,"bern":7.439583333333,"jakarta":106.807719444444,"ferro":-17.666666666667,"brussels":4.367975,"stockholm":18.058277777778,"athens":23.7163375,"oslo":10.722916666667};Proj4js.Ellipsoid={"MERIT":{a:6378137.0,rf:298.257,ellipseName:"MERIT 1983"},"SGS85":{a:6378136.0,rf:298.257,ellipseName:"Soviet Geodetic System 85"},"GRS80":{a:6378137.0,rf:298.257222101,ellipseName:"GRS 1980(IUGG, 1980)"},"IAU76":{a:6378140.0,rf:298.257,ellipseName:"IAU 1976"},"airy":{a:6377563.396,b:6356256.910,ellipseName:"Airy 1830"},"APL4.":{a:6378137,rf:298.25,ellipseName:"Appl. Physics. 1965"},"NWL9D":{a:6378145.0,rf:298.25,ellipseName:"Naval Weapons Lab., 1965"},"mod_airy":{a:6377340.189,b:6356034.446,ellipseName:"Modified Airy"},"andrae":{a:6377104.43,rf:300.0,ellipseName:"Andrae 1876 (Den., Iclnd.)"},"aust_SA":{a:6378160.0,rf:298.25,ellipseName:"Australian Natl & S. Amer. 1969"},"GRS67":{a:6378160.0,rf:298.2471674270,ellipseName:"GRS 67(IUGG 1967)"},"bessel":{a:6377397.155,rf:299.1528128,ellipseName:"Bessel 1841"},"bess_nam":{a:6377483.865,rf:299.1528128,ellipseName:"Bessel 1841 (Namibia)"},"clrk66":{a:6378206.4,b:6356583.8,ellipseName:"Clarke 1866"},"clrk80":{a:6378249.145,rf:293.4663,ellipseName:"Clarke 1880 mod."},"CPM":{a:6375738.7,rf:334.29,ellipseName:"Comm. des Poids et Mesures 1799"},"delmbr":{a:6376428.0,rf:311.5,ellipseName:"Delambre 1810 (Belgium)"},"engelis":{a:6378136.05,rf:298.2566,ellipseName:"Engelis 1985"},"evrst30":{a:6377276.345,rf:300.8017,ellipseName:"Everest 1830"},"evrst48":{a:6377304.063,rf:300.8017,ellipseName:"Everest 1948"},"evrst56":{a:6377301.243,rf:300.8017,ellipseName:"Everest 1956"},"evrst69":{a:6377295.664,rf:300.8017,ellipseName:"Everest 1969"},"evrstSS":{a:6377298.556,rf:300.8017,ellipseName:"Everest (Sabah & Sarawak)"},"fschr60":{a:6378166.0,rf:298.3,ellipseName:"Fischer (Mercury Datum) 1960"},"fschr60m":{a:6378155.0,rf:298.3,ellipseName:"Fischer 1960"},"fschr68":{a:6378150.0,rf:298.3,ellipseName:"Fischer 1968"},"helmert":{a:6378200.0,rf:298.3,ellipseName:"Helmert 1906"},"hough":{a:6378270.0,rf:297.0,ellipseName:"Hough"},"intl":{a:6378388.0,rf:297.0,ellipseName:"International 1909 (Hayford)"},"kaula":{a:6378163.0,rf:298.24,ellipseName:"Kaula 1961"},"lerch":{a:6378139.0,rf:298.257,ellipseName:"Lerch 1979"},"mprts":{a:6397300.0,rf:191.0,ellipseName:"Maupertius 1738"},"new_intl":{a:6378157.5,b:6356772.2,ellipseName:"New International 1967"},"plessis":{a:6376523.0,rf:6355863.0,ellipseName:"Plessis 1817 (France)"},"krass":{a:6378245.0,rf:298.3,ellipseName:"Krassovsky, 1942"},"SEasia":{a:6378155.0,b:6356773.3205,ellipseName:"Southeast Asia"},"walbeck":{a:6376896.0,b:6355834.8467,ellipseName:"Walbeck"},"WGS60":{a:6378165.0,rf:298.3,ellipseName:"WGS 60"},"WGS66":{a:6378145.0,rf:298.25,ellipseName:"WGS 66"},"WGS72":{a:6378135.0,rf:298.26,ellipseName:"WGS 72"},"WGS84":{a:6378137.0,rf:298.257223563,ellipseName:"WGS 84"},"sphere":{a:6370997.0,b:6370997.0,ellipseName:"Normal Sphere (r=6370997)"}};Proj4js.Datum={"WGS84":{towgs84:"0,0,0",ellipse:"WGS84",datumName:"WGS84"},"GGRS87":{towgs84:"-199.87,74.79,246.62",ellipse:"GRS80",datumName:"Greek_Geodetic_Reference_System_1987"},"NAD83":{towgs84:"0,0,0",ellipse:"GRS80",datumName:"North_American_Datum_1983"},"NAD27":{nadgrids:"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",ellipse:"clrk66",datumName:"North_American_Datum_1927"},"potsdam":{towgs84:"606.0,23.0,413.0",ellipse:"bessel",datumName:"Potsdam Rauenberg 1950 DHDN"},"carthage":{towgs84:"-263.0,6.0,431.0",ellipse:"clark80",datumName:"Carthage 1934 Tunisia"},"hermannskogel":{towgs84:"653.0,-212.0,449.0",ellipse:"bessel",datumName:"Hermannskogel"},"ire65":{towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"mod_airy",datumName:"Ireland 1965"},"nzgd49":{towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",ellipse:"intl",datumName:"New Zealand Geodetic Datum 1949"},"OSGB36":{towgs84:"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",ellipse:"airy",datumName:"Airy 1830"}};Proj4js.WGS84=new Proj4js.Proj('WGS84');Proj4js.Datum['OSB36']=Proj4js.Datum['OSGB36'];Proj4js.Proj.merc={init:function(){if(this.lat_ts){if(this.sphere){this.k0=Math.cos(this.lat_ts)}else{this.k0=Proj4js.common.msfnz(this.es,Math.sin(this.lat_ts),Math.cos(this.lat_ts))}}},forward:function(p){var lon=p.x;var lat=p.y;if(lat*Proj4js.common.R2D>90.0&&lat*Proj4js.common.R2D<-90.0&&lon*Proj4js.common.R2D>180.0&&lon*Proj4js.common.R2D<-180.0){Proj4js.reportError("merc:forward: llInputOutOfRange: "+lon+" : "+lat);return null}var x,y;if(Math.abs(Math.abs(lat)-Proj4js.common.HALF_PI)<=Proj4js.common.EPSLN){Proj4js.reportError("merc:forward: ll2mAtPoles");return null}else{if(this.sphere){x=this.x0+this.a*this.k0*Proj4js.common.adjust_lon(lon-this.long0);y=this.y0+this.a*this.k0*Math.log(Math.tan(Proj4js.common.FORTPI+0.5*lat))}else{var sinphi=Math.sin(lat);var ts=Proj4js.common.tsfnz(this.e,lat,sinphi);x=this.x0+this.a*this.k0*Proj4js.common.adjust_lon(lon-this.long0);y=this.y0-this.a*this.k0*Math.log(ts)}p.x=x;p.y=y;return p}},inverse:function(p){var x=p.x-this.x0;var y=p.y-this.y0;var lon,lat;if(this.sphere){lat=Proj4js.common.HALF_PI-2.0*Math.atan(Math.exp(-y/this.a*this.k0))}else{var ts=Math.exp(-y/(this.a*this.k0));lat=Proj4js.common.phi2z(this.e,ts);if(lat==-9999){Proj4js.reportError("merc:inverse: lat = -9999");return null}}lon=Proj4js.common.adjust_lon(this.long0+x/(this.a*this.k0));p.x=lon;p.y=lat;return p}};Proj4js.Proj.utm={dependsOn:'tmerc',init:function(){if(!this.zone){Proj4js.reportError("utm:init: zone must be specified for UTM");return}this.lat0=0.0;this.long0=((6*Math.abs(this.zone))-183)*Proj4js.common.D2R;this.x0=500000.0;this.y0=this.utmSouth?10000000.0:0.0;this.k0=0.9996;Proj4js.Proj['tmerc'].init.apply(this);this.forward=Proj4js.Proj['tmerc'].forward;this.inverse=Proj4js.Proj['tmerc'].inverse}};Proj4js.Proj.tmerc={init:function(){this.e0=Proj4js.common.e0fn(this.es);this.e1=Proj4js.common.e1fn(this.es);this.e2=Proj4js.common.e2fn(this.es);this.e3=Proj4js.common.e3fn(this.es);this.ml0=this.a*Proj4js.common.mlfn(this.e0,this.e1,this.e2,this.e3,this.lat0)},forward:function(p){var lon=p.x;var lat=p.y;var delta_lon=Proj4js.common.adjust_lon(lon-this.long0);var con;var x,y;var sin_phi=Math.sin(lat);var cos_phi=Math.cos(lat);if(this.sphere){var b=cos_phi*Math.sin(delta_lon);if((Math.abs(Math.abs(b)-1.0))<.0000000001){Proj4js.reportError("tmerc:forward: Point projects into infinity");return(93)}else{x=.5*this.a*this.k0*Math.log((1.0+b)/(1.0-b));con=Math.acos(cos_phi*Math.cos(delta_lon)/Math.sqrt(1.0-b*b));if(lat<0)con=-con;y=this.a*this.k0*(con-this.lat0)}}else{var al=cos_phi*delta_lon;var als=Math.pow(al,2);var c=this.ep2*Math.pow(cos_phi,2);var tq=Math.tan(lat);var t=Math.pow(tq,2);con=1.0-this.es*Math.pow(sin_phi,2);var n=this.a/Math.sqrt(con);var ml=this.a*Proj4js.common.mlfn(this.e0,this.e1,this.e2,this.e3,lat);x=this.k0*n*al*(1.0+als/6.0*(1.0-t+c+als/20.0*(5.0-18.0*t+Math.pow(t,2)+72.0*c-58.0*this.ep2)))+this.x0;y=this.k0*(ml-this.ml0+n*tq*(als*(0.5+als/24.0*(5.0-t+9.0*c+4.0*Math.pow(c,2)+als/30.0*(61.0-58.0*t+Math.pow(t,2)+600.0*c-330.0*this.ep2)))))+this.y0}p.x=x;p.y=y;return p},inverse:function(p){var con,phi;var delta_phi;var i;var max_iter=6;var lat,lon;if(this.sphere){var f=Math.exp(p.x/(this.a*this.k0));var g=.5*(f-1/f);var temp=this.lat0+p.y/(this.a*this.k0);var h=Math.cos(temp);con=Math.sqrt((1.0-h*h)/(1.0+g*g));lat=Proj4js.common.asinz(con);if(temp<0)lat=-lat;if((g==0)&&(h==0)){lon=this.long0}else{lon=Proj4js.common.adjust_lon(Math.atan2(g,h)+this.long0)}}else{var x=p.x-this.x0;var y=p.y-this.y0;con=(this.ml0+y/this.k0)/this.a;phi=con;for(i=0;true;i++){delta_phi=((con+this.e1*Math.sin(2.0*phi)-this.e2*Math.sin(4.0*phi)+this.e3*Math.sin(6.0*phi))/this.e0)-phi;phi+=delta_phi;if(Math.abs(delta_phi)<=Proj4js.common.EPSLN)break;if(i>=max_iter){Proj4js.reportError("tmerc:inverse: Latitude failed to converge");return(95)}}if(Math.abs(phi)<Proj4js.common.HALF_PI){var sin_phi=Math.sin(phi);var cos_phi=Math.cos(phi);var tan_phi=Math.tan(phi);var c=this.ep2*Math.pow(cos_phi,2);var cs=Math.pow(c,2);var t=Math.pow(tan_phi,2);var ts=Math.pow(t,2);con=1.0-this.es*Math.pow(sin_phi,2);var n=this.a/Math.sqrt(con);var r=n*(1.0-this.es)/con;var d=x/(n*this.k0);var ds=Math.pow(d,2);lat=phi-(n*tan_phi*ds/r)*(0.5-ds/ 24.0 * (5.0 + 3.0 * t + 10.0 * c - 4.0 * cs - 9.0 * this.ep2 - ds /30.0*(61.0+90.0*t+298.0*c+45.0*ts-252.0*this.ep2-3.0*cs)));lon=Proj4js.common.adjust_lon(this.long0+(d*(1.0-ds/6.0*(1.0+2.0*t+c-ds/ 20.0 * (5.0 - 2.0 * c + 28.0 * t - 3.0 * cs + 8.0 * this.ep2 + 24.0 * ts))) /cos_phi))}else{lat=Proj4js.common.HALF_PI*Proj4js.common.sign(y);lon=this.long0}}p.x=lon;p.y=lat;return p}};
//
//../pacotes/cpaint/cpaint2_compacto.inc.js
function cpaint(){this.version='2.0.3';var config=new Array();config['debugging']=-1;config['proxy_url']='';config['transfer_mode']='GET';config['async']=true;config['response_type']='OBJECT';config['persistent_connection']=false;config['use_cpaint_api']=true;var stack_count=0;this.capable=test_ajax_capability();this.set_debug=function(){if(typeof arguments[0]=='boolean'){if(arguments[0]===true){config['debugging']=1}else{config['debugging']=0}}else if(typeof arguments[0]=='number'){config['debugging']=Math.round(arguments[0])}};this.set_proxy_url=function(){if(typeof arguments[0]=='string'){config['proxy_url']=arguments[0]}};this.set_transfer_mode=function(){if(arguments[0].toUpperCase()=='GET'||arguments[0].toUpperCase()=='POST'){config['transfer_mode']=arguments[0].toUpperCase()}};this.set_async=function(){if(typeof arguments[0]=='boolean'){config['async']=arguments[0]}};this.set_response_type=function(){if(arguments[0].toUpperCase()=='TEXT'||arguments[0].toUpperCase()=='XML'||arguments[0].toUpperCase()=='OBJECT'||arguments[0].toUpperCase()=='E4X'||arguments[0].toUpperCase()=='JSON'){config['response_type']=arguments[0].toUpperCase()}};this.set_persistent_connection=function(){if(typeof arguments[0]=='boolean'){config['persistent_connection']=arguments[0]}};this.set_use_cpaint_api=function(){if(typeof arguments[0]=='boolean'){config['use_cpaint_api']=arguments[0]}};function test_ajax_capability(){var cpc=new cpaint_call(0,config,this.version);return cpc.test_ajax_capability()}this.call=function(){var sUrl=escape(arguments[0]);var re=new RegExp("%3F","g");var sUrl=sUrl.replace(re,'?');var re=new RegExp("%3D","g");var sUrl=sUrl.replace(re,'=');var re=new RegExp("%26","g");var sUrl=sUrl.replace(re,'&');var re=new RegExp("%3A","g");var sUrl=sUrl.replace(re,':');arguments[0]=sUrl;var use_stack=-1;if(config['persistent_connection']==true&&__cpaint_stack[0]!=null){switch(__cpaint_stack[0].get_http_state()){case-1:use_stack=0;debug('no XMLHttpObject object to re-use for persistence, creating new one later',2);break;case 4:use_stack=0;debug('re-using the persistent connection',2);break;default:debug('the persistent connection is in use - skipping this request',2)}}else if(config['persistent_connection']==true){use_stack=0;__cpaint_stack[use_stack]=new cpaint_call(use_stack,config,this.version);debug('no cpaint_call object available for re-use, created new one',2)}else{use_stack=stack_count;__cpaint_stack[use_stack]=new cpaint_call(use_stack,config,this.version);debug('no cpaint_call object created new one',2)}if(use_stack!=-1){__cpaint_stack[use_stack].set_client_callback(arguments[2]);if(config['proxy_url']!=''){__cpaint_stack[use_stack].call_proxy(arguments)}else{__cpaint_stack[use_stack].call_direct(arguments)}stack_count++;debug('stack size: '+__cpaint_stack.length,2)}};var debug=function(message,debug_level){var prefix='[CPAINT Debug] ';if(debug_level<1){prefix='[CPAINT Error] '}if(config['debugging']>=debug_level){alert(prefix+message)}}}var __cpaint_stack=new Array();var __cpaint_transformer=new cpaint_transformer();function cpaint_call(){var version=arguments[2];var config=new Array();config['debugging']=arguments[1]['debugging'];config['proxy_url']=arguments[1]['proxy_url'];config['transfer_mode']=arguments[1]['transfer_mode'];config['async']=arguments[1]['async'];config['response_type']=arguments[1]['response_type'];config['persistent_connection']=arguments[1]['persistent_connection'];config['use_cpaint_api']=arguments[1]['use_cpaint_api'];var httpobj=false;var client_callback;var stack_id=arguments[0];this.set_client_callback=function(){if(typeof arguments[0]=='function'){client_callback=arguments[0]}};this.get_http_state=function(){var return_value=-1;if(typeof httpobj=='object'){return_value=httpobj.readyState}return return_value};this.call_direct=function(call_arguments){var url=call_arguments[0];var remote_method=call_arguments[1];var querystring='';var i=0;if(url=='SELF'){url=document.location.href}if(config['use_cpaint_api']==true){for(i=3;i<call_arguments.length;i++){if((typeof call_arguments[i]=='string'&&call_arguments[i]!=''&&call_arguments[i].search(/^\s+$/g)==-1)&&!isNaN(call_arguments[i])&&isFinite(call_arguments[i])){querystring+='&cpaint_argument[]='+encodeURIComponent(JSON.stringify(Number(call_arguments[i])))}else{querystring+='&cpaint_argument[]='+encodeURIComponent(JSON.stringify(call_arguments[i]))}}querystring+='&cpaint_response_type='+config['response_type'];if(config['transfer_mode']=='GET'){if(url.indexOf('?')!=-1){url=url+'&cpaint_function='+remote_method+querystring}else{url=url+'?cpaint_function='+remote_method+querystring}}else{querystring='cpaint_function='+remote_method+querystring}}else{for(i=3;i<call_arguments.length;i++){if(i==3){querystring+=encodeURIComponent(call_arguments[i])}else{querystring+='&'+encodeURIComponent(call_arguments[i])}}if(config['transfer_mode']=='GET'){url=url+querystring}}get_connection_object();debug('opening connection to "'+url+'"',1);httpobj.open(config['transfer_mode'],url,config['async']);if(config['transfer_mode']=='POST'){try{httpobj.setRequestHeader('Content-Type','application/x-www-form-urlencoded')}catch(cp_err){debug('POST cannot be completed due to incompatible browser.  Use GET as your request method.',0)}}httpobj.setRequestHeader('X-Powered-By','CPAINT v'+version+' :: http://sf.net/projects/cpaint');httpobj.onreadystatechange=callback;if(config['transfer_mode']=='GET'){httpobj.send(null)}else{debug('sending query: '+querystring,1);httpobj.send(querystring)}if(config['async']==true){callback()}};this.call_proxy=function(call_arguments){var proxyscript=config['proxy_url'];var url=call_arguments[0];var remote_method=call_arguments[1];var querystring='';var i=0;var querystring_argument_prefix='cpaint_argument[]=';if(config['use_cpaint_api']==false){querystring_argument_prefix=''}for(i=3;i<call_arguments.length;i++){if(config['use_cpaint_api']==true){if((typeof call_arguments[i]=='string'&&call_arguments[i]!=''&&call_arguments[i].search(/^\s+$/g)==-1)&&!isNaN(call_arguments[i])&&isFinite(call_arguments[i])){querystring+=encodeURIComponent(querystring_argument_prefix+JSON.stringify(Number(call_arguments[i]))+'&')}else{querystring+=encodeURIComponent(querystring_argument_prefix+JSON.stringify(call_arguments[i])+'&')}}else{querystring+=encodeURIComponent(querystring_argument_prefix+call_arguments[i]+'&')}}if(config['use_cpaint_api']==true){querystring+=encodeURIComponent('&cpaint_function='+remote_method);querystring+=encodeURIComponent('&cpaint_responsetype='+config['response_type'])}if(config['transfer_mode']=='GET'){proxyscript+='?cpaint_remote_url='+encodeURIComponent(url)+'&cpaint_remote_query='+querystring+'&cpaint_remote_method='+config['transfer_mode']+'&cpaint_response_type='+config['response_type']}else{querystring='cpaint_remote_url='+encodeURIComponent(url)+'&cpaint_remote_query='+querystring+'&cpaint_remote_method='+config['transfer_mode']+'&cpaint_response_type='+config['response_type']}get_connection_object();debug('opening connection to proxy "'+proxyscript+'"',1);httpobj.open(config['transfer_mode'],proxyscript,config['async']);if(config['transfer_mode']=='POST'){try{httpobj.setRequestHeader('Content-Type','application/x-www-form-urlencoded')}catch(cp_err){debug('POST cannot be completed due to incompatible browser.  Use GET as your request method.',0)}}httpobj.setRequestHeader('X-Powered-By','CPAINT v'+version);httpobj.onreadystatechange=callback;if(config['transfer_mode']=='GET'){httpobj.send(null)}else{debug('sending query: '+querystring,1);httpobj.send(querystring)}if(config['async']==false){callback()}};this.test_ajax_capability=function(){return get_connection_object()};var get_connection_object=function(){var return_value=false;var new_connection=false;if(config['persistent_connection']==false){debug('Using new connection object',1);new_connection=true}else{debug('Using shared connection object.',1);if(typeof httpobj!='object'){debug('Getting new persistent connection object.',1);new_connection=true}}if(new_connection==true){try{httpobj=new XMLHttpRequest()}catch(e1){try{httpobj=new ActiveXObject('Msxml2.XMLHTTP')}catch(e){try{httpobj=new ActiveXObject('Microsoft.XMLHTTP')}catch(oc){httpobj=null}}}if(!httpobj){debug('Could not create connection object',0)}else{return_value=true}}if(httpobj.readyState!=4){httpobj.abort()}return return_value};var callback=function(){var response=null;if(httpobj.readyState==4&&httpobj.status==200){if(httpobj.responseText==""){alert("Ocorreu um erro! Retorno vazio.");client_callback("","erro");return}debug(httpobj.responseText,1);debug('using response type '+config['response_type'],2);var responseText=httpobj.responseText;switch(config['response_type']){case'XML':debug(httpobj.responseXML,2);response=__cpaint_transformer.xml_conversion(httpobj.responseXML);break;case'OBJECT':response=__cpaint_transformer.object_conversion(httpobj.responseXML);break;case'TEXT':response=__cpaint_transformer.text_conversion(httpobj.responseText);break;case'E4X':response=__cpaint_transformer.e4x_conversion(httpobj.responseText);break;case'JSON':response=__cpaint_transformer.json_conversion(responseText);break;default:debug('invalid response type \''+response_type+'\'',0)}if(response!=null&&typeof client_callback=='function'){try{client_callback(response,responseText)}catch(e){client_callback("","erro")}}remove_from_stack()}else{if(httpobj.readyState==4&&httpobj.status!=200){debug('invalid HTTP response code \''+Number(httpobj.status)+'\'',0);if(httpobj.status==500){alert("Ocorreu um erro! 500");client_callback("","erro")}else{client_callback("","erro")}}}};var remove_from_stack=function(){if(typeof stack_id=='number'&&__cpaint_stack[stack_id]&&config['persistent_connection']==false){__cpaint_stack[stack_id]=null}};var debug=function(message,debug_level){var prefix='[CPAINT Debug] ';if(config['debugging']<1){prefix='[CPAINT Error] '}if(config['debugging']>=debug_level){alert(prefix+message)}if(message.search(" error")>1){client_callback("",message)}}}function cpaint_transformer(){this.object_conversion=function(xml_document){var return_value=new cpaint_result_object();var i=0;var firstNodeName='';if(typeof xml_document=='object'&&xml_document!=null){for(i=0;i<xml_document.childNodes.length;i++){if(xml_document.childNodes[i].nodeType==1){firstNodeName=xml_document.childNodes[i].nodeName;break}}var ajax_response=xml_document.getElementsByTagName(firstNodeName);return_value[firstNodeName]=new Array();for(i=0;i<ajax_response.length;i++){var tmp_node=create_object_structure(ajax_response[i]);tmp_node.id=ajax_response[i].getAttribute('id');return_value[firstNodeName].push(tmp_node)}}else{debug('received invalid XML response',0)}return return_value};this.xml_conversion=function(xml_document){return xml_document};this.text_conversion=function(text){return decode(text)};this.e4x_conversion=function(text){text=text.replace(/^\<\?xml[^>]+\>/,'');return new XML(text)};this.json_conversion=function(text){return JSON.parse(text)};var create_object_structure=function(stream){var return_value=new cpaint_result_object();var node_name='';var i=0;var attrib=0;if(stream.hasChildNodes()==true){for(i=0;i<stream.childNodes.length;i++){node_name=stream.childNodes[i].nodeName;node_name=node_name.replace(/[^a-zA-Z0-9_]*/g,'');if(typeof return_value[node_name]!='object'){return_value[node_name]=new Array()}if(stream.childNodes[i].nodeType==1){var tmp_node=create_object_structure(stream.childNodes[i]);for(attrib=0;attrib<stream.childNodes[i].attributes.length;attrib++){tmp_node.set_attribute(stream.childNodes[i].attributes[attrib].nodeName,stream.childNodes[i].attributes[attrib].nodeValue)}return_value[node_name].push(tmp_node)}else if(stream.childNodes[i].nodeType==3){return_value.data=decode(String(stream.firstChild.data))}}}return return_value};var decode=function(rawtext){var plaintext='';var i=0;var c1=0;var c2=0;var c3=0;var u=0;var t=0;while(i<rawtext.length){if(rawtext.charAt(i)=='\\'&&rawtext.charAt(i+1)=='u'){u=0;for(j=2;j<6;j+=1){t=parseInt(rawtext.charAt(i+j),16);if(!isFinite(t)){break}u=u*16+t}plaintext+=String.fromCharCode(u);i+=6}else{plaintext+=rawtext.charAt(i);i++}}if(plaintext!=''&&plaintext.search(/^\s+$/g)==-1&&!isNaN(plaintext)&&isFinite(plaintext)){plaintext=Number(plaintext)}return plaintext}}function cpaint_result_object(){this.id=0;this.data='';var __attributes=new Array();this.find_item_by_id=function(){var return_value=null;var type=arguments[0];var id=arguments[1];var i=0;if(this[type]){for(i=0;i<this[type].length;i++){if(this[type][i].get_attribute('id')==id){return_value=this[type][i];break}}}return return_value};this.get_attribute=function(){var return_value=null;var id=arguments[0];if(typeof __attributes[id]!='undefined'){return_value=__attributes[id]}return return_value};this.set_attribute=function(){__attributes[arguments[0]]=arguments[1]}}Array.prototype.______array='______array';var JSON={org:'http://www.JSON.org',copyright:'(c)2005 JSON.org',license:'http://www.crockford.com/JSON/license.html',stringify:function(arg){var c,i,l,s='',v;var numeric=true;switch(typeof arg){case'object':if(arg){if(arg.______array=='______array'){for(i in arg){if(i!='______array'&&(isNaN(i)||!isFinite(i))){numeric=false;break}}if(numeric==true){for(i=0;i<arg.length;++i){if(typeof arg[i]!='undefined'){v=this.stringify(arg[i]);if(s){s+=','}s+=v}else{s+=',null'}}return'['+s+']'}else{for(i in arg){if(i!='______array'){v=arg[i];if(typeof v!='undefined'&&typeof v!='function'){v=this.stringify(v);if(s){s+=','}s+=this.stringify(i)+':'+v}}}return'{'+s+'}'}}else if(typeof arg.toString!='undefined'){for(i in arg){v=arg[i];if(typeof v!='undefined'&&typeof v!='function'){v=this.stringify(v);if(s){s+=','}s+=this.stringify(i)+':'+v}}return'{'+s+'}'}}return'null';case'number':return isFinite(arg)?String(arg):'null';case'string':l=arg.length;s='"';for(i=0;i<l;i+=1){c=arg.charAt(i);if(c>=' '){if(c=='\\'||c=='"'){s+='\\'}s+=c}else{switch(c){case'\b':s+='\\b';break;case'\f':s+='\\f';break;case'\n':s+='\\n';break;case'\r':s+='\\r';break;case'\t':s+='\\t';break;default:c=c.charCodeAt();s+='\\u00'+Math.floor(c/16).toString(16)+(c%16).toString(16)}}}return s+'"';case'boolean':return String(arg);default:return'null'}},parse:function(text){var at=0;var ch=' ';function error(m){throw{name:'JSONError',message:m,at:at-1,text:text}};function next(){ch=text.charAt(at);at+=1;return ch};function white(){while(ch!=''&&ch<=' '){next()}};function str(){var i,s='',t,u;if(ch=='"'){outer:while(next()){if(ch=='"'){next();return s}else if(ch=='\\'){switch(next()){case'b':s+='\b';break;case'f':s+='\f';break;case'n':s+='\n';break;case'r':s+='\r';break;case't':s+='\t';break;case'u':u=0;for(i=0;i<4;i+=1){t=parseInt(next(),16);if(!isFinite(t)){break outer}u=u*16+t}s+=String.fromCharCode(u);break;default:s+=ch}}else{s+=ch}}}error("Bad string")};function arr(){var a=[];if(ch=='['){next();white();if(ch==']'){next();return a}while(ch){a.push(val());white();if(ch==']'){next();return a}else if(ch!=','){break}next();white()}}error("Bad array")};function obj(){var k,o={};if(ch=='{'){next();white();if(ch=='}'){next();return o}while(ch){k=str();white();if(ch!=':'){break}next();o[k]=val();white();if(ch=='}'){next();return o}else if(ch!=','){break}next();white()}}error("Bad object")};function assoc(){var k,a=[];if(ch=='<'){next();white();if(ch=='>'){next();return a}while(ch){k=str();white();if(ch!=':'){break}next();a[k]=val();white();if(ch=='>'){next();return a}else if(ch!=','){break}next();white()}}error("Bad associative array")};function num(){var n='',v;if(ch=='-'){n='-';next()}while(ch>='0'&&ch<='9'){n+=ch;next()}if(ch=='.'){n+='.';while(next()&&ch>='0'&&ch<='9'){n+=ch}}if(ch=='e'||ch=='E'){n+='e';next();if(ch=='-'||ch=='+'){n+=ch;next()}while(ch>='0'&&ch<='9'){n+=ch;next()}}v=+n;if(!isFinite(v)){error("Bad number")}else{return v}};function word(){switch(ch){case't':if(next()=='r'&&next()=='u'&&next()=='e'){next();return true}break;case'f':if(next()=='a'&&next()=='l'&&next()=='s'&&next()=='e'){next();return false}break;case'n':if(next()=='u'&&next()=='l'&&next()=='l'){next();return null}break}error("Syntax error")};function val(){white();switch(ch){case'{':return obj();case'[':return arr();case'<':return assoc();case'"':return str();case'-':return num();default:return ch>='0'&&ch<='9'?num():word()}};return val()}};
//
//../pacotes/yui290/build/yahoo/yahoo-min.js
/*
Copyright (c) 2011, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 2.9.0
*/
if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={};}YAHOO.namespace=function(){var b=arguments,g=null,e,c,f;for(e=0;e<b.length;e=e+1){f=(""+b[e]).split(".");g=YAHOO;for(c=(f[0]=="YAHOO")?1:0;c<f.length;c=c+1){g[f[c]]=g[f[c]]||{};g=g[f[c]];}}return g;};YAHOO.log=function(d,a,c){var b=YAHOO.widget.Logger;if(b&&b.log){return b.log(d,a,c);}else{return false;}};YAHOO.register=function(a,f,e){var k=YAHOO.env.modules,c,j,h,g,d;if(!k[a]){k[a]={versions:[],builds:[]};}c=k[a];j=e.version;h=e.build;g=YAHOO.env.listeners;c.name=a;c.version=j;c.build=h;c.versions.push(j);c.builds.push(h);c.mainClass=f;for(d=0;d<g.length;d=d+1){g[d](c);}if(f){f.VERSION=j;f.BUILD=h;}else{YAHOO.log("mainClass is undefined for module "+a,"warn");}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(a){return YAHOO.env.modules[a]||null;};YAHOO.env.parseUA=function(d){var e=function(i){var j=0;return parseFloat(i.replace(/\./g,function(){return(j++==1)?"":".";}));},h=navigator,g={ie:0,opera:0,gecko:0,webkit:0,chrome:0,mobile:null,air:0,ipad:0,iphone:0,ipod:0,ios:null,android:0,webos:0,caja:h&&h.cajaVersion,secure:false,os:null},c=d||(navigator&&navigator.userAgent),f=window&&window.location,b=f&&f.href,a;g.secure=b&&(b.toLowerCase().indexOf("https")===0);if(c){if((/windows|win32/i).test(c)){g.os="windows";}else{if((/macintosh/i).test(c)){g.os="macintosh";}else{if((/rhino/i).test(c)){g.os="rhino";}}}if((/KHTML/).test(c)){g.webkit=1;}a=c.match(/AppleWebKit\/([^\s]*)/);if(a&&a[1]){g.webkit=e(a[1]);if(/ Mobile\//.test(c)){g.mobile="Apple";a=c.match(/OS ([^\s]*)/);if(a&&a[1]){a=e(a[1].replace("_","."));}g.ios=a;g.ipad=g.ipod=g.iphone=0;a=c.match(/iPad|iPod|iPhone/);if(a&&a[0]){g[a[0].toLowerCase()]=g.ios;}}else{a=c.match(/NokiaN[^\/]*|Android \d\.\d|webOS\/\d\.\d/);if(a){g.mobile=a[0];}if(/webOS/.test(c)){g.mobile="WebOS";a=c.match(/webOS\/([^\s]*);/);if(a&&a[1]){g.webos=e(a[1]);}}if(/ Android/.test(c)){g.mobile="Android";a=c.match(/Android ([^\s]*);/);if(a&&a[1]){g.android=e(a[1]);}}}a=c.match(/Chrome\/([^\s]*)/);if(a&&a[1]){g.chrome=e(a[1]);}else{a=c.match(/AdobeAIR\/([^\s]*)/);if(a){g.air=a[0];}}}if(!g.webkit){a=c.match(/Opera[\s\/]([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);a=c.match(/Version\/([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);}a=c.match(/Opera Mini[^;]*/);if(a){g.mobile=a[0];}}else{a=c.match(/MSIE\s([^;]*)/);if(a&&a[1]){g.ie=e(a[1]);}else{a=c.match(/Gecko\/([^\s]*)/);if(a){g.gecko=1;a=c.match(/rv:([^\s\)]*)/);if(a&&a[1]){g.gecko=e(a[1]);}}}}}}return g;};YAHOO.env.ua=YAHOO.env.parseUA();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var b=YAHOO_config.listener,a=YAHOO.env.listeners,d=true,c;if(b){for(c=0;c<a.length;c++){if(a[c]==b){d=false;break;}}if(d){a.push(b);}}}})();YAHOO.lang=YAHOO.lang||{};(function(){var f=YAHOO.lang,a=Object.prototype,c="[object Array]",h="[object Function]",i="[object Object]",b=[],g={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","/":"&#x2F;","`":"&#x60;"},d=["toString","valueOf"],e={isArray:function(j){return a.toString.apply(j)===c;},isBoolean:function(j){return typeof j==="boolean";},isFunction:function(j){return(typeof j==="function")||a.toString.apply(j)===h;},isNull:function(j){return j===null;},isNumber:function(j){return typeof j==="number"&&isFinite(j);},isObject:function(j){return(j&&(typeof j==="object"||f.isFunction(j)))||false;},isString:function(j){return typeof j==="string";},isUndefined:function(j){return typeof j==="undefined";},_IEEnumFix:(YAHOO.env.ua.ie)?function(l,k){var j,n,m;for(j=0;j<d.length;j=j+1){n=d[j];m=k[n];if(f.isFunction(m)&&m!=a[n]){l[n]=m;}}}:function(){},escapeHTML:function(j){return j.replace(/[&<>"'\/`]/g,function(k){return g[k];});},extend:function(m,n,l){if(!n||!m){throw new Error("extend failed, please check that "+"all dependencies are included.");}var k=function(){},j;k.prototype=n.prototype;m.prototype=new k();m.prototype.constructor=m;m.superclass=n.prototype;if(n.prototype.constructor==a.constructor){n.prototype.constructor=n;}if(l){for(j in l){if(f.hasOwnProperty(l,j)){m.prototype[j]=l[j];}}f._IEEnumFix(m.prototype,l);}},augmentObject:function(n,m){if(!m||!n){throw new Error("Absorb failed, verify dependencies.");}var j=arguments,l,o,k=j[2];if(k&&k!==true){for(l=2;l<j.length;l=l+1){n[j[l]]=m[j[l]];}}else{for(o in m){if(k||!(o in n)){n[o]=m[o];}}f._IEEnumFix(n,m);}return n;},augmentProto:function(m,l){if(!l||!m){throw new Error("Augment failed, verify dependencies.");}var j=[m.prototype,l.prototype],k;for(k=2;k<arguments.length;k=k+1){j.push(arguments[k]);}f.augmentObject.apply(this,j);return m;},dump:function(j,p){var l,n,r=[],t="{...}",k="f(){...}",q=", ",m=" => ";if(!f.isObject(j)){return j+"";}else{if(j instanceof Date||("nodeType" in j&&"tagName" in j)){return j;}else{if(f.isFunction(j)){return k;}}}p=(f.isNumber(p))?p:3;if(f.isArray(j)){r.push("[");for(l=0,n=j.length;l<n;l=l+1){if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}if(r.length>1){r.pop();}r.push("]");}else{r.push("{");for(l in j){if(f.hasOwnProperty(j,l)){r.push(l+m);if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}}if(r.length>1){r.pop();}r.push("}");}return r.join("");},substitute:function(x,y,E,l){var D,C,B,G,t,u,F=[],p,z=x.length,A="dump",r=" ",q="{",m="}",n,w;for(;;){D=x.lastIndexOf(q,z);if(D<0){break;}C=x.indexOf(m,D);if(D+1>C){break;}p=x.substring(D+1,C);G=p;u=null;B=G.indexOf(r);if(B>-1){u=G.substring(B+1);G=G.substring(0,B);}t=y[G];if(E){t=E(G,t,u);}if(f.isObject(t)){if(f.isArray(t)){t=f.dump(t,parseInt(u,10));}else{u=u||"";n=u.indexOf(A);if(n>-1){u=u.substring(4);}w=t.toString();if(w===i||n>-1){t=f.dump(t,parseInt(u,10));}else{t=w;}}}else{if(!f.isString(t)&&!f.isNumber(t)){t="~-"+F.length+"-~";F[F.length]=p;}}x=x.substring(0,D)+t+x.substring(C+1);if(l===false){z=D-1;}}for(D=F.length-1;D>=0;D=D-1){x=x.replace(new RegExp("~-"+D+"-~"),"{"+F[D]+"}","g");}return x;},trim:function(j){try{return j.replace(/^\s+|\s+$/g,"");}catch(k){return j;
}},merge:function(){var n={},k=arguments,j=k.length,m;for(m=0;m<j;m=m+1){f.augmentObject(n,k[m],true);}return n;},later:function(t,k,u,n,p){t=t||0;k=k||{};var l=u,s=n,q,j;if(f.isString(u)){l=k[u];}if(!l){throw new TypeError("method undefined");}if(!f.isUndefined(n)&&!f.isArray(s)){s=[n];}q=function(){l.apply(k,s||b);};j=(p)?setInterval(q,t):setTimeout(q,t);return{interval:p,cancel:function(){if(this.interval){clearInterval(j);}else{clearTimeout(j);}}};},isValue:function(j){return(f.isObject(j)||f.isString(j)||f.isNumber(j)||f.isBoolean(j));}};f.hasOwnProperty=(a.hasOwnProperty)?function(j,k){return j&&j.hasOwnProperty&&j.hasOwnProperty(k);}:function(j,k){return !f.isUndefined(j[k])&&j.constructor.prototype[k]!==j[k];};e.augmentObject(f,e,true);YAHOO.util.Lang=f;f.augment=f.augmentProto;YAHOO.augment=f.augmentProto;YAHOO.extend=f.extend;})();YAHOO.register("yahoo",YAHOO,{version:"2.9.0",build:"2800"});
//
//../pacotes/yui290/build/yahoo-dom-event/yahoo-dom-event.js
/*
Copyright (c) 2011, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 2.9.0
*/
if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={};}YAHOO.namespace=function(){var b=arguments,g=null,e,c,f;for(e=0;e<b.length;e=e+1){f=(""+b[e]).split(".");g=YAHOO;for(c=(f[0]=="YAHOO")?1:0;c<f.length;c=c+1){g[f[c]]=g[f[c]]||{};g=g[f[c]];}}return g;};YAHOO.log=function(d,a,c){var b=YAHOO.widget.Logger;if(b&&b.log){return b.log(d,a,c);}else{return false;}};YAHOO.register=function(a,f,e){var k=YAHOO.env.modules,c,j,h,g,d;if(!k[a]){k[a]={versions:[],builds:[]};}c=k[a];j=e.version;h=e.build;g=YAHOO.env.listeners;c.name=a;c.version=j;c.build=h;c.versions.push(j);c.builds.push(h);c.mainClass=f;for(d=0;d<g.length;d=d+1){g[d](c);}if(f){f.VERSION=j;f.BUILD=h;}else{YAHOO.log("mainClass is undefined for module "+a,"warn");}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(a){return YAHOO.env.modules[a]||null;};YAHOO.env.parseUA=function(d){var e=function(i){var j=0;return parseFloat(i.replace(/\./g,function(){return(j++==1)?"":".";}));},h=navigator,g={ie:0,opera:0,gecko:0,webkit:0,chrome:0,mobile:null,air:0,ipad:0,iphone:0,ipod:0,ios:null,android:0,webos:0,caja:h&&h.cajaVersion,secure:false,os:null},c=d||(navigator&&navigator.userAgent),f=window&&window.location,b=f&&f.href,a;g.secure=b&&(b.toLowerCase().indexOf("https")===0);if(c){if((/windows|win32/i).test(c)){g.os="windows";}else{if((/macintosh/i).test(c)){g.os="macintosh";}else{if((/rhino/i).test(c)){g.os="rhino";}}}if((/KHTML/).test(c)){g.webkit=1;}a=c.match(/AppleWebKit\/([^\s]*)/);if(a&&a[1]){g.webkit=e(a[1]);if(/ Mobile\//.test(c)){g.mobile="Apple";a=c.match(/OS ([^\s]*)/);if(a&&a[1]){a=e(a[1].replace("_","."));}g.ios=a;g.ipad=g.ipod=g.iphone=0;a=c.match(/iPad|iPod|iPhone/);if(a&&a[0]){g[a[0].toLowerCase()]=g.ios;}}else{a=c.match(/NokiaN[^\/]*|Android \d\.\d|webOS\/\d\.\d/);if(a){g.mobile=a[0];}if(/webOS/.test(c)){g.mobile="WebOS";a=c.match(/webOS\/([^\s]*);/);if(a&&a[1]){g.webos=e(a[1]);}}if(/ Android/.test(c)){g.mobile="Android";a=c.match(/Android ([^\s]*);/);if(a&&a[1]){g.android=e(a[1]);}}}a=c.match(/Chrome\/([^\s]*)/);if(a&&a[1]){g.chrome=e(a[1]);}else{a=c.match(/AdobeAIR\/([^\s]*)/);if(a){g.air=a[0];}}}if(!g.webkit){a=c.match(/Opera[\s\/]([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);a=c.match(/Version\/([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);}a=c.match(/Opera Mini[^;]*/);if(a){g.mobile=a[0];}}else{a=c.match(/MSIE\s([^;]*)/);if(a&&a[1]){g.ie=e(a[1]);}else{a=c.match(/Gecko\/([^\s]*)/);if(a){g.gecko=1;a=c.match(/rv:([^\s\)]*)/);if(a&&a[1]){g.gecko=e(a[1]);}}}}}}return g;};YAHOO.env.ua=YAHOO.env.parseUA();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var b=YAHOO_config.listener,a=YAHOO.env.listeners,d=true,c;if(b){for(c=0;c<a.length;c++){if(a[c]==b){d=false;break;}}if(d){a.push(b);}}}})();YAHOO.lang=YAHOO.lang||{};(function(){var f=YAHOO.lang,a=Object.prototype,c="[object Array]",h="[object Function]",i="[object Object]",b=[],g={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","/":"&#x2F;","`":"&#x60;"},d=["toString","valueOf"],e={isArray:function(j){return a.toString.apply(j)===c;},isBoolean:function(j){return typeof j==="boolean";},isFunction:function(j){return(typeof j==="function")||a.toString.apply(j)===h;},isNull:function(j){return j===null;},isNumber:function(j){return typeof j==="number"&&isFinite(j);},isObject:function(j){return(j&&(typeof j==="object"||f.isFunction(j)))||false;},isString:function(j){return typeof j==="string";},isUndefined:function(j){return typeof j==="undefined";},_IEEnumFix:(YAHOO.env.ua.ie)?function(l,k){var j,n,m;for(j=0;j<d.length;j=j+1){n=d[j];m=k[n];if(f.isFunction(m)&&m!=a[n]){l[n]=m;}}}:function(){},escapeHTML:function(j){return j.replace(/[&<>"'\/`]/g,function(k){return g[k];});},extend:function(m,n,l){if(!n||!m){throw new Error("extend failed, please check that "+"all dependencies are included.");}var k=function(){},j;k.prototype=n.prototype;m.prototype=new k();m.prototype.constructor=m;m.superclass=n.prototype;if(n.prototype.constructor==a.constructor){n.prototype.constructor=n;}if(l){for(j in l){if(f.hasOwnProperty(l,j)){m.prototype[j]=l[j];}}f._IEEnumFix(m.prototype,l);}},augmentObject:function(n,m){if(!m||!n){throw new Error("Absorb failed, verify dependencies.");}var j=arguments,l,o,k=j[2];if(k&&k!==true){for(l=2;l<j.length;l=l+1){n[j[l]]=m[j[l]];}}else{for(o in m){if(k||!(o in n)){n[o]=m[o];}}f._IEEnumFix(n,m);}return n;},augmentProto:function(m,l){if(!l||!m){throw new Error("Augment failed, verify dependencies.");}var j=[m.prototype,l.prototype],k;for(k=2;k<arguments.length;k=k+1){j.push(arguments[k]);}f.augmentObject.apply(this,j);return m;},dump:function(j,p){var l,n,r=[],t="{...}",k="f(){...}",q=", ",m=" => ";if(!f.isObject(j)){return j+"";}else{if(j instanceof Date||("nodeType" in j&&"tagName" in j)){return j;}else{if(f.isFunction(j)){return k;}}}p=(f.isNumber(p))?p:3;if(f.isArray(j)){r.push("[");for(l=0,n=j.length;l<n;l=l+1){if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}if(r.length>1){r.pop();}r.push("]");}else{r.push("{");for(l in j){if(f.hasOwnProperty(j,l)){r.push(l+m);if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}}if(r.length>1){r.pop();}r.push("}");}return r.join("");},substitute:function(x,y,E,l){var D,C,B,G,t,u,F=[],p,z=x.length,A="dump",r=" ",q="{",m="}",n,w;for(;;){D=x.lastIndexOf(q,z);if(D<0){break;}C=x.indexOf(m,D);if(D+1>C){break;}p=x.substring(D+1,C);G=p;u=null;B=G.indexOf(r);if(B>-1){u=G.substring(B+1);G=G.substring(0,B);}t=y[G];if(E){t=E(G,t,u);}if(f.isObject(t)){if(f.isArray(t)){t=f.dump(t,parseInt(u,10));}else{u=u||"";n=u.indexOf(A);if(n>-1){u=u.substring(4);}w=t.toString();if(w===i||n>-1){t=f.dump(t,parseInt(u,10));}else{t=w;}}}else{if(!f.isString(t)&&!f.isNumber(t)){t="~-"+F.length+"-~";F[F.length]=p;}}x=x.substring(0,D)+t+x.substring(C+1);if(l===false){z=D-1;}}for(D=F.length-1;D>=0;D=D-1){x=x.replace(new RegExp("~-"+D+"-~"),"{"+F[D]+"}","g");}return x;},trim:function(j){try{return j.replace(/^\s+|\s+$/g,"");}catch(k){return j;
}},merge:function(){var n={},k=arguments,j=k.length,m;for(m=0;m<j;m=m+1){f.augmentObject(n,k[m],true);}return n;},later:function(t,k,u,n,p){t=t||0;k=k||{};var l=u,s=n,q,j;if(f.isString(u)){l=k[u];}if(!l){throw new TypeError("method undefined");}if(!f.isUndefined(n)&&!f.isArray(s)){s=[n];}q=function(){l.apply(k,s||b);};j=(p)?setInterval(q,t):setTimeout(q,t);return{interval:p,cancel:function(){if(this.interval){clearInterval(j);}else{clearTimeout(j);}}};},isValue:function(j){return(f.isObject(j)||f.isString(j)||f.isNumber(j)||f.isBoolean(j));}};f.hasOwnProperty=(a.hasOwnProperty)?function(j,k){return j&&j.hasOwnProperty&&j.hasOwnProperty(k);}:function(j,k){return !f.isUndefined(j[k])&&j.constructor.prototype[k]!==j[k];};e.augmentObject(f,e,true);YAHOO.util.Lang=f;f.augment=f.augmentProto;YAHOO.augment=f.augmentProto;YAHOO.extend=f.extend;})();YAHOO.register("yahoo",YAHOO,{version:"2.9.0",build:"2800"});(function(){YAHOO.env._id_counter=YAHOO.env._id_counter||0;var e=YAHOO.util,k=YAHOO.lang,L=YAHOO.env.ua,a=YAHOO.lang.trim,B={},F={},m=/^t(?:able|d|h)$/i,w=/color$/i,j=window.document,v=j.documentElement,C="ownerDocument",M="defaultView",U="documentElement",S="compatMode",z="offsetLeft",o="offsetTop",T="offsetParent",x="parentNode",K="nodeType",c="tagName",n="scrollLeft",H="scrollTop",p="getBoundingClientRect",V="getComputedStyle",y="currentStyle",l="CSS1Compat",A="BackCompat",E="class",f="className",i="",b=" ",R="(?:^|\\s)",J="(?= |$)",t="g",O="position",D="fixed",u="relative",I="left",N="top",Q="medium",P="borderLeftWidth",q="borderTopWidth",d=L.opera,h=L.webkit,g=L.gecko,s=L.ie;e.Dom={CUSTOM_ATTRIBUTES:(!v.hasAttribute)?{"for":"htmlFor","class":f}:{"htmlFor":"for","className":E},DOT_ATTRIBUTES:{checked:true},get:function(aa){var ac,X,ab,Z,W,G,Y=null;if(aa){if(typeof aa=="string"||typeof aa=="number"){ac=aa+"";aa=j.getElementById(aa);G=(aa)?aa.attributes:null;if(aa&&G&&G.id&&G.id.value===ac){return aa;}else{if(aa&&j.all){aa=null;X=j.all[ac];if(X&&X.length){for(Z=0,W=X.length;Z<W;++Z){if(X[Z].id===ac){return X[Z];}}}}}}else{if(e.Element&&aa instanceof e.Element){aa=aa.get("element");}else{if(!aa.nodeType&&"length" in aa){ab=[];for(Z=0,W=aa.length;Z<W;++Z){ab[ab.length]=e.Dom.get(aa[Z]);}aa=ab;}}}Y=aa;}return Y;},getComputedStyle:function(G,W){if(window[V]){return G[C][M][V](G,null)[W];}else{if(G[y]){return e.Dom.IE_ComputedStyle.get(G,W);}}},getStyle:function(G,W){return e.Dom.batch(G,e.Dom._getStyle,W);},_getStyle:function(){if(window[V]){return function(G,Y){Y=(Y==="float")?Y="cssFloat":e.Dom._toCamel(Y);var X=G.style[Y],W;if(!X){W=G[C][M][V](G,null);if(W){X=W[Y];}}return X;};}else{if(v[y]){return function(G,Y){var X;switch(Y){case"opacity":X=100;try{X=G.filters["DXImageTransform.Microsoft.Alpha"].opacity;}catch(Z){try{X=G.filters("alpha").opacity;}catch(W){}}return X/100;case"float":Y="styleFloat";default:Y=e.Dom._toCamel(Y);X=G[y]?G[y][Y]:null;return(G.style[Y]||X);}};}}}(),setStyle:function(G,W,X){e.Dom.batch(G,e.Dom._setStyle,{prop:W,val:X});},_setStyle:function(){if(!window.getComputedStyle&&j.documentElement.currentStyle){return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){switch(X){case"opacity":if(Y===""||Y===null||Y===1){W.style.removeAttribute("filter");}else{if(k.isString(W.style.filter)){W.style.filter="alpha(opacity="+Y*100+")";if(!W[y]||!W[y].hasLayout){W.style.zoom=1;}}}break;case"float":X="styleFloat";default:W.style[X]=Y;}}else{}};}else{return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){if(X=="float"){X="cssFloat";}W.style[X]=Y;}else{}};}}(),getXY:function(G){return e.Dom.batch(G,e.Dom._getXY);},_canPosition:function(G){return(e.Dom._getStyle(G,"display")!=="none"&&e.Dom._inDoc(G));},_getXY:function(W){var X,G,Z,ab,Y,aa,ac=Math.round,ad=false;if(e.Dom._canPosition(W)){Z=W[p]();ab=W[C];X=e.Dom.getDocumentScrollLeft(ab);G=e.Dom.getDocumentScrollTop(ab);ad=[Z[I],Z[N]];if(Y||aa){ad[0]-=aa;ad[1]-=Y;}if((G||X)){ad[0]+=X;ad[1]+=G;}ad[0]=ac(ad[0]);ad[1]=ac(ad[1]);}else{}return ad;},getX:function(G){var W=function(X){return e.Dom.getXY(X)[0];};return e.Dom.batch(G,W,e.Dom,true);},getY:function(G){var W=function(X){return e.Dom.getXY(X)[1];};return e.Dom.batch(G,W,e.Dom,true);},setXY:function(G,X,W){e.Dom.batch(G,e.Dom._setXY,{pos:X,noRetry:W});},_setXY:function(G,Z){var aa=e.Dom._getStyle(G,O),Y=e.Dom.setStyle,ad=Z.pos,W=Z.noRetry,ab=[parseInt(e.Dom.getComputedStyle(G,I),10),parseInt(e.Dom.getComputedStyle(G,N),10)],ac,X;ac=e.Dom._getXY(G);if(!ad||ac===false){return false;}if(aa=="static"){aa=u;Y(G,O,aa);}if(isNaN(ab[0])){ab[0]=(aa==u)?0:G[z];}if(isNaN(ab[1])){ab[1]=(aa==u)?0:G[o];}if(ad[0]!==null){Y(G,I,ad[0]-ac[0]+ab[0]+"px");}if(ad[1]!==null){Y(G,N,ad[1]-ac[1]+ab[1]+"px");}if(!W){X=e.Dom._getXY(G);if((ad[0]!==null&&X[0]!=ad[0])||(ad[1]!==null&&X[1]!=ad[1])){e.Dom._setXY(G,{pos:ad,noRetry:true});}}},setX:function(W,G){e.Dom.setXY(W,[G,null]);},setY:function(G,W){e.Dom.setXY(G,[null,W]);},getRegion:function(G){var W=function(X){var Y=false;if(e.Dom._canPosition(X)){Y=e.Region.getRegion(X);}else{}return Y;};return e.Dom.batch(G,W,e.Dom,true);},getClientWidth:function(){return e.Dom.getViewportWidth();},getClientHeight:function(){return e.Dom.getViewportHeight();},getElementsByClassName:function(ab,af,ac,ae,X,ad){af=af||"*";ac=(ac)?e.Dom.get(ac):null||j;if(!ac){return[];}var W=[],G=ac.getElementsByTagName(af),Z=e.Dom.hasClass;for(var Y=0,aa=G.length;Y<aa;++Y){if(Z(G[Y],ab)){W[W.length]=G[Y];}}if(ae){e.Dom.batch(W,ae,X,ad);}return W;},hasClass:function(W,G){return e.Dom.batch(W,e.Dom._hasClass,G);},_hasClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(Y){Y=Y.replace(/\s+/g,b);}if(W.exec){G=W.test(Y);}else{G=W&&(b+Y+b).indexOf(b+W+b)>-1;}}else{}return G;},addClass:function(W,G){return e.Dom.batch(W,e.Dom._addClass,G);},_addClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(!e.Dom._hasClass(X,W)){e.Dom.setAttribute(X,f,a(Y+b+W));G=true;}}else{}return G;},removeClass:function(W,G){return e.Dom.batch(W,e.Dom._removeClass,G);},_removeClass:function(Y,X){var W=false,aa,Z,G;if(Y&&X){aa=e.Dom._getAttribute(Y,f)||i;e.Dom.setAttribute(Y,f,aa.replace(e.Dom._getClassRegex(X),i));Z=e.Dom._getAttribute(Y,f);if(aa!==Z){e.Dom.setAttribute(Y,f,a(Z));W=true;if(e.Dom._getAttribute(Y,f)===""){G=(Y.hasAttribute&&Y.hasAttribute(E))?E:f;Y.removeAttribute(G);}}}else{}return W;},replaceClass:function(X,W,G){return e.Dom.batch(X,e.Dom._replaceClass,{from:W,to:G});},_replaceClass:function(Y,X){var W,ab,aa,G=false,Z;if(Y&&X){ab=X.from;aa=X.to;if(!aa){G=false;}else{if(!ab){G=e.Dom._addClass(Y,X.to);}else{if(ab!==aa){Z=e.Dom._getAttribute(Y,f)||i;W=(b+Z.replace(e.Dom._getClassRegex(ab),b+aa).replace(/\s+/g,b)).split(e.Dom._getClassRegex(aa));W.splice(1,0,b+aa);e.Dom.setAttribute(Y,f,a(W.join(i)));G=true;}}}}else{}return G;},generateId:function(G,X){X=X||"yui-gen";var W=function(Y){if(Y&&Y.id){return Y.id;}var Z=X+YAHOO.env._id_counter++;
if(Y){if(Y[C]&&Y[C].getElementById(Z)){return e.Dom.generateId(Y,Z+X);}Y.id=Z;}return Z;};return e.Dom.batch(G,W,e.Dom,true)||W.apply(e.Dom,arguments);},isAncestor:function(W,X){W=e.Dom.get(W);X=e.Dom.get(X);var G=false;if((W&&X)&&(W[K]&&X[K])){if(W.contains&&W!==X){G=W.contains(X);}else{if(W.compareDocumentPosition){G=!!(W.compareDocumentPosition(X)&16);}}}else{}return G;},inDocument:function(G,W){return e.Dom._inDoc(e.Dom.get(G),W);},_inDoc:function(W,X){var G=false;if(W&&W[c]){X=X||W[C];G=e.Dom.isAncestor(X[U],W);}else{}return G;},getElementsBy:function(W,af,ab,ad,X,ac,ae){af=af||"*";ab=(ab)?e.Dom.get(ab):null||j;var aa=(ae)?null:[],G;if(ab){G=ab.getElementsByTagName(af);for(var Y=0,Z=G.length;Y<Z;++Y){if(W(G[Y])){if(ae){aa=G[Y];break;}else{aa[aa.length]=G[Y];}}}if(ad){e.Dom.batch(aa,ad,X,ac);}}return aa;},getElementBy:function(X,G,W){return e.Dom.getElementsBy(X,G,W,null,null,null,true);},batch:function(X,ab,aa,Z){var Y=[],W=(Z)?aa:null;X=(X&&(X[c]||X.item))?X:e.Dom.get(X);if(X&&ab){if(X[c]||X.length===undefined){return ab.call(W,X,aa);}for(var G=0;G<X.length;++G){Y[Y.length]=ab.call(W||X[G],X[G],aa);}}else{return false;}return Y;},getDocumentHeight:function(){var W=(j[S]!=l||h)?j.body.scrollHeight:v.scrollHeight,G=Math.max(W,e.Dom.getViewportHeight());return G;},getDocumentWidth:function(){var W=(j[S]!=l||h)?j.body.scrollWidth:v.scrollWidth,G=Math.max(W,e.Dom.getViewportWidth());return G;},getViewportHeight:function(){var G=self.innerHeight,W=j[S];if((W||s)&&!d){G=(W==l)?v.clientHeight:j.body.clientHeight;}return G;},getViewportWidth:function(){var G=self.innerWidth,W=j[S];if(W||s){G=(W==l)?v.clientWidth:j.body.clientWidth;}return G;},getAncestorBy:function(G,W){while((G=G[x])){if(e.Dom._testElement(G,W)){return G;}}return null;},getAncestorByClassName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return e.Dom.hasClass(Y,G);};return e.Dom.getAncestorBy(W,X);},getAncestorByTagName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return Y[c]&&Y[c].toUpperCase()==G.toUpperCase();};return e.Dom.getAncestorBy(W,X);},getPreviousSiblingBy:function(G,W){while(G){G=G.previousSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getPreviousSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getPreviousSiblingBy(G);},getNextSiblingBy:function(G,W){while(G){G=G.nextSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getNextSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getNextSiblingBy(G);},getFirstChildBy:function(G,X){var W=(e.Dom._testElement(G.firstChild,X))?G.firstChild:null;return W||e.Dom.getNextSiblingBy(G.firstChild,X);},getFirstChild:function(G,W){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getFirstChildBy(G);},getLastChildBy:function(G,X){if(!G){return null;}var W=(e.Dom._testElement(G.lastChild,X))?G.lastChild:null;return W||e.Dom.getPreviousSiblingBy(G.lastChild,X);},getLastChild:function(G){G=e.Dom.get(G);return e.Dom.getLastChildBy(G);},getChildrenBy:function(W,Y){var X=e.Dom.getFirstChildBy(W,Y),G=X?[X]:[];e.Dom.getNextSiblingBy(X,function(Z){if(!Y||Y(Z)){G[G.length]=Z;}return false;});return G;},getChildren:function(G){G=e.Dom.get(G);if(!G){}return e.Dom.getChildrenBy(G);},getDocumentScrollLeft:function(G){G=G||j;return Math.max(G[U].scrollLeft,G.body.scrollLeft);},getDocumentScrollTop:function(G){G=G||j;return Math.max(G[U].scrollTop,G.body.scrollTop);},insertBefore:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}return G[x].insertBefore(W,G);},insertAfter:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}if(G.nextSibling){return G[x].insertBefore(W,G.nextSibling);}else{return G[x].appendChild(W);}},getClientRegion:function(){var X=e.Dom.getDocumentScrollTop(),W=e.Dom.getDocumentScrollLeft(),Y=e.Dom.getViewportWidth()+W,G=e.Dom.getViewportHeight()+X;return new e.Region(X,Y,G,W);},setAttribute:function(W,G,X){e.Dom.batch(W,e.Dom._setAttribute,{attr:G,val:X});},_setAttribute:function(X,W){var G=e.Dom._toCamel(W.attr),Y=W.val;if(X&&X.setAttribute){if(e.Dom.DOT_ATTRIBUTES[G]&&X.tagName&&X.tagName!="BUTTON"){X[G]=Y;}else{G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;X.setAttribute(G,Y);}}else{}},getAttribute:function(W,G){return e.Dom.batch(W,e.Dom._getAttribute,G);},_getAttribute:function(W,G){var X;G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;if(e.Dom.DOT_ATTRIBUTES[G]){X=W[G];}else{if(W&&"getAttribute" in W){if(/^(?:href|src)$/.test(G)){X=W.getAttribute(G,2);}else{X=W.getAttribute(G);}}else{}}return X;},_toCamel:function(W){var X=B;function G(Y,Z){return Z.toUpperCase();}return X[W]||(X[W]=W.indexOf("-")===-1?W:W.replace(/-([a-z])/gi,G));},_getClassRegex:function(W){var G;if(W!==undefined){if(W.exec){G=W;}else{G=F[W];if(!G){W=W.replace(e.Dom._patterns.CLASS_RE_TOKENS,"\\$1");W=W.replace(/\s+/g,b);G=F[W]=new RegExp(R+W+J,t);}}}return G;},_patterns:{ROOT_TAG:/^body|html$/i,CLASS_RE_TOKENS:/([\.\(\)\^\$\*\+\?\|\[\]\{\}\\])/g},_testElement:function(G,W){return G&&G[K]==1&&(!W||W(G));},_calcBorders:function(X,Y){var W=parseInt(e.Dom[V](X,q),10)||0,G=parseInt(e.Dom[V](X,P),10)||0;if(g){if(m.test(X[c])){W=0;G=0;}}Y[0]+=G;Y[1]+=W;return Y;}};var r=e.Dom[V];if(L.opera){e.Dom[V]=function(W,G){var X=r(W,G);if(w.test(G)){X=e.Dom.Color.toRGB(X);}return X;};}if(L.webkit){e.Dom[V]=function(W,G){var X=r(W,G);if(X==="rgba(0, 0, 0, 0)"){X="transparent";}return X;};}if(L.ie&&L.ie>=8){e.Dom.DOT_ATTRIBUTES.type=true;}})();YAHOO.util.Region=function(d,e,a,c){this.top=d;this.y=d;this[1]=d;this.right=e;this.bottom=a;this.left=c;this.x=c;this[0]=c;this.width=this.right-this.left;this.height=this.bottom-this.top;};YAHOO.util.Region.prototype.contains=function(a){return(a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(f){var d=Math.max(this.top,f.top),e=Math.min(this.right,f.right),a=Math.min(this.bottom,f.bottom),c=Math.max(this.left,f.left);
if(a>=d&&e>=c){return new YAHOO.util.Region(d,e,a,c);}else{return null;}};YAHOO.util.Region.prototype.union=function(f){var d=Math.min(this.top,f.top),e=Math.max(this.right,f.right),a=Math.max(this.bottom,f.bottom),c=Math.min(this.left,f.left);return new YAHOO.util.Region(d,e,a,c);};YAHOO.util.Region.prototype.toString=function(){return("Region {"+"top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+", height: "+this.height+", width: "+this.width+"}");};YAHOO.util.Region.getRegion=function(e){var g=YAHOO.util.Dom.getXY(e),d=g[1],f=g[0]+e.offsetWidth,a=g[1]+e.offsetHeight,c=g[0];return new YAHOO.util.Region(d,f,a,c);};YAHOO.util.Point=function(a,b){if(YAHOO.lang.isArray(a)){b=a[1];a=a[0];}YAHOO.util.Point.superclass.constructor.call(this,b,a,b,a);};YAHOO.extend(YAHOO.util.Point,YAHOO.util.Region);(function(){var b=YAHOO.util,a="clientTop",f="clientLeft",j="parentNode",k="right",w="hasLayout",i="px",u="opacity",l="auto",d="borderLeftWidth",g="borderTopWidth",p="borderRightWidth",v="borderBottomWidth",s="visible",q="transparent",n="height",e="width",h="style",t="currentStyle",r=/^width|height$/,o=/^(\d[.\d]*)+(em|ex|px|gd|rem|vw|vh|vm|ch|mm|cm|in|pt|pc|deg|rad|ms|s|hz|khz|%){1}?/i,m={get:function(x,z){var y="",A=x[t][z];if(z===u){y=b.Dom.getStyle(x,u);}else{if(!A||(A.indexOf&&A.indexOf(i)>-1)){y=A;}else{if(b.Dom.IE_COMPUTED[z]){y=b.Dom.IE_COMPUTED[z](x,z);}else{if(o.test(A)){y=b.Dom.IE.ComputedStyle.getPixel(x,z);}else{y=A;}}}}return y;},getOffset:function(z,E){var B=z[t][E],x=E.charAt(0).toUpperCase()+E.substr(1),C="offset"+x,y="pixel"+x,A="",D;if(B==l){D=z[C];if(D===undefined){A=0;}A=D;if(r.test(E)){z[h][E]=D;if(z[C]>D){A=D-(z[C]-D);}z[h][E]=l;}}else{if(!z[h][y]&&!z[h][E]){z[h][E]=B;}A=z[h][y];}return A+i;},getBorderWidth:function(x,z){var y=null;if(!x[t][w]){x[h].zoom=1;}switch(z){case g:y=x[a];break;case v:y=x.offsetHeight-x.clientHeight-x[a];break;case d:y=x[f];break;case p:y=x.offsetWidth-x.clientWidth-x[f];break;}return y+i;},getPixel:function(y,x){var A=null,B=y[t][k],z=y[t][x];y[h][k]=z;A=y[h].pixelRight;y[h][k]=B;return A+i;},getMargin:function(y,x){var z;if(y[t][x]==l){z=0+i;}else{z=b.Dom.IE.ComputedStyle.getPixel(y,x);}return z;},getVisibility:function(y,x){var z;while((z=y[t])&&z[x]=="inherit"){y=y[j];}return(z)?z[x]:s;},getColor:function(y,x){return b.Dom.Color.toRGB(y[t][x])||q;},getBorderColor:function(y,x){var z=y[t],A=z[x]||z.color;return b.Dom.Color.toRGB(b.Dom.Color.toHex(A));}},c={};c.top=c.right=c.bottom=c.left=c[e]=c[n]=m.getOffset;c.color=m.getColor;c[g]=c[p]=c[v]=c[d]=m.getBorderWidth;c.marginTop=c.marginRight=c.marginBottom=c.marginLeft=m.getMargin;c.visibility=m.getVisibility;c.borderColor=c.borderTopColor=c.borderRightColor=c.borderBottomColor=c.borderLeftColor=m.getBorderColor;b.Dom.IE_COMPUTED=c;b.Dom.IE_ComputedStyle=m;})();(function(){var c="toString",a=parseInt,b=RegExp,d=YAHOO.util;d.Dom.Color={KEYWORDS:{black:"000",silver:"c0c0c0",gray:"808080",white:"fff",maroon:"800000",red:"f00",purple:"800080",fuchsia:"f0f",green:"008000",lime:"0f0",olive:"808000",yellow:"ff0",navy:"000080",blue:"00f",teal:"008080",aqua:"0ff"},re_RGB:/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,re_hex:/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i,re_hex3:/([0-9A-F])/gi,toRGB:function(e){if(!d.Dom.Color.re_RGB.test(e)){e=d.Dom.Color.toHex(e);}if(d.Dom.Color.re_hex.exec(e)){e="rgb("+[a(b.$1,16),a(b.$2,16),a(b.$3,16)].join(", ")+")";}return e;},toHex:function(f){f=d.Dom.Color.KEYWORDS[f]||f;if(d.Dom.Color.re_RGB.exec(f)){f=[Number(b.$1).toString(16),Number(b.$2).toString(16),Number(b.$3).toString(16)];for(var e=0;e<f.length;e++){if(f[e].length<2){f[e]="0"+f[e];}}f=f.join("");}if(f.length<6){f=f.replace(d.Dom.Color.re_hex3,"$1$1");}if(f!=="transparent"&&f.indexOf("#")<0){f="#"+f;}return f.toUpperCase();}};}());YAHOO.register("dom",YAHOO.util.Dom,{version:"2.9.0",build:"2800"});YAHOO.util.CustomEvent=function(d,c,b,a,e){this.type=d;this.scope=c||window;this.silent=b;this.fireOnce=e;this.fired=false;this.firedWith=null;this.signature=a||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}var f="_YUICEOnSubscribe";if(d!==f){this.subscribeEvent=new YAHOO.util.CustomEvent(f,this,true);}this.lastError=null;};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(b,c,d){if(!b){throw new Error("Invalid callback for subscriber to '"+this.type+"'");}if(this.subscribeEvent){this.subscribeEvent.fire(b,c,d);}var a=new YAHOO.util.Subscriber(b,c,d);if(this.fireOnce&&this.fired){this.notify(a,this.firedWith);}else{this.subscribers.push(a);}},unsubscribe:function(d,f){if(!d){return this.unsubscribeAll();}var e=false;for(var b=0,a=this.subscribers.length;b<a;++b){var c=this.subscribers[b];if(c&&c.contains(d,f)){this._delete(b);e=true;}}return e;},fire:function(){this.lastError=null;var h=[],a=this.subscribers.length;var d=[].slice.call(arguments,0),c=true,f,b=false;if(this.fireOnce){if(this.fired){return true;}else{this.firedWith=d;}}this.fired=true;if(!a&&this.silent){return true;}if(!this.silent){}var e=this.subscribers.slice();for(f=0;f<a;++f){var g=e[f];if(!g||!g.fn){b=true;}else{c=this.notify(g,d);if(false===c){if(!this.silent){}break;}}}return(c!==false);},notify:function(g,c){var b,i=null,f=g.getScope(this.scope),a=YAHOO.util.Event.throwErrors;if(!this.silent){}if(this.signature==YAHOO.util.CustomEvent.FLAT){if(c.length>0){i=c[0];}try{b=g.fn.call(f,i,g.obj);}catch(h){this.lastError=h;if(a){throw h;}}}else{try{b=g.fn.call(f,this.type,c,g.obj);}catch(d){this.lastError=d;if(a){throw d;}}}return b;},unsubscribeAll:function(){var a=this.subscribers.length,b;for(b=a-1;b>-1;b--){this._delete(b);}this.subscribers=[];return a;},_delete:function(a){var b=this.subscribers[a];if(b){delete b.fn;delete b.obj;}this.subscribers.splice(a,1);},toString:function(){return"CustomEvent: "+"'"+this.type+"', "+"context: "+this.scope;}};YAHOO.util.Subscriber=function(a,b,c){this.fn=a;this.obj=YAHOO.lang.isUndefined(b)?null:b;this.overrideContext=c;};YAHOO.util.Subscriber.prototype.getScope=function(a){if(this.overrideContext){if(this.overrideContext===true){return this.obj;}else{return this.overrideContext;}}return a;};YAHOO.util.Subscriber.prototype.contains=function(a,b){if(b){return(this.fn==a&&this.obj==b);}else{return(this.fn==a);}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+this.obj+", overrideContext: "+(this.overrideContext||"no")+" }";};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var g=false,h=[],j=[],a=0,e=[],b=0,c={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9},d=YAHOO.env.ua.ie,f="focusin",i="focusout";return{POLL_RETRYS:500,POLL_INTERVAL:40,EL:0,TYPE:1,FN:2,WFN:3,UNLOAD_OBJ:3,ADJ_SCOPE:4,OBJ:5,OVERRIDE:6,CAPTURE:7,lastError:null,isSafari:YAHOO.env.ua.webkit,webkit:YAHOO.env.ua.webkit,isIE:d,_interval:null,_dri:null,_specialTypes:{focusin:(d?"focusin":"focus"),focusout:(d?"focusout":"blur")},DOMReady:false,throwErrors:false,startInterval:function(){if(!this._interval){this._interval=YAHOO.lang.later(this.POLL_INTERVAL,this,this._tryPreloadAttach,null,true);}},onAvailable:function(q,m,o,p,n){var k=(YAHOO.lang.isString(q))?[q]:q;for(var l=0;l<k.length;l=l+1){e.push({id:k[l],fn:m,obj:o,overrideContext:p,checkReady:n});}a=this.POLL_RETRYS;this.startInterval();},onContentReady:function(n,k,l,m){this.onAvailable(n,k,l,m,true);},onDOMReady:function(){this.DOMReadyEvent.subscribe.apply(this.DOMReadyEvent,arguments);},_addListener:function(m,k,v,p,t,y){if(!v||!v.call){return false;}if(this._isValidCollection(m)){var w=true;for(var q=0,s=m.length;q<s;++q){w=this.on(m[q],k,v,p,t)&&w;}return w;}else{if(YAHOO.lang.isString(m)){var o=this.getEl(m);if(o){m=o;}else{this.onAvailable(m,function(){YAHOO.util.Event._addListener(m,k,v,p,t,y);});return true;}}}if(!m){return false;}if("unload"==k&&p!==this){j[j.length]=[m,k,v,p,t];return true;}var l=m;if(t){if(t===true){l=p;}else{l=t;}}var n=function(z){return v.call(l,YAHOO.util.Event.getEvent(z,m),p);};var x=[m,k,v,n,l,p,t,y];var r=h.length;h[r]=x;try{this._simpleAdd(m,k,n,y);}catch(u){this.lastError=u;this.removeListener(m,k,v);return false;}return true;},_getType:function(k){return this._specialTypes[k]||k;},addListener:function(m,p,l,n,o){var k=((p==f||p==i)&&!YAHOO.env.ua.ie)?true:false;return this._addListener(m,this._getType(p),l,n,o,k);},addFocusListener:function(l,k,m,n){return this.on(l,f,k,m,n);},removeFocusListener:function(l,k){return this.removeListener(l,f,k);},addBlurListener:function(l,k,m,n){return this.on(l,i,k,m,n);},removeBlurListener:function(l,k){return this.removeListener(l,i,k);},removeListener:function(l,k,r){var m,p,u;k=this._getType(k);if(typeof l=="string"){l=this.getEl(l);}else{if(this._isValidCollection(l)){var s=true;for(m=l.length-1;m>-1;m--){s=(this.removeListener(l[m],k,r)&&s);}return s;}}if(!r||!r.call){return this.purgeElement(l,false,k);}if("unload"==k){for(m=j.length-1;m>-1;m--){u=j[m];if(u&&u[0]==l&&u[1]==k&&u[2]==r){j.splice(m,1);return true;}}return false;}var n=null;var o=arguments[3];if("undefined"===typeof o){o=this._getCacheIndex(h,l,k,r);}if(o>=0){n=h[o];}if(!l||!n){return false;}var t=n[this.CAPTURE]===true?true:false;try{this._simpleRemove(l,k,n[this.WFN],t);}catch(q){this.lastError=q;return false;}delete h[o][this.WFN];delete h[o][this.FN];h.splice(o,1);return true;},getTarget:function(m,l){var k=m.target||m.srcElement;return this.resolveTextNode(k);},resolveTextNode:function(l){try{if(l&&3==l.nodeType){return l.parentNode;}}catch(k){return null;}return l;},getPageX:function(l){var k=l.pageX;if(!k&&0!==k){k=l.clientX||0;if(this.isIE){k+=this._getScrollLeft();}}return k;},getPageY:function(k){var l=k.pageY;if(!l&&0!==l){l=k.clientY||0;if(this.isIE){l+=this._getScrollTop();}}return l;},getXY:function(k){return[this.getPageX(k),this.getPageY(k)];},getRelatedTarget:function(l){var k=l.relatedTarget;
if(!k){if(l.type=="mouseout"){k=l.toElement;}else{if(l.type=="mouseover"){k=l.fromElement;}}}return this.resolveTextNode(k);},getTime:function(m){if(!m.time){var l=new Date().getTime();try{m.time=l;}catch(k){this.lastError=k;return l;}}return m.time;},stopEvent:function(k){this.stopPropagation(k);this.preventDefault(k);},stopPropagation:function(k){if(k.stopPropagation){k.stopPropagation();}else{k.cancelBubble=true;}},preventDefault:function(k){if(k.preventDefault){k.preventDefault();}else{k.returnValue=false;}},getEvent:function(m,k){var l=m||window.event;if(!l){var n=this.getEvent.caller;while(n){l=n.arguments[0];if(l&&Event==l.constructor){break;}n=n.caller;}}return l;},getCharCode:function(l){var k=l.keyCode||l.charCode||0;if(YAHOO.env.ua.webkit&&(k in c)){k=c[k];}return k;},_getCacheIndex:function(n,q,r,p){for(var o=0,m=n.length;o<m;o=o+1){var k=n[o];if(k&&k[this.FN]==p&&k[this.EL]==q&&k[this.TYPE]==r){return o;}}return -1;},generateId:function(k){var l=k.id;if(!l){l="yuievtautoid-"+b;++b;k.id=l;}return l;},_isValidCollection:function(l){try{return(l&&typeof l!=="string"&&l.length&&!l.tagName&&!l.alert&&typeof l[0]!=="undefined");}catch(k){return false;}},elCache:{},getEl:function(k){return(typeof k==="string")?document.getElementById(k):k;},clearCache:function(){},DOMReadyEvent:new YAHOO.util.CustomEvent("DOMReady",YAHOO,0,0,1),_load:function(l){if(!g){g=true;var k=YAHOO.util.Event;k._ready();k._tryPreloadAttach();}},_ready:function(l){var k=YAHOO.util.Event;if(!k.DOMReady){k.DOMReady=true;k.DOMReadyEvent.fire();k._simpleRemove(document,"DOMContentLoaded",k._ready);}},_tryPreloadAttach:function(){if(e.length===0){a=0;if(this._interval){this._interval.cancel();this._interval=null;}return;}if(this.locked){return;}if(this.isIE){if(!this.DOMReady){this.startInterval();return;}}this.locked=true;var q=!g;if(!q){q=(a>0&&e.length>0);}var p=[];var r=function(t,u){var s=t;if(u.overrideContext){if(u.overrideContext===true){s=u.obj;}else{s=u.overrideContext;}}u.fn.call(s,u.obj);};var l,k,o,n,m=[];for(l=0,k=e.length;l<k;l=l+1){o=e[l];if(o){n=this.getEl(o.id);if(n){if(o.checkReady){if(g||n.nextSibling||!q){m.push(o);e[l]=null;}}else{r(n,o);e[l]=null;}}else{p.push(o);}}}for(l=0,k=m.length;l<k;l=l+1){o=m[l];r(this.getEl(o.id),o);}a--;if(q){for(l=e.length-1;l>-1;l--){o=e[l];if(!o||!o.id){e.splice(l,1);}}this.startInterval();}else{if(this._interval){this._interval.cancel();this._interval=null;}}this.locked=false;},purgeElement:function(p,q,s){var n=(YAHOO.lang.isString(p))?this.getEl(p):p;var r=this.getListeners(n,s),o,k;if(r){for(o=r.length-1;o>-1;o--){var m=r[o];this.removeListener(n,m.type,m.fn);}}if(q&&n&&n.childNodes){for(o=0,k=n.childNodes.length;o<k;++o){this.purgeElement(n.childNodes[o],q,s);}}},getListeners:function(n,k){var q=[],m;if(!k){m=[h,j];}else{if(k==="unload"){m=[j];}else{k=this._getType(k);m=[h];}}var s=(YAHOO.lang.isString(n))?this.getEl(n):n;for(var p=0;p<m.length;p=p+1){var u=m[p];if(u){for(var r=0,t=u.length;r<t;++r){var o=u[r];if(o&&o[this.EL]===s&&(!k||k===o[this.TYPE])){q.push({type:o[this.TYPE],fn:o[this.FN],obj:o[this.OBJ],adjust:o[this.OVERRIDE],scope:o[this.ADJ_SCOPE],index:r});}}}}return(q.length)?q:null;},_unload:function(s){var m=YAHOO.util.Event,p,o,n,r,q,t=j.slice(),k;for(p=0,r=j.length;p<r;++p){n=t[p];if(n){try{k=window;if(n[m.ADJ_SCOPE]){if(n[m.ADJ_SCOPE]===true){k=n[m.UNLOAD_OBJ];}else{k=n[m.ADJ_SCOPE];}}n[m.FN].call(k,m.getEvent(s,n[m.EL]),n[m.UNLOAD_OBJ]);}catch(w){}t[p]=null;}}n=null;k=null;j=null;if(h){for(o=h.length-1;o>-1;o--){n=h[o];if(n){try{m.removeListener(n[m.EL],n[m.TYPE],n[m.FN],o);}catch(v){}}}n=null;}try{m._simpleRemove(window,"unload",m._unload);m._simpleRemove(window,"load",m._load);}catch(u){}},_getScrollLeft:function(){return this._getScroll()[1];},_getScrollTop:function(){return this._getScroll()[0];},_getScroll:function(){var k=document.documentElement,l=document.body;if(k&&(k.scrollTop||k.scrollLeft)){return[k.scrollTop,k.scrollLeft];}else{if(l){return[l.scrollTop,l.scrollLeft];}else{return[0,0];}}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(m,n,l,k){m.addEventListener(n,l,(k));};}else{if(window.attachEvent){return function(m,n,l,k){m.attachEvent("on"+n,l);};}else{return function(){};}}}(),_simpleRemove:function(){if(window.removeEventListener){return function(m,n,l,k){m.removeEventListener(n,l,(k));};}else{if(window.detachEvent){return function(l,m,k){l.detachEvent("on"+m,k);};}else{return function(){};}}}()};}();(function(){var a=YAHOO.util.Event;a.on=a.addListener;a.onFocus=a.addFocusListener;a.onBlur=a.addBlurListener;
/*! DOMReady: based on work by: Dean Edwards/John Resig/Matthias Miller/Diego Perini */
if(a.isIE){if(self!==self.top){document.onreadystatechange=function(){if(document.readyState=="complete"){document.onreadystatechange=null;a._ready();}};}else{YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);var b=document.createElement("p");a._dri=setInterval(function(){try{b.doScroll("left");clearInterval(a._dri);a._dri=null;a._ready();b=null;}catch(c){}},a.POLL_INTERVAL);}}else{if(a.webkit&&a.webkit<525){a._dri=setInterval(function(){var c=document.readyState;if("loaded"==c||"complete"==c){clearInterval(a._dri);a._dri=null;a._ready();}},a.POLL_INTERVAL);}else{a._simpleAdd(document,"DOMContentLoaded",a._ready);}}a._simpleAdd(window,"load",a._load);a._simpleAdd(window,"unload",a._unload);a._tryPreloadAttach();})();}YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(a,c,f,e){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[a];if(d){d.subscribe(c,f,e);}else{this.__yui_subscribers=this.__yui_subscribers||{};var b=this.__yui_subscribers;if(!b[a]){b[a]=[];}b[a].push({fn:c,obj:f,overrideContext:e});}},unsubscribe:function(c,e,g){this.__yui_events=this.__yui_events||{};var a=this.__yui_events;if(c){var f=a[c];if(f){return f.unsubscribe(e,g);}}else{var b=true;for(var d in a){if(YAHOO.lang.hasOwnProperty(a,d)){b=b&&a[d].unsubscribe(e,g);
}}return b;}return false;},unsubscribeAll:function(a){return this.unsubscribe(a);},createEvent:function(b,g){this.__yui_events=this.__yui_events||{};var e=g||{},d=this.__yui_events,f;if(d[b]){}else{f=new YAHOO.util.CustomEvent(b,e.scope||this,e.silent,YAHOO.util.CustomEvent.FLAT,e.fireOnce);d[b]=f;if(e.onSubscribeCallback){f.subscribeEvent.subscribe(e.onSubscribeCallback);}this.__yui_subscribers=this.__yui_subscribers||{};var a=this.__yui_subscribers[b];if(a){for(var c=0;c<a.length;++c){f.subscribe(a[c].fn,a[c].obj,a[c].overrideContext);}}}return d[b];},fireEvent:function(b){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[b];if(!d){return null;}var a=[];for(var c=1;c<arguments.length;++c){a.push(arguments[c]);}return d.fire.apply(d,a);},hasEvent:function(a){if(this.__yui_events){if(this.__yui_events[a]){return true;}}return false;}};(function(){var a=YAHOO.util.Event,c=YAHOO.lang;YAHOO.util.KeyListener=function(d,i,e,f){if(!d){}else{if(!i){}else{if(!e){}}}if(!f){f=YAHOO.util.KeyListener.KEYDOWN;}var g=new YAHOO.util.CustomEvent("keyPressed");this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEvent=new YAHOO.util.CustomEvent("disabled");if(c.isString(d)){d=document.getElementById(d);}if(c.isFunction(e)){g.subscribe(e);}else{g.subscribe(e.fn,e.scope,e.correctScope);}function h(o,n){if(!i.shift){i.shift=false;}if(!i.alt){i.alt=false;}if(!i.ctrl){i.ctrl=false;}if(o.shiftKey==i.shift&&o.altKey==i.alt&&o.ctrlKey==i.ctrl){var j,m=i.keys,l;if(YAHOO.lang.isArray(m)){for(var k=0;k<m.length;k++){j=m[k];l=a.getCharCode(o);if(j==l){g.fire(l,o);break;}}}else{l=a.getCharCode(o);if(m==l){g.fire(l,o);}}}}this.enable=function(){if(!this.enabled){a.on(d,f,h);this.enabledEvent.fire(i);}this.enabled=true;};this.disable=function(){if(this.enabled){a.removeListener(d,f,h);this.disabledEvent.fire(i);}this.enabled=false;};this.toString=function(){return"KeyListener ["+i.keys+"] "+d.tagName+(d.id?"["+d.id+"]":"");};};var b=YAHOO.util.KeyListener;b.KEYDOWN="keydown";b.KEYUP="keyup";b.KEY={ALT:18,BACK_SPACE:8,CAPS_LOCK:20,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,META:224,NUM_LOCK:144,PAGE_DOWN:34,PAGE_UP:33,PAUSE:19,PRINTSCREEN:44,RIGHT:39,SCROLL_LOCK:145,SHIFT:16,SPACE:32,TAB:9,UP:38};})();YAHOO.register("event",YAHOO.util.Event,{version:"2.9.0",build:"2800"});YAHOO.register("yahoo-dom-event", YAHOO, {version: "2.9.0", build: "2800"});
//
//../pacotes/yui290/build/dom/dom-min.js
/*
Copyright (c) 2011, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 2.9.0
*/
(function(){YAHOO.env._id_counter=YAHOO.env._id_counter||0;var e=YAHOO.util,k=YAHOO.lang,L=YAHOO.env.ua,a=YAHOO.lang.trim,B={},F={},m=/^t(?:able|d|h)$/i,w=/color$/i,j=window.document,v=j.documentElement,C="ownerDocument",M="defaultView",U="documentElement",S="compatMode",z="offsetLeft",o="offsetTop",T="offsetParent",x="parentNode",K="nodeType",c="tagName",n="scrollLeft",H="scrollTop",p="getBoundingClientRect",V="getComputedStyle",y="currentStyle",l="CSS1Compat",A="BackCompat",E="class",f="className",i="",b=" ",R="(?:^|\\s)",J="(?= |$)",t="g",O="position",D="fixed",u="relative",I="left",N="top",Q="medium",P="borderLeftWidth",q="borderTopWidth",d=L.opera,h=L.webkit,g=L.gecko,s=L.ie;e.Dom={CUSTOM_ATTRIBUTES:(!v.hasAttribute)?{"for":"htmlFor","class":f}:{"htmlFor":"for","className":E},DOT_ATTRIBUTES:{checked:true},get:function(aa){var ac,X,ab,Z,W,G,Y=null;if(aa){if(typeof aa=="string"||typeof aa=="number"){ac=aa+"";aa=j.getElementById(aa);G=(aa)?aa.attributes:null;if(aa&&G&&G.id&&G.id.value===ac){return aa;}else{if(aa&&j.all){aa=null;X=j.all[ac];if(X&&X.length){for(Z=0,W=X.length;Z<W;++Z){if(X[Z].id===ac){return X[Z];}}}}}}else{if(e.Element&&aa instanceof e.Element){aa=aa.get("element");}else{if(!aa.nodeType&&"length" in aa){ab=[];for(Z=0,W=aa.length;Z<W;++Z){ab[ab.length]=e.Dom.get(aa[Z]);}aa=ab;}}}Y=aa;}return Y;},getComputedStyle:function(G,W){if(window[V]){return G[C][M][V](G,null)[W];}else{if(G[y]){return e.Dom.IE_ComputedStyle.get(G,W);}}},getStyle:function(G,W){return e.Dom.batch(G,e.Dom._getStyle,W);},_getStyle:function(){if(window[V]){return function(G,Y){Y=(Y==="float")?Y="cssFloat":e.Dom._toCamel(Y);var X=G.style[Y],W;if(!X){W=G[C][M][V](G,null);if(W){X=W[Y];}}return X;};}else{if(v[y]){return function(G,Y){var X;switch(Y){case"opacity":X=100;try{X=G.filters["DXImageTransform.Microsoft.Alpha"].opacity;}catch(Z){try{X=G.filters("alpha").opacity;}catch(W){}}return X/100;case"float":Y="styleFloat";default:Y=e.Dom._toCamel(Y);X=G[y]?G[y][Y]:null;return(G.style[Y]||X);}};}}}(),setStyle:function(G,W,X){e.Dom.batch(G,e.Dom._setStyle,{prop:W,val:X});},_setStyle:function(){if(!window.getComputedStyle&&j.documentElement.currentStyle){return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){switch(X){case"opacity":if(Y===""||Y===null||Y===1){W.style.removeAttribute("filter");}else{if(k.isString(W.style.filter)){W.style.filter="alpha(opacity="+Y*100+")";if(!W[y]||!W[y].hasLayout){W.style.zoom=1;}}}break;case"float":X="styleFloat";default:W.style[X]=Y;}}else{}};}else{return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){if(X=="float"){X="cssFloat";}W.style[X]=Y;}else{}};}}(),getXY:function(G){return e.Dom.batch(G,e.Dom._getXY);},_canPosition:function(G){return(e.Dom._getStyle(G,"display")!=="none"&&e.Dom._inDoc(G));},_getXY:function(W){var X,G,Z,ab,Y,aa,ac=Math.round,ad=false;if(e.Dom._canPosition(W)){Z=W[p]();ab=W[C];X=e.Dom.getDocumentScrollLeft(ab);G=e.Dom.getDocumentScrollTop(ab);ad=[Z[I],Z[N]];if(Y||aa){ad[0]-=aa;ad[1]-=Y;}if((G||X)){ad[0]+=X;ad[1]+=G;}ad[0]=ac(ad[0]);ad[1]=ac(ad[1]);}else{}return ad;},getX:function(G){var W=function(X){return e.Dom.getXY(X)[0];};return e.Dom.batch(G,W,e.Dom,true);},getY:function(G){var W=function(X){return e.Dom.getXY(X)[1];};return e.Dom.batch(G,W,e.Dom,true);},setXY:function(G,X,W){e.Dom.batch(G,e.Dom._setXY,{pos:X,noRetry:W});},_setXY:function(G,Z){var aa=e.Dom._getStyle(G,O),Y=e.Dom.setStyle,ad=Z.pos,W=Z.noRetry,ab=[parseInt(e.Dom.getComputedStyle(G,I),10),parseInt(e.Dom.getComputedStyle(G,N),10)],ac,X;ac=e.Dom._getXY(G);if(!ad||ac===false){return false;}if(aa=="static"){aa=u;Y(G,O,aa);}if(isNaN(ab[0])){ab[0]=(aa==u)?0:G[z];}if(isNaN(ab[1])){ab[1]=(aa==u)?0:G[o];}if(ad[0]!==null){Y(G,I,ad[0]-ac[0]+ab[0]+"px");}if(ad[1]!==null){Y(G,N,ad[1]-ac[1]+ab[1]+"px");}if(!W){X=e.Dom._getXY(G);if((ad[0]!==null&&X[0]!=ad[0])||(ad[1]!==null&&X[1]!=ad[1])){e.Dom._setXY(G,{pos:ad,noRetry:true});}}},setX:function(W,G){e.Dom.setXY(W,[G,null]);},setY:function(G,W){e.Dom.setXY(G,[null,W]);},getRegion:function(G){var W=function(X){var Y=false;if(e.Dom._canPosition(X)){Y=e.Region.getRegion(X);}else{}return Y;};return e.Dom.batch(G,W,e.Dom,true);},getClientWidth:function(){return e.Dom.getViewportWidth();},getClientHeight:function(){return e.Dom.getViewportHeight();},getElementsByClassName:function(ab,af,ac,ae,X,ad){af=af||"*";ac=(ac)?e.Dom.get(ac):null||j;if(!ac){return[];}var W=[],G=ac.getElementsByTagName(af),Z=e.Dom.hasClass;for(var Y=0,aa=G.length;Y<aa;++Y){if(Z(G[Y],ab)){W[W.length]=G[Y];}}if(ae){e.Dom.batch(W,ae,X,ad);}return W;},hasClass:function(W,G){return e.Dom.batch(W,e.Dom._hasClass,G);},_hasClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(Y){Y=Y.replace(/\s+/g,b);}if(W.exec){G=W.test(Y);}else{G=W&&(b+Y+b).indexOf(b+W+b)>-1;}}else{}return G;},addClass:function(W,G){return e.Dom.batch(W,e.Dom._addClass,G);},_addClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(!e.Dom._hasClass(X,W)){e.Dom.setAttribute(X,f,a(Y+b+W));G=true;}}else{}return G;},removeClass:function(W,G){return e.Dom.batch(W,e.Dom._removeClass,G);},_removeClass:function(Y,X){var W=false,aa,Z,G;if(Y&&X){aa=e.Dom._getAttribute(Y,f)||i;e.Dom.setAttribute(Y,f,aa.replace(e.Dom._getClassRegex(X),i));Z=e.Dom._getAttribute(Y,f);if(aa!==Z){e.Dom.setAttribute(Y,f,a(Z));W=true;if(e.Dom._getAttribute(Y,f)===""){G=(Y.hasAttribute&&Y.hasAttribute(E))?E:f;Y.removeAttribute(G);}}}else{}return W;},replaceClass:function(X,W,G){return e.Dom.batch(X,e.Dom._replaceClass,{from:W,to:G});},_replaceClass:function(Y,X){var W,ab,aa,G=false,Z;if(Y&&X){ab=X.from;aa=X.to;if(!aa){G=false;}else{if(!ab){G=e.Dom._addClass(Y,X.to);}else{if(ab!==aa){Z=e.Dom._getAttribute(Y,f)||i;W=(b+Z.replace(e.Dom._getClassRegex(ab),b+aa).replace(/\s+/g,b)).split(e.Dom._getClassRegex(aa));W.splice(1,0,b+aa);e.Dom.setAttribute(Y,f,a(W.join(i)));G=true;}}}}else{}return G;},generateId:function(G,X){X=X||"yui-gen";var W=function(Y){if(Y&&Y.id){return Y.id;}var Z=X+YAHOO.env._id_counter++;
if(Y){if(Y[C]&&Y[C].getElementById(Z)){return e.Dom.generateId(Y,Z+X);}Y.id=Z;}return Z;};return e.Dom.batch(G,W,e.Dom,true)||W.apply(e.Dom,arguments);},isAncestor:function(W,X){W=e.Dom.get(W);X=e.Dom.get(X);var G=false;if((W&&X)&&(W[K]&&X[K])){if(W.contains&&W!==X){G=W.contains(X);}else{if(W.compareDocumentPosition){G=!!(W.compareDocumentPosition(X)&16);}}}else{}return G;},inDocument:function(G,W){return e.Dom._inDoc(e.Dom.get(G),W);},_inDoc:function(W,X){var G=false;if(W&&W[c]){X=X||W[C];G=e.Dom.isAncestor(X[U],W);}else{}return G;},getElementsBy:function(W,af,ab,ad,X,ac,ae){af=af||"*";ab=(ab)?e.Dom.get(ab):null||j;var aa=(ae)?null:[],G;if(ab){G=ab.getElementsByTagName(af);for(var Y=0,Z=G.length;Y<Z;++Y){if(W(G[Y])){if(ae){aa=G[Y];break;}else{aa[aa.length]=G[Y];}}}if(ad){e.Dom.batch(aa,ad,X,ac);}}return aa;},getElementBy:function(X,G,W){return e.Dom.getElementsBy(X,G,W,null,null,null,true);},batch:function(X,ab,aa,Z){var Y=[],W=(Z)?aa:null;X=(X&&(X[c]||X.item))?X:e.Dom.get(X);if(X&&ab){if(X[c]||X.length===undefined){return ab.call(W,X,aa);}for(var G=0;G<X.length;++G){Y[Y.length]=ab.call(W||X[G],X[G],aa);}}else{return false;}return Y;},getDocumentHeight:function(){var W=(j[S]!=l||h)?j.body.scrollHeight:v.scrollHeight,G=Math.max(W,e.Dom.getViewportHeight());return G;},getDocumentWidth:function(){var W=(j[S]!=l||h)?j.body.scrollWidth:v.scrollWidth,G=Math.max(W,e.Dom.getViewportWidth());return G;},getViewportHeight:function(){var G=self.innerHeight,W=j[S];if((W||s)&&!d){G=(W==l)?v.clientHeight:j.body.clientHeight;}return G;},getViewportWidth:function(){var G=self.innerWidth,W=j[S];if(W||s){G=(W==l)?v.clientWidth:j.body.clientWidth;}return G;},getAncestorBy:function(G,W){while((G=G[x])){if(e.Dom._testElement(G,W)){return G;}}return null;},getAncestorByClassName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return e.Dom.hasClass(Y,G);};return e.Dom.getAncestorBy(W,X);},getAncestorByTagName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return Y[c]&&Y[c].toUpperCase()==G.toUpperCase();};return e.Dom.getAncestorBy(W,X);},getPreviousSiblingBy:function(G,W){while(G){G=G.previousSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getPreviousSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getPreviousSiblingBy(G);},getNextSiblingBy:function(G,W){while(G){G=G.nextSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getNextSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getNextSiblingBy(G);},getFirstChildBy:function(G,X){var W=(e.Dom._testElement(G.firstChild,X))?G.firstChild:null;return W||e.Dom.getNextSiblingBy(G.firstChild,X);},getFirstChild:function(G,W){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getFirstChildBy(G);},getLastChildBy:function(G,X){if(!G){return null;}var W=(e.Dom._testElement(G.lastChild,X))?G.lastChild:null;return W||e.Dom.getPreviousSiblingBy(G.lastChild,X);},getLastChild:function(G){G=e.Dom.get(G);return e.Dom.getLastChildBy(G);},getChildrenBy:function(W,Y){var X=e.Dom.getFirstChildBy(W,Y),G=X?[X]:[];e.Dom.getNextSiblingBy(X,function(Z){if(!Y||Y(Z)){G[G.length]=Z;}return false;});return G;},getChildren:function(G){G=e.Dom.get(G);if(!G){}return e.Dom.getChildrenBy(G);},getDocumentScrollLeft:function(G){G=G||j;return Math.max(G[U].scrollLeft,G.body.scrollLeft);},getDocumentScrollTop:function(G){G=G||j;return Math.max(G[U].scrollTop,G.body.scrollTop);},insertBefore:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}return G[x].insertBefore(W,G);},insertAfter:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}if(G.nextSibling){return G[x].insertBefore(W,G.nextSibling);}else{return G[x].appendChild(W);}},getClientRegion:function(){var X=e.Dom.getDocumentScrollTop(),W=e.Dom.getDocumentScrollLeft(),Y=e.Dom.getViewportWidth()+W,G=e.Dom.getViewportHeight()+X;return new e.Region(X,Y,G,W);},setAttribute:function(W,G,X){e.Dom.batch(W,e.Dom._setAttribute,{attr:G,val:X});},_setAttribute:function(X,W){var G=e.Dom._toCamel(W.attr),Y=W.val;if(X&&X.setAttribute){if(e.Dom.DOT_ATTRIBUTES[G]&&X.tagName&&X.tagName!="BUTTON"){X[G]=Y;}else{G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;X.setAttribute(G,Y);}}else{}},getAttribute:function(W,G){return e.Dom.batch(W,e.Dom._getAttribute,G);},_getAttribute:function(W,G){var X;G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;if(e.Dom.DOT_ATTRIBUTES[G]){X=W[G];}else{if(W&&"getAttribute" in W){if(/^(?:href|src)$/.test(G)){X=W.getAttribute(G,2);}else{X=W.getAttribute(G);}}else{}}return X;},_toCamel:function(W){var X=B;function G(Y,Z){return Z.toUpperCase();}return X[W]||(X[W]=W.indexOf("-")===-1?W:W.replace(/-([a-z])/gi,G));},_getClassRegex:function(W){var G;if(W!==undefined){if(W.exec){G=W;}else{G=F[W];if(!G){W=W.replace(e.Dom._patterns.CLASS_RE_TOKENS,"\\$1");W=W.replace(/\s+/g,b);G=F[W]=new RegExp(R+W+J,t);}}}return G;},_patterns:{ROOT_TAG:/^body|html$/i,CLASS_RE_TOKENS:/([\.\(\)\^\$\*\+\?\|\[\]\{\}\\])/g},_testElement:function(G,W){return G&&G[K]==1&&(!W||W(G));},_calcBorders:function(X,Y){var W=parseInt(e.Dom[V](X,q),10)||0,G=parseInt(e.Dom[V](X,P),10)||0;if(g){if(m.test(X[c])){W=0;G=0;}}Y[0]+=G;Y[1]+=W;return Y;}};var r=e.Dom[V];if(L.opera){e.Dom[V]=function(W,G){var X=r(W,G);if(w.test(G)){X=e.Dom.Color.toRGB(X);}return X;};}if(L.webkit){e.Dom[V]=function(W,G){var X=r(W,G);if(X==="rgba(0, 0, 0, 0)"){X="transparent";}return X;};}if(L.ie&&L.ie>=8){e.Dom.DOT_ATTRIBUTES.type=true;}})();YAHOO.util.Region=function(d,e,a,c){this.top=d;this.y=d;this[1]=d;this.right=e;this.bottom=a;this.left=c;this.x=c;this[0]=c;this.width=this.right-this.left;this.height=this.bottom-this.top;};YAHOO.util.Region.prototype.contains=function(a){return(a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(f){var d=Math.max(this.top,f.top),e=Math.min(this.right,f.right),a=Math.min(this.bottom,f.bottom),c=Math.max(this.left,f.left);
if(a>=d&&e>=c){return new YAHOO.util.Region(d,e,a,c);}else{return null;}};YAHOO.util.Region.prototype.union=function(f){var d=Math.min(this.top,f.top),e=Math.max(this.right,f.right),a=Math.max(this.bottom,f.bottom),c=Math.min(this.left,f.left);return new YAHOO.util.Region(d,e,a,c);};YAHOO.util.Region.prototype.toString=function(){return("Region {"+"top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+", height: "+this.height+", width: "+this.width+"}");};YAHOO.util.Region.getRegion=function(e){var g=YAHOO.util.Dom.getXY(e),d=g[1],f=g[0]+e.offsetWidth,a=g[1]+e.offsetHeight,c=g[0];return new YAHOO.util.Region(d,f,a,c);};YAHOO.util.Point=function(a,b){if(YAHOO.lang.isArray(a)){b=a[1];a=a[0];}YAHOO.util.Point.superclass.constructor.call(this,b,a,b,a);};YAHOO.extend(YAHOO.util.Point,YAHOO.util.Region);(function(){var b=YAHOO.util,a="clientTop",f="clientLeft",j="parentNode",k="right",w="hasLayout",i="px",u="opacity",l="auto",d="borderLeftWidth",g="borderTopWidth",p="borderRightWidth",v="borderBottomWidth",s="visible",q="transparent",n="height",e="width",h="style",t="currentStyle",r=/^width|height$/,o=/^(\d[.\d]*)+(em|ex|px|gd|rem|vw|vh|vm|ch|mm|cm|in|pt|pc|deg|rad|ms|s|hz|khz|%){1}?/i,m={get:function(x,z){var y="",A=x[t][z];if(z===u){y=b.Dom.getStyle(x,u);}else{if(!A||(A.indexOf&&A.indexOf(i)>-1)){y=A;}else{if(b.Dom.IE_COMPUTED[z]){y=b.Dom.IE_COMPUTED[z](x,z);}else{if(o.test(A)){y=b.Dom.IE.ComputedStyle.getPixel(x,z);}else{y=A;}}}}return y;},getOffset:function(z,E){var B=z[t][E],x=E.charAt(0).toUpperCase()+E.substr(1),C="offset"+x,y="pixel"+x,A="",D;if(B==l){D=z[C];if(D===undefined){A=0;}A=D;if(r.test(E)){z[h][E]=D;if(z[C]>D){A=D-(z[C]-D);}z[h][E]=l;}}else{if(!z[h][y]&&!z[h][E]){z[h][E]=B;}A=z[h][y];}return A+i;},getBorderWidth:function(x,z){var y=null;if(!x[t][w]){x[h].zoom=1;}switch(z){case g:y=x[a];break;case v:y=x.offsetHeight-x.clientHeight-x[a];break;case d:y=x[f];break;case p:y=x.offsetWidth-x.clientWidth-x[f];break;}return y+i;},getPixel:function(y,x){var A=null,B=y[t][k],z=y[t][x];y[h][k]=z;A=y[h].pixelRight;y[h][k]=B;return A+i;},getMargin:function(y,x){var z;if(y[t][x]==l){z=0+i;}else{z=b.Dom.IE.ComputedStyle.getPixel(y,x);}return z;},getVisibility:function(y,x){var z;while((z=y[t])&&z[x]=="inherit"){y=y[j];}return(z)?z[x]:s;},getColor:function(y,x){return b.Dom.Color.toRGB(y[t][x])||q;},getBorderColor:function(y,x){var z=y[t],A=z[x]||z.color;return b.Dom.Color.toRGB(b.Dom.Color.toHex(A));}},c={};c.top=c.right=c.bottom=c.left=c[e]=c[n]=m.getOffset;c.color=m.getColor;c[g]=c[p]=c[v]=c[d]=m.getBorderWidth;c.marginTop=c.marginRight=c.marginBottom=c.marginLeft=m.getMargin;c.visibility=m.getVisibility;c.borderColor=c.borderTopColor=c.borderRightColor=c.borderBottomColor=c.borderLeftColor=m.getBorderColor;b.Dom.IE_COMPUTED=c;b.Dom.IE_ComputedStyle=m;})();(function(){var c="toString",a=parseInt,b=RegExp,d=YAHOO.util;d.Dom.Color={KEYWORDS:{black:"000",silver:"c0c0c0",gray:"808080",white:"fff",maroon:"800000",red:"f00",purple:"800080",fuchsia:"f0f",green:"008000",lime:"0f0",olive:"808000",yellow:"ff0",navy:"000080",blue:"00f",teal:"008080",aqua:"0ff"},re_RGB:/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,re_hex:/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i,re_hex3:/([0-9A-F])/gi,toRGB:function(e){if(!d.Dom.Color.re_RGB.test(e)){e=d.Dom.Color.toHex(e);}if(d.Dom.Color.re_hex.exec(e)){e="rgb("+[a(b.$1,16),a(b.$2,16),a(b.$3,16)].join(", ")+")";}return e;},toHex:function(f){f=d.Dom.Color.KEYWORDS[f]||f;if(d.Dom.Color.re_RGB.exec(f)){f=[Number(b.$1).toString(16),Number(b.$2).toString(16),Number(b.$3).toString(16)];for(var e=0;e<f.length;e++){if(f[e].length<2){f[e]="0"+f[e];}}f=f.join("");}if(f.length<6){f=f.replace(d.Dom.Color.re_hex3,"$1$1");}if(f!=="transparent"&&f.indexOf("#")<0){f="#"+f;}return f.toUpperCase();}};}());YAHOO.register("dom",YAHOO.util.Dom,{version:"2.9.0",build:"2800"});
//
//../pacotes/yui290/build/utilities/utilities_compacto.js
if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={}}YAHOO.namespace=function(){var b=arguments,g=null,e,c,f;for(e=0;e<b.length;e=e+1){f=(""+b[e]).split(".");g=YAHOO;for(c=(f[0]=="YAHOO")?1:0;c<f.length;c=c+1){g[f[c]]=g[f[c]]||{};g=g[f[c]]}}return g};YAHOO.log=function(d,a,c){var b=YAHOO.widget.Logger;if(b&&b.log){return b.log(d,a,c)}else{return false}};YAHOO.register=function(a,f,e){var k=YAHOO.env.modules,c,j,h,g,d;if(!k[a]){k[a]={versions:[],builds:[]}}c=k[a];j=e.version;h=e.build;g=YAHOO.env.listeners;c.name=a;c.version=j;c.build=h;c.versions.push(j);c.builds.push(h);c.mainClass=f;for(d=0;d<g.length;d=d+1){g[d](c)}if(f){f.VERSION=j;f.BUILD=h}else{YAHOO.log("mainClass is undefined for module "+a,"warn")}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(a){return YAHOO.env.modules[a]||null};YAHOO.env.parseUA=function(d){var e=function(i){var j=0;return parseFloat(i.replace(/\./g,function(){return(j++==1)?"":"."}))},h=navigator,g={ie:0,opera:0,gecko:0,webkit:0,chrome:0,mobile:null,air:0,ipad:0,iphone:0,ipod:0,ios:null,android:0,webos:0,caja:h&&h.cajaVersion,secure:false,os:null},c=d||(navigator&&navigator.userAgent),f=window&&window.location,b=f&&f.href,a;g.secure=b&&(b.toLowerCase().indexOf("https")===0);if(c){if((/windows|win32/i).test(c)){g.os="windows"}else{if((/macintosh/i).test(c)){g.os="macintosh"}else{if((/rhino/i).test(c)){g.os="rhino"}}}if((/KHTML/).test(c)){g.webkit=1}a=c.match(/AppleWebKit\/([^\s]*)/);if(a&&a[1]){g.webkit=e(a[1]);if(/ Mobile\//.test(c)){g.mobile="Apple";a=c.match(/OS ([^\s]*)/);if(a&&a[1]){a=e(a[1].replace("_","."))}g.ios=a;g.ipad=g.ipod=g.iphone=0;a=c.match(/iPad|iPod|iPhone/);if(a&&a[0]){g[a[0].toLowerCase()]=g.ios}}else{a=c.match(/NokiaN[^\/]*|Android \d\.\d|webOS\/\d\.\d/);if(a){g.mobile=a[0]}if(/webOS/.test(c)){g.mobile="WebOS";a=c.match(/webOS\/([^\s]*);/);if(a&&a[1]){g.webos=e(a[1])}}if(/ Android/.test(c)){g.mobile="Android";a=c.match(/Android ([^\s]*);/);if(a&&a[1]){g.android=e(a[1])}}}a=c.match(/Chrome\/([^\s]*)/);if(a&&a[1]){g.chrome=e(a[1])}else{a=c.match(/AdobeAIR\/([^\s]*)/);if(a){g.air=a[0]}}}if(!g.webkit){a=c.match(/Opera[\s\/]([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);a=c.match(/Version\/([^\s]*)/);if(a&&a[1]){g.opera=e(a[1])}a=c.match(/Opera Mini[^;]*/);if(a){g.mobile=a[0]}}else{a=c.match(/MSIE\s([^;]*)/);if(a&&a[1]){g.ie=e(a[1])}else{a=c.match(/Gecko\/([^\s]*)/);if(a){g.gecko=1;a=c.match(/rv:([^\s\)]*)/);if(a&&a[1]){g.gecko=e(a[1])}}}}}}return g};YAHOO.env.ua=YAHOO.env.parseUA();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var b=YAHOO_config.listener,a=YAHOO.env.listeners,d=true,c;if(b){for(c=0;c<a.length;c++){if(a[c]==b){d=false;break}}if(d){a.push(b)}}}})();YAHOO.lang=YAHOO.lang||{};(function(){var f=YAHOO.lang,a=Object.prototype,c="[object Array]",h="[object Function]",i="[object Object]",b=[],g={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","/":"&#x2F;","`":"&#x60;"},d=["toString","valueOf"],e={isArray:function(j){return a.toString.apply(j)===c},isBoolean:function(j){return typeof j==="boolean"},isFunction:function(j){return(typeof j==="function")||a.toString.apply(j)===h},isNull:function(j){return j===null},isNumber:function(j){return typeof j==="number"&&isFinite(j)},isObject:function(j){return(j&&(typeof j==="object"||f.isFunction(j)))||false},isString:function(j){return typeof j==="string"},isUndefined:function(j){return typeof j==="undefined"},_IEEnumFix:(YAHOO.env.ua.ie)?function(l,k){var j,n,m;for(j=0;j<d.length;j=j+1){n=d[j];m=k[n];if(f.isFunction(m)&&m!=a[n]){l[n]=m}}}:function(){},escapeHTML:function(j){return j.replace(/[&<>"'\/`]/g,function(k){return g[k]})},extend:function(m,n,l){if(!n||!m){throw new Error("extend failed, please check that "+"all dependencies are included.")}var k=function(){},j;k.prototype=n.prototype;m.prototype=new k();m.prototype.constructor=m;m.superclass=n.prototype;if(n.prototype.constructor==a.constructor){n.prototype.constructor=n}if(l){for(j in l){if(f.hasOwnProperty(l,j)){m.prototype[j]=l[j]}}f._IEEnumFix(m.prototype,l)}},augmentObject:function(n,m){if(!m||!n){throw new Error("Absorb failed, verify dependencies.")}var j=arguments,l,o,k=j[2];if(k&&k!==true){for(l=2;l<j.length;l=l+1){n[j[l]]=m[j[l]]}}else{for(o in m){if(k||!(o in n)){n[o]=m[o]}}f._IEEnumFix(n,m)}return n},augmentProto:function(m,l){if(!l||!m){throw new Error("Augment failed, verify dependencies.")}var j=[m.prototype,l.prototype],k;for(k=2;k<arguments.length;k=k+1){j.push(arguments[k])}f.augmentObject.apply(this,j);return m},dump:function(j,p){var l,n,r=[],t="{...}",k="f(){...}",q=", ",m=" => ";if(!f.isObject(j)){return j+""}else{if(j instanceof Date||("nodeType"in j&&"tagName"in j)){return j}else{if(f.isFunction(j)){return k}}}p=(f.isNumber(p))?p:3;if(f.isArray(j)){r.push("[");for(l=0,n=j.length;l<n;l=l+1){if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t)}else{r.push(j[l])}r.push(q)}if(r.length>1){r.pop()}r.push("]")}else{r.push("{");for(l in j){if(f.hasOwnProperty(j,l)){r.push(l+m);if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t)}else{r.push(j[l])}r.push(q)}}if(r.length>1){r.pop()}r.push("}")}return r.join("")},substitute:function(x,y,E,l){var D,C,B,G,t,u,F=[],p,z=x.length,A="dump",r=" ",q="{",m="}",n,w;for(;;){D=x.lastIndexOf(q,z);if(D<0){break}C=x.indexOf(m,D);if(D+1>C){break}p=x.substring(D+1,C);G=p;u=null;B=G.indexOf(r);if(B>-1){u=G.substring(B+1);G=G.substring(0,B)}t=y[G];if(E){t=E(G,t,u)}if(f.isObject(t)){if(f.isArray(t)){t=f.dump(t,parseInt(u,10))}else{u=u||"";n=u.indexOf(A);if(n>-1){u=u.substring(4)}w=t.toString();if(w===i||n>-1){t=f.dump(t,parseInt(u,10))}else{t=w}}}else{if(!f.isString(t)&&!f.isNumber(t)){t="~-"+F.length+"-~";F[F.length]=p}}x=x.substring(0,D)+t+x.substring(C+1);if(l===false){z=D-1}}for(D=F.length-1;D>=0;D=D-1){x=x.replace(new RegExp("~-"+D+"-~"),"{"+F[D]+"}","g")}return x},trim:function(j){try{return j.replace(/^\s+|\s+$/g,"")}catch(k){return j}},merge:function(){var n={},k=arguments,j=k.length,m;for(m=0;m<j;m=m+1){f.augmentObject(n,k[m],true)}return n},later:function(t,k,u,n,p){t=t||0;k=k||{};var l=u,s=n,q,j;if(f.isString(u)){l=k[u]}if(!l){throw new TypeError("method undefined")}if(!f.isUndefined(n)&&!f.isArray(s)){s=[n]}q=function(){l.apply(k,s||b)};j=(p)?setInterval(q,t):setTimeout(q,t);return{interval:p,cancel:function(){if(this.interval){clearInterval(j)}else{clearTimeout(j)}}}},isValue:function(j){return(f.isObject(j)||f.isString(j)||f.isNumber(j)||f.isBoolean(j))}};f.hasOwnProperty=(a.hasOwnProperty)?function(j,k){return j&&j.hasOwnProperty&&j.hasOwnProperty(k)}:function(j,k){return!f.isUndefined(j[k])&&j.constructor.prototype[k]!==j[k]};e.augmentObject(f,e,true);YAHOO.util.Lang=f;f.augment=f.augmentProto;YAHOO.augment=f.augmentProto;YAHOO.extend=f.extend})();YAHOO.register("yahoo",YAHOO,{version:"2.9.0",build:"2800"});YAHOO.util.Get=function(){var m={},k=0,r=0,l=false,n=YAHOO.env.ua,s=YAHOO.lang,q,d,e,i=function(x,t,y){var u=y||window,z=u.document,A=z.createElement(x),v;for(v in t){if(t.hasOwnProperty(v)){A.setAttribute(v,t[v])}}return A},h=function(u,v,t){var w={id:"yui__dyn_"+(r++),type:"text/css",rel:"stylesheet",href:u};if(t){s.augmentObject(w,t)}return i("link",w,v)},p=function(u,v,t){var w={id:"yui__dyn_"+(r++),type:"text/javascript",src:u};if(t){s.augmentObject(w,t)}return i("script",w,v)},a=function(t,u){return{tId:t.tId,win:t.win,data:t.data,nodes:t.nodes,msg:u,purge:function(){d(this.tId)}}},b=function(t,w){var u=m[w],v=(s.isString(t))?u.win.document.getElementById(t):t;if(!v){q(w,"target node not found: "+t)}return v},c=function(w){YAHOO.log("Finishing transaction "+w);var u=m[w],v,t;u.finished=true;if(u.aborted){v="transaction "+w+" was aborted";q(w,v);return}if(u.onSuccess){t=u.scope||u.win;u.onSuccess.call(t,a(u))}},o=function(v){YAHOO.log("Timeout "+v,"info","get");var u=m[v],t;if(u.onTimeout){t=u.scope||u;u.onTimeout.call(t,a(u))}},f=function(v,A){YAHOO.log("_next: "+v+", loaded: "+A,"info","Get");var u=m[v],D=u.win,C=D.document,B=C.getElementsByTagName("head")[0],x,y,t,E,z;if(u.timer){u.timer.cancel()}if(u.aborted){y="transaction "+v+" was aborted";q(v,y);return}if(A){u.url.shift();if(u.varName){u.varName.shift()}}else{u.url=(s.isString(u.url))?[u.url]:u.url;if(u.varName){u.varName=(s.isString(u.varName))?[u.varName]:u.varName}}if(u.url.length===0){if(u.type==="script"&&n.webkit&&n.webkit<420&&!u.finalpass&&!u.varName){z=p(null,u.win,u.attributes);z.innerHTML='YAHOO.util.Get._finalize("'+v+'");';u.nodes.push(z);B.appendChild(z)}else{c(v)}return}t=u.url[0];if(!t){u.url.shift();YAHOO.log("skipping empty url");return f(v)}YAHOO.log("attempting to load "+t,"info","Get");if(u.timeout){u.timer=s.later(u.timeout,u,o,v)}if(u.type==="script"){x=p(t,D,u.attributes)}else{x=h(t,D,u.attributes)}e(u.type,x,v,t,D,u.url.length);u.nodes.push(x);if(u.insertBefore){E=b(u.insertBefore,v);if(E){E.parentNode.insertBefore(x,E)}}else{B.appendChild(x)}YAHOO.log("Appending node: "+t,"info","Get");if((n.webkit||n.gecko)&&u.type==="css"){f(v,t)}},j=function(){if(l){return}l=true;var t,u;for(t in m){if(m.hasOwnProperty(t)){u=m[t];if(u.autopurge&&u.finished){d(u.tId);delete m[t]}}}l=false},g=function(u,t,v){var x="q"+(k++),w;v=v||{};if(k%YAHOO.util.Get.PURGE_THRESH===0){j()}m[x]=s.merge(v,{tId:x,type:u,url:t,finished:false,aborted:false,nodes:[]});w=m[x];w.win=w.win||window;w.scope=w.scope||w.win;w.autopurge=("autopurge"in w)?w.autopurge:(u==="script")?true:false;w.attributes=w.attributes||{};w.attributes.charset=v.charset||w.attributes.charset||"utf-8";s.later(0,w,f,x);return{tId:x}};e=function(H,z,x,u,D,E,G){var F=G||f,B,t,I,v,J,A,C,y;if(n.ie){z.onreadystatechange=function(){B=this.readyState;if("loaded"===B||"complete"===B){YAHOO.log(x+" onload "+u,"info","Get");z.onreadystatechange=null;F(x,u)}}}else{if(n.webkit){if(H==="script"){if(n.webkit>=420){z.addEventListener("load",function(){YAHOO.log(x+" DOM2 onload "+u,"info","Get");F(x,u)})}else{t=m[x];if(t.varName){v=YAHOO.util.Get.POLL_FREQ;YAHOO.log("Polling for "+t.varName[0]);t.maxattempts=YAHOO.util.Get.TIMEOUT/v;t.attempts=0;t._cache=t.varName[0].split(".");t.timer=s.later(v,t,function(w){I=this._cache;A=I.length;J=this.win;for(C=0;C<A;C=C+1){J=J[I[C]];if(!J){this.attempts++;if(this.attempts++>this.maxattempts){y="Over retry limit, giving up";t.timer.cancel();q(x,y)}else{YAHOO.log(I[C]+" failed, retrying")}return}}YAHOO.log("Safari poll complete");t.timer.cancel();F(x,u)},null,true)}else{s.later(YAHOO.util.Get.POLL_FREQ,null,F,[x,u])}}}}else{z.onload=function(){YAHOO.log(x+" onload "+u,"info","Get");F(x,u)}}}};q=function(w,v){YAHOO.log("get failure: "+v,"warn","Get");var u=m[w],t;if(u.onFailure){t=u.scope||u.win;u.onFailure.call(t,a(u,v))}};d=function(z){if(m[z]){var t=m[z],u=t.nodes,x=u.length,C=t.win.document,A=C.getElementsByTagName("head")[0],v,y,w,B;if(t.insertBefore){v=b(t.insertBefore,z);if(v){A=v.parentNode}}for(y=0;y<x;y=y+1){w=u[y];if(w.clearAttributes){w.clearAttributes()}else{for(B in w){if(w.hasOwnProperty(B)){delete w[B]}}}A.removeChild(w)}t.nodes=[]}};return{POLL_FREQ:10,PURGE_THRESH:20,TIMEOUT:2000,_finalize:function(t){YAHOO.log(t+" finalized ","info","Get");s.later(0,null,c,t)},abort:function(u){var v=(s.isString(u))?u:u.tId,t=m[v];if(t){YAHOO.log("Aborting "+v,"info","Get");t.aborted=true}},script:function(t,u){return g("script",t,u)},css:function(t,u){return g("css",t,u)}}}();YAHOO.register("get",YAHOO.util.Get,{version:"2.9.0",build:"2800"});(function(){var Y=YAHOO,util=Y.util,lang=Y.lang,env=Y.env,PROV="_provides",SUPER="_supersedes",REQ="expanded",AFTER="_after",VERSION="2.9.0";var YUI={dupsAllowed:{"yahoo":true,"get":true},info:{"root":VERSION+"/build/","base":"http://yui.yahooapis.com/"+VERSION+"/build/","comboBase":"http://yui.yahooapis.com/combo?","skin":{"defaultSkin":"sam","base":"assets/skins/","path":"skin.css","after":["reset","fonts","grids","base"],"rollup":3},dupsAllowed:["yahoo","get"],"moduleInfo":{"animation":{"type":"js","path":"animation/animation-min.js","requires":["dom","event"]},"autocomplete":{"type":"js","path":"autocomplete/autocomplete-min.js","requires":["dom","event","datasource"],"optional":["connection","animation"],"skinnable":true},"base":{"type":"css","path":"base/base-min.css","after":["reset","fonts","grids"]},"button":{"type":"js","path":"button/button-min.js","requires":["element"],"optional":["menu"],"skinnable":true},"calendar":{"type":"js","path":"calendar/calendar-min.js","requires":["event","dom"],supersedes:["datemath"],"skinnable":true},"carousel":{"type":"js","path":"carousel/carousel-min.js","requires":["element"],"optional":["animation"],"skinnable":true},"charts":{"type":"js","path":"charts/charts-min.js","requires":["element","json","datasource","swf"]},"colorpicker":{"type":"js","path":"colorpicker/colorpicker-min.js","requires":["slider","element"],"optional":["animation"],"skinnable":true},"connection":{"type":"js","path":"connection/connection-min.js","requires":["event"],"supersedes":["connectioncore"]},"connectioncore":{"type":"js","path":"connection/connection_core-min.js","requires":["event"],"pkg":"connection"},"container":{"type":"js","path":"container/container-min.js","requires":["dom","event"],"optional":["dragdrop","animation","connection"],"supersedes":["containercore"],"skinnable":true},"containercore":{"type":"js","path":"container/container_core-min.js","requires":["dom","event"],"pkg":"container"},"cookie":{"type":"js","path":"cookie/cookie-min.js","requires":["yahoo"]},"datasource":{"type":"js","path":"datasource/datasource-min.js","requires":["event"],"optional":["connection"]},"datatable":{"type":"js","path":"datatable/datatable-min.js","requires":["element","datasource"],"optional":["calendar","dragdrop","paginator"],"skinnable":true},datemath:{"type":"js","path":"datemath/datemath-min.js","requires":["yahoo"]},"dom":{"type":"js","path":"dom/dom-min.js","requires":["yahoo"]},"dragdrop":{"type":"js","path":"dragdrop/dragdrop-min.js","requires":["dom","event"]},"editor":{"type":"js","path":"editor/editor-min.js","requires":["menu","element","button"],"optional":["animation","dragdrop"],"supersedes":["simpleeditor"],"skinnable":true},"element":{"type":"js","path":"element/element-min.js","requires":["dom","event"],"optional":["event-mouseenter","event-delegate"]},"element-delegate":{"type":"js","path":"element-delegate/element-delegate-min.js","requires":["element"]},"event":{"type":"js","path":"event/event-min.js","requires":["yahoo"]},"event-simulate":{"type":"js","path":"event-simulate/event-simulate-min.js","requires":["event"]},"event-delegate":{"type":"js","path":"event-delegate/event-delegate-min.js","requires":["event"],"optional":["selector"]},"event-mouseenter":{"type":"js","path":"event-mouseenter/event-mouseenter-min.js","requires":["dom","event"]},"fonts":{"type":"css","path":"fonts/fonts-min.css"},"get":{"type":"js","path":"get/get-min.js","requires":["yahoo"]},"grids":{"type":"css","path":"grids/grids-min.css","requires":["fonts"],"optional":["reset"]},"history":{"type":"js","path":"history/history-min.js","requires":["event"]},"imagecropper":{"type":"js","path":"imagecropper/imagecropper-min.js","requires":["dragdrop","element","resize"],"skinnable":true},"imageloader":{"type":"js","path":"imageloader/imageloader-min.js","requires":["event","dom"]},"json":{"type":"js","path":"json/json-min.js","requires":["yahoo"]},"layout":{"type":"js","path":"layout/layout-min.js","requires":["element"],"optional":["animation","dragdrop","resize","selector"],"skinnable":true},"logger":{"type":"js","path":"logger/logger-min.js","requires":["event","dom"],"optional":["dragdrop"],"skinnable":true},"menu":{"type":"js","path":"menu/menu-min.js","requires":["containercore"],"skinnable":true},"paginator":{"type":"js","path":"paginator/paginator-min.js","requires":["element"],"skinnable":true},"profiler":{"type":"js","path":"profiler/profiler-min.js","requires":["yahoo"]},"profilerviewer":{"type":"js","path":"profilerviewer/profilerviewer-min.js","requires":["profiler","yuiloader","element"],"skinnable":true},"progressbar":{"type":"js","path":"progressbar/progressbar-min.js","requires":["element"],"optional":["animation"],"skinnable":true},"reset":{"type":"css","path":"reset/reset-min.css"},"reset-fonts-grids":{"type":"css","path":"reset-fonts-grids/reset-fonts-grids.css","supersedes":["reset","fonts","grids","reset-fonts"],"rollup":4},"reset-fonts":{"type":"css","path":"reset-fonts/reset-fonts.css","supersedes":["reset","fonts"],"rollup":2},"resize":{"type":"js","path":"resize/resize-min.js","requires":["dragdrop","element"],"optional":["animation"],"skinnable":true},"selector":{"type":"js","path":"selector/selector-min.js","requires":["yahoo","dom"]},"simpleeditor":{"type":"js","path":"editor/simpleeditor-min.js","requires":["element"],"optional":["containercore","menu","button","animation","dragdrop"],"skinnable":true,"pkg":"editor"},"slider":{"type":"js","path":"slider/slider-min.js","requires":["dragdrop"],"optional":["animation"],"skinnable":true},"storage":{"type":"js","path":"storage/storage-min.js","requires":["yahoo","event","cookie"],"optional":["swfstore"]},"stylesheet":{"type":"js","path":"stylesheet/stylesheet-min.js","requires":["yahoo"]},"swf":{"type":"js","path":"swf/swf-min.js","requires":["element"],"supersedes":["swfdetect"]},"swfdetect":{"type":"js","path":"swfdetect/swfdetect-min.js","requires":["yahoo"]},"swfstore":{"type":"js","path":"swfstore/swfstore-min.js","requires":["element","cookie","swf"]},"tabview":{"type":"js","path":"tabview/tabview-min.js","requires":["element"],"optional":["connection"],"skinnable":true},"treeview":{"type":"js","path":"treeview/treeview-min.js","requires":["event","dom"],"optional":["json","animation","calendar"],"skinnable":true},"uploader":{"type":"js","path":"uploader/uploader-min.js","requires":["element"]},"utilities":{"type":"js","path":"utilities/utilities.js","supersedes":["yahoo","event","dragdrop","animation","dom","connection","element","yahoo-dom-event","get","yuiloader","yuiloader-dom-event"],"rollup":8},"yahoo":{"type":"js","path":"yahoo/yahoo-min.js"},"yahoo-dom-event":{"type":"js","path":"yahoo-dom-event/yahoo-dom-event.js","supersedes":["yahoo","event","dom"],"rollup":3},"yuiloader":{"type":"js","path":"yuiloader/yuiloader-min.js","supersedes":["yahoo","get"]},"yuiloader-dom-event":{"type":"js","path":"yuiloader-dom-event/yuiloader-dom-event.js","supersedes":["yahoo","dom","event","get","yuiloader","yahoo-dom-event"],"rollup":5},"yuitest":{"type":"js","path":"yuitest/yuitest-min.js","requires":["logger"],"optional":["event-simulate"],"skinnable":true}}},ObjectUtil:{appendArray:function(o,a){if(a){for(var i=0;i<a.length;i=i+1){o[a[i]]=true}}},keys:function(o,ordered){var a=[],i;for(i in o){if(lang.hasOwnProperty(o,i)){a.push(i)}}return a}},ArrayUtil:{appendArray:function(a1,a2){Array.prototype.push.apply(a1,a2)},indexOf:function(a,val){for(var i=0;i<a.length;i=i+1){if(a[i]===val){return i}}return-1},toObject:function(a){var o={};for(var i=0;i<a.length;i=i+1){o[a[i]]=true}return o},uniq:function(a){return YUI.ObjectUtil.keys(YUI.ArrayUtil.toObject(a))}}};YAHOO.util.YUILoader=function(o){this._internalCallback=null;this._useYahooListener=false;this.onSuccess=null;this.onFailure=Y.log;this.onProgress=null;this.onTimeout=null;this.scope=this;this.data=null;this.insertBefore=null;this.charset=null;this.varName=null;this.base=YUI.info.base;this.comboBase=YUI.info.comboBase;this.combine=false;this.root=YUI.info.root;this.timeout=0;this.ignore=null;this.force=null;this.allowRollup=true;this.filter=null;this.required={};this.moduleInfo=lang.merge(YUI.info.moduleInfo);this.rollups=null;this.loadOptional=false;this.sorted=[];this.loaded={};this.dirty=true;this.inserted={};var self=this;env.listeners.push(function(m){if(self._useYahooListener){self.loadNext(m.name)}});this.skin=lang.merge(YUI.info.skin);this._config(o)};Y.util.YUILoader.prototype={FILTERS:{RAW:{"searchExp":"-min\\.js","replaceStr":".js"},DEBUG:{"searchExp":"-min\\.js","replaceStr":"-debug.js"}},SKIN_PREFIX:"skin-",_config:function(o){if(o){for(var i in o){if(lang.hasOwnProperty(o,i)){if(i=="require"){this.require(o[i])}else{this[i]=o[i]}}}}var f=this.filter;if(lang.isString(f)){f=f.toUpperCase();if(f==="DEBUG"){this.require("logger")}if(!Y.widget.LogWriter){Y.widget.LogWriter=function(){return Y}}this.filter=this.FILTERS[f]}},addModule:function(o){if(!o||!o.name||!o.type||(!o.path&&!o.fullpath)){return false}o.ext=("ext"in o)?o.ext:true;o.requires=o.requires||[];this.moduleInfo[o.name]=o;this.dirty=true;return true},require:function(what){var a=(typeof what==="string")?arguments:what;this.dirty=true;YUI.ObjectUtil.appendArray(this.required,a)},_addSkin:function(skin,mod){var name=this.formatSkin(skin),info=this.moduleInfo,sinf=this.skin,ext=info[mod]&&info[mod].ext;if(!info[name]){this.addModule({"name":name,"type":"css","path":sinf.base+skin+"/"+sinf.path,"after":sinf.after,"rollup":sinf.rollup,"ext":ext})}if(mod){name=this.formatSkin(skin,mod);if(!info[name]){var mdef=info[mod],pkg=mdef.pkg||mod;this.addModule({"name":name,"type":"css","after":sinf.after,"path":pkg+"/"+sinf.base+skin+"/"+mod+".css","ext":ext})}}return name},getRequires:function(mod){if(!mod){return[]}if(!this.dirty&&mod.expanded){return mod.expanded}mod.requires=mod.requires||[];var i,d=[],r=mod.requires,o=mod.optional,info=this.moduleInfo,m;for(i=0;i<r.length;i=i+1){d.push(r[i]);m=info[r[i]];YUI.ArrayUtil.appendArray(d,this.getRequires(m))}if(o&&this.loadOptional){for(i=0;i<o.length;i=i+1){d.push(o[i]);YUI.ArrayUtil.appendArray(d,this.getRequires(info[o[i]]))}}mod.expanded=YUI.ArrayUtil.uniq(d);return mod.expanded},getProvides:function(name,notMe){var addMe=!(notMe),ckey=(addMe)?PROV:SUPER,m=this.moduleInfo[name],o={};if(!m){return o}if(m[ckey]){return m[ckey]}var s=m.supersedes,done={},me=this;var add=function(mm){if(!done[mm]){done[mm]=true;lang.augmentObject(o,me.getProvides(mm))}};if(s){for(var i=0;i<s.length;i=i+1){add(s[i])}}m[SUPER]=o;m[PROV]=lang.merge(o);m[PROV][name]=true;return m[ckey]},calculate:function(o){if(o||this.dirty){this._config(o);this._setup();this._explode();if(this.allowRollup){this._rollup()}this._reduce();this._sort();this.dirty=false}},_setup:function(){var info=this.moduleInfo,name,i,j;for(name in info){if(lang.hasOwnProperty(info,name)){var m=info[name];if(m&&m.skinnable){var o=this.skin.overrides,smod;if(o&&o[name]){for(i=0;i<o[name].length;i=i+1){smod=this._addSkin(o[name][i],name)}}else{smod=this._addSkin(this.skin.defaultSkin,name)}if(YUI.ArrayUtil.indexOf(m.requires,smod)==-1){m.requires.push(smod)}}}}var l=lang.merge(this.inserted);if(!this._sandbox){l=lang.merge(l,env.modules)}if(this.ignore){YUI.ObjectUtil.appendArray(l,this.ignore)}if(this.force){for(i=0;i<this.force.length;i=i+1){if(this.force[i]in l){delete l[this.force[i]]}}}for(j in l){if(lang.hasOwnProperty(l,j)){lang.augmentObject(l,this.getProvides(j))}}this.loaded=l},_explode:function(){var r=this.required,i,mod;for(i in r){if(lang.hasOwnProperty(r,i)){mod=this.moduleInfo[i];if(mod){var req=this.getRequires(mod);if(req){YUI.ObjectUtil.appendArray(r,req)}}}}},_skin:function(){},formatSkin:function(skin,mod){var s=this.SKIN_PREFIX+skin;if(mod){s=s+"-"+mod}return s},parseSkin:function(mod){if(mod.indexOf(this.SKIN_PREFIX)===0){var a=mod.split("-");return{skin:a[1],module:a[2]}}return null},_rollup:function(){var i,j,m,s,rollups={},r=this.required,roll,info=this.moduleInfo;if(this.dirty||!this.rollups){for(i in info){if(lang.hasOwnProperty(info,i)){m=info[i];if(m&&m.rollup){rollups[i]=m}}}this.rollups=rollups}for(;;){var rolled=false;for(i in rollups){if(!r[i]&&!this.loaded[i]){m=info[i];s=m.supersedes;roll=false;if(!m.rollup){continue}var skin=(m.ext)?false:this.parseSkin(i),c=0;if(skin){for(j in r){if(lang.hasOwnProperty(r,j)){if(i!==j&&this.parseSkin(j)){c++;roll=(c>=m.rollup);if(roll){break}}}}}else{for(j=0;j<s.length;j=j+1){if(this.loaded[s[j]]&&(!YUI.dupsAllowed[s[j]])){roll=false;break}else{if(r[s[j]]){c++;roll=(c>=m.rollup);if(roll){break}}}}}if(roll){r[i]=true;rolled=true;this.getRequires(m)}}}if(!rolled){break}}},_reduce:function(){var i,j,s,m,r=this.required;for(i in r){if(i in this.loaded){delete r[i]}else{var skinDef=this.parseSkin(i);if(skinDef){if(!skinDef.module){var skin_pre=this.SKIN_PREFIX+skinDef.skin;for(j in r){if(lang.hasOwnProperty(r,j)){m=this.moduleInfo[j];var ext=m&&m.ext;if(!ext&&j!==i&&j.indexOf(skin_pre)>-1){delete r[j]}}}}}else{m=this.moduleInfo[i];s=m&&m.supersedes;if(s){for(j=0;j<s.length;j=j+1){if(s[j]in r){delete r[s[j]]}}}}}}},_onFailure:function(msg){YAHOO.log("Failure","info","loader");var f=this.onFailure;if(f){f.call(this.scope,{msg:"failure: "+msg,data:this.data,success:false})}},_onTimeout:function(){YAHOO.log("Timeout","info","loader");var f=this.onTimeout;if(f){f.call(this.scope,{msg:"timeout",data:this.data,success:false})}},_sort:function(){var s=[],info=this.moduleInfo,loaded=this.loaded,checkOptional=!this.loadOptional,me=this;var requires=function(aa,bb){var mm=info[aa];if(loaded[bb]||!mm){return false}var ii,rr=mm.expanded,after=mm.after,other=info[bb],optional=mm.optional;if(rr&&YUI.ArrayUtil.indexOf(rr,bb)>-1){return true}if(after&&YUI.ArrayUtil.indexOf(after,bb)>-1){return true}if(checkOptional&&optional&&YUI.ArrayUtil.indexOf(optional,bb)>-1){return true}var ss=info[bb]&&info[bb].supersedes;if(ss){for(ii=0;ii<ss.length;ii=ii+1){if(requires(aa,ss[ii])){return true}}}if(mm.ext&&mm.type=="css"&&!other.ext&&other.type=="css"){return true}return false};for(var i in this.required){if(lang.hasOwnProperty(this.required,i)){s.push(i)}}var p=0;for(;;){var l=s.length,a,b,j,k,moved=false;for(j=p;j<l;j=j+1){a=s[j];for(k=j+1;k<l;k=k+1){if(requires(a,s[k])){b=s.splice(k,1);s.splice(j,0,b[0]);moved=true;break}}if(moved){break}else{p=p+1}}if(!moved){break}}this.sorted=s},toString:function(){var o={type:"YUILoader",base:this.base,filter:this.filter,required:this.required,loaded:this.loaded,inserted:this.inserted};lang.dump(o,1)},_combine:function(){this._combining=[];var self=this,s=this.sorted,len=s.length,js=this.comboBase,css=this.comboBase,target,startLen=js.length,i,m,type=this.loadType;YAHOO.log("type "+type);for(i=0;i<len;i=i+1){m=this.moduleInfo[s[i]];if(m&&!m.ext&&(!type||type===m.type)){target=this.root+m.path;target+="&";if(m.type=="js"){js+=target}else{css+=target}this._combining.push(s[i])}}if(this._combining.length){YAHOO.log("Attempting to combine: "+this._combining,"info","loader");var callback=function(o){var c=this._combining,len=c.length,i,m;for(i=0;i<len;i=i+1){this.inserted[c[i]]=true}this.loadNext(o.data)},loadScript=function(){if(js.length>startLen){YAHOO.util.Get.script(self._filter(js),{data:self._loading,onSuccess:callback,onFailure:self._onFailure,onTimeout:self._onTimeout,insertBefore:self.insertBefore,charset:self.charset,timeout:self.timeout,scope:self})}else{this.loadNext()}};if(css.length>startLen){YAHOO.util.Get.css(this._filter(css),{data:this._loading,onSuccess:loadScript,onFailure:this._onFailure,onTimeout:this._onTimeout,insertBefore:this.insertBefore,charset:this.charset,timeout:this.timeout,scope:self})}else{loadScript()}return}else{this.loadNext(this._loading)}},insert:function(o,type){this.calculate(o);this._loading=true;this.loadType=type;if(this.combine){return this._combine()}if(!type){var self=this;this._internalCallback=function(){self._internalCallback=null;self.insert(null,"js")};this.insert(null,"css");return}this.loadNext()},sandbox:function(o,type){var self=this,success=function(o){var idx=o.argument[0],name=o.argument[2];self._scriptText[idx]=o.responseText;if(self.onProgress){self.onProgress.call(self.scope,{name:name,scriptText:o.responseText,xhrResponse:o,data:self.data})}self._loadCount++;if(self._loadCount>=self._stopCount){var v=self.varName||"YAHOO";var t="(function() {\n";var b="\nreturn "+v+";\n})();";var ref=eval(t+self._scriptText.join("\n")+b);self._pushEvents(ref);if(ref){self.onSuccess.call(self.scope,{reference:ref,data:self.data})}else{self._onFailure.call(self.varName+" reference failure")}}},failure=function(o){self.onFailure.call(self.scope,{msg:"XHR failure",xhrResponse:o,data:self.data})};self._config(o);if(!self.onSuccess){throw new Error("You must supply an onSuccess handler for your sandbox")}self._sandbox=true;if(!type||type!=="js"){self._internalCallback=function(){self._internalCallback=null;self.sandbox(null,"js")};self.insert(null,"css");return}if(!util.Connect){var ld=new YAHOO.util.YUILoader();ld.insert({base:self.base,filter:self.filter,require:"connection",insertBefore:self.insertBefore,charset:self.charset,onSuccess:function(){self.sandbox(null,"js")},scope:self},"js");return}self._scriptText=[];self._loadCount=0;self._stopCount=self.sorted.length;self._xhr=[];self.calculate();var s=self.sorted,l=s.length,i,m,url;for(i=0;i<l;i=i+1){m=self.moduleInfo[s[i]];if(!m){self._onFailure("undefined module "+m);for(var j=0;j<self._xhr.length;j=j+1){self._xhr[j].abort()}return}if(m.type!=="js"){self._loadCount++;continue}url=m.fullpath;url=(url)?self._filter(url):self._url(m.path);var xhrData={success:success,failure:failure,scope:self,argument:[i,url,s[i]]};self._xhr.push(util.Connect.asyncRequest("GET",url,xhrData))}},loadNext:function(mname){if(!this._loading){return}var self=this,donext=function(o){self.loadNext(o.data)},successfn,s=this.sorted,len=s.length,i,fn,m,url;if(mname){if(mname!==this._loading){return}this.inserted[mname]=true;if(this.onProgress){this.onProgress.call(this.scope,{name:mname,data:this.data})}}for(i=0;i<len;i=i+1){if(s[i]in this.inserted){continue}if(s[i]===this._loading){return}m=this.moduleInfo[s[i]];if(!m){this.onFailure.call(this.scope,{msg:"undefined module "+m,data:this.data});return}if(!this.loadType||this.loadType===m.type){successfn=donext;this._loading=s[i];fn=(m.type==="css")?util.Get.css:util.Get.script;url=m.fullpath;url=(url)?this._filter(url):this._url(m.path);if(env.ua.webkit&&env.ua.webkit<420&&m.type==="js"&&!m.varName){successfn=null;this._useYahooListener=true}fn(url,{data:s[i],onSuccess:successfn,onFailure:this._onFailure,onTimeout:this._onTimeout,insertBefore:this.insertBefore,charset:this.charset,timeout:this.timeout,varName:m.varName,scope:self});return}}this._loading=null;if(this._internalCallback){var f=this._internalCallback;this._internalCallback=null;f.call(this)}else{if(this.onSuccess){this._pushEvents();this.onSuccess.call(this.scope,{data:this.data})}}},_pushEvents:function(ref){var r=ref||YAHOO;if(r.util&&r.util.Event){r.util.Event._load()}},_filter:function(str){var f=this.filter;return(f)?str.replace(new RegExp(f.searchExp,"g"),f.replaceStr):str},_url:function(path){return this._filter((this.base||"")+path)}}})();YAHOO.register("yuiloader",YAHOO.util.YUILoader,{version:"2.9.0",build:"2800"});(function(){YAHOO.env._id_counter=YAHOO.env._id_counter||0;var e=YAHOO.util,k=YAHOO.lang,L=YAHOO.env.ua,a=YAHOO.lang.trim,B={},F={},m=/^t(?:able|d|h)$/i,w=/color$/i,j=window.document,v=j.documentElement,C="ownerDocument",M="defaultView",U="documentElement",S="compatMode",z="offsetLeft",o="offsetTop",T="offsetParent",x="parentNode",K="nodeType",c="tagName",n="scrollLeft",H="scrollTop",p="getBoundingClientRect",V="getComputedStyle",y="currentStyle",l="CSS1Compat",A="BackCompat",E="class",f="className",i="",b=" ",R="(?:^|\\s)",J="(?= |$)",t="g",O="position",D="fixed",u="relative",I="left",N="top",Q="medium",P="borderLeftWidth",q="borderTopWidth",d=L.opera,h=L.webkit,g=L.gecko,s=L.ie;e.Dom={CUSTOM_ATTRIBUTES:(!v.hasAttribute)?{"for":"htmlFor","class":f}:{"htmlFor":"for","className":E},DOT_ATTRIBUTES:{checked:true},get:function(aa){var ac,X,ab,Z,W,G,Y=null;if(aa){if(typeof aa=="string"||typeof aa=="number"){ac=aa+"";aa=j.getElementById(aa);G=(aa)?aa.attributes:null;if(aa&&G&&G.id&&G.id.value===ac){return aa}else{if(aa&&j.all){aa=null;X=j.all[ac];if(X&&X.length){for(Z=0,W=X.length;Z<W;++Z){if(X[Z].id===ac){return X[Z]}}}}}}else{if(e.Element&&aa instanceof e.Element){aa=aa.get("element")}else{if(!aa.nodeType&&"length"in aa){ab=[];for(Z=0,W=aa.length;Z<W;++Z){ab[ab.length]=e.Dom.get(aa[Z])}aa=ab}}}Y=aa}return Y},getComputedStyle:function(G,W){if(window[V]){return G[C][M][V](G,null)[W]}else{if(G[y]){return e.Dom.IE_ComputedStyle.get(G,W)}}},getStyle:function(G,W){return e.Dom.batch(G,e.Dom._getStyle,W)},_getStyle:function(){if(window[V]){return function(G,Y){Y=(Y==="float")?Y="cssFloat":e.Dom._toCamel(Y);var X=G.style[Y],W;if(!X){W=G[C][M][V](G,null);if(W){X=W[Y]}}return X}}else{if(v[y]){return function(G,Y){var X;switch(Y){case"opacity":X=100;try{X=G.filters["DXImageTransform.Microsoft.Alpha"].opacity}catch(Z){try{X=G.filters("alpha").opacity}catch(W){}}return X/100;case"float":Y="styleFloat";default:Y=e.Dom._toCamel(Y);X=G[y]?G[y][Y]:null;return(G.style[Y]||X)}}}}}(),setStyle:function(G,W,X){e.Dom.batch(G,e.Dom._setStyle,{prop:W,val:X})},_setStyle:function(){if(!window.getComputedStyle&&j.documentElement.currentStyle){return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){switch(X){case"opacity":if(Y===""||Y===null||Y===1){W.style.removeAttribute("filter")}else{if(k.isString(W.style.filter)){W.style.filter="alpha(opacity="+Y*100+")";if(!W[y]||!W[y].hasLayout){W.style.zoom=1}}}break;case"float":X="styleFloat";default:W.style[X]=Y}}else{}}}else{return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){if(X=="float"){X="cssFloat"}W.style[X]=Y}else{}}}}(),getXY:function(G){return e.Dom.batch(G,e.Dom._getXY)},_canPosition:function(G){return(e.Dom._getStyle(G,"display")!=="none"&&e.Dom._inDoc(G))},_getXY:function(W){var X,G,Z,ab,Y,aa,ac=Math.round,ad=false;if(e.Dom._canPosition(W)){Z=W[p]();ab=W[C];X=e.Dom.getDocumentScrollLeft(ab);G=e.Dom.getDocumentScrollTop(ab);ad=[Z[I],Z[N]];if(Y||aa){ad[0]-=aa;ad[1]-=Y}if((G||X)){ad[0]+=X;ad[1]+=G}ad[0]=ac(ad[0]);ad[1]=ac(ad[1])}else{}return ad},getX:function(G){var W=function(X){return e.Dom.getXY(X)[0]};return e.Dom.batch(G,W,e.Dom,true)},getY:function(G){var W=function(X){return e.Dom.getXY(X)[1]};return e.Dom.batch(G,W,e.Dom,true)},setXY:function(G,X,W){e.Dom.batch(G,e.Dom._setXY,{pos:X,noRetry:W})},_setXY:function(G,Z){var aa=e.Dom._getStyle(G,O),Y=e.Dom.setStyle,ad=Z.pos,W=Z.noRetry,ab=[parseInt(e.Dom.getComputedStyle(G,I),10),parseInt(e.Dom.getComputedStyle(G,N),10)],ac,X;ac=e.Dom._getXY(G);if(!ad||ac===false){return false}if(aa=="static"){aa=u;Y(G,O,aa)}if(isNaN(ab[0])){ab[0]=(aa==u)?0:G[z]}if(isNaN(ab[1])){ab[1]=(aa==u)?0:G[o]}if(ad[0]!==null){Y(G,I,ad[0]-ac[0]+ab[0]+"px")}if(ad[1]!==null){Y(G,N,ad[1]-ac[1]+ab[1]+"px")}if(!W){X=e.Dom._getXY(G);if((ad[0]!==null&&X[0]!=ad[0])||(ad[1]!==null&&X[1]!=ad[1])){e.Dom._setXY(G,{pos:ad,noRetry:true})}}},setX:function(W,G){e.Dom.setXY(W,[G,null])},setY:function(G,W){e.Dom.setXY(G,[null,W])},getRegion:function(G){var W=function(X){var Y=false;if(e.Dom._canPosition(X)){Y=e.Region.getRegion(X)}else{}return Y};return e.Dom.batch(G,W,e.Dom,true)},getClientWidth:function(){return e.Dom.getViewportWidth()},getClientHeight:function(){return e.Dom.getViewportHeight()},getElementsByClassName:function(ab,af,ac,ae,X,ad){af=af||"*";ac=(ac)?e.Dom.get(ac):null||j;if(!ac){return[]}var W=[],G=ac.getElementsByTagName(af),Z=e.Dom.hasClass;for(var Y=0,aa=G.length;Y<aa;++Y){if(Z(G[Y],ab)){W[W.length]=G[Y]}}if(ae){e.Dom.batch(W,ae,X,ad)}return W},hasClass:function(W,G){return e.Dom.batch(W,e.Dom._hasClass,G)},_hasClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(Y){Y=Y.replace(/\s+/g,b)}if(W.exec){G=W.test(Y)}else{G=W&&(b+Y+b).indexOf(b+W+b)>-1}}else{}return G},addClass:function(W,G){return e.Dom.batch(W,e.Dom._addClass,G)},_addClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(!e.Dom._hasClass(X,W)){e.Dom.setAttribute(X,f,a(Y+b+W));G=true}}else{}return G},removeClass:function(W,G){return e.Dom.batch(W,e.Dom._removeClass,G)},_removeClass:function(Y,X){var W=false,aa,Z,G;if(Y&&X){aa=e.Dom._getAttribute(Y,f)||i;e.Dom.setAttribute(Y,f,aa.replace(e.Dom._getClassRegex(X),i));Z=e.Dom._getAttribute(Y,f);if(aa!==Z){e.Dom.setAttribute(Y,f,a(Z));W=true;if(e.Dom._getAttribute(Y,f)===""){G=(Y.hasAttribute&&Y.hasAttribute(E))?E:f;Y.removeAttribute(G)}}}else{}return W},replaceClass:function(X,W,G){return e.Dom.batch(X,e.Dom._replaceClass,{from:W,to:G})},_replaceClass:function(Y,X){var W,ab,aa,G=false,Z;if(Y&&X){ab=X.from;aa=X.to;if(!aa){G=false}else{if(!ab){G=e.Dom._addClass(Y,X.to)}else{if(ab!==aa){Z=e.Dom._getAttribute(Y,f)||i;W=(b+Z.replace(e.Dom._getClassRegex(ab),b+aa).replace(/\s+/g,b)).split(e.Dom._getClassRegex(aa));W.splice(1,0,b+aa);e.Dom.setAttribute(Y,f,a(W.join(i)));G=true}}}}else{}return G},generateId:function(G,X){X=X||"yui-gen";var W=function(Y){if(Y&&Y.id){return Y.id}var Z=X+YAHOO.env._id_counter++;if(Y){if(Y[C]&&Y[C].getElementById(Z)){return e.Dom.generateId(Y,Z+X)}Y.id=Z}return Z};return e.Dom.batch(G,W,e.Dom,true)||W.apply(e.Dom,arguments)},isAncestor:function(W,X){W=e.Dom.get(W);X=e.Dom.get(X);var G=false;if((W&&X)&&(W[K]&&X[K])){if(W.contains&&W!==X){G=W.contains(X)}else{if(W.compareDocumentPosition){G=!!(W.compareDocumentPosition(X)&16)}}}else{}return G},inDocument:function(G,W){return e.Dom._inDoc(e.Dom.get(G),W)},_inDoc:function(W,X){var G=false;if(W&&W[c]){X=X||W[C];G=e.Dom.isAncestor(X[U],W)}else{}return G},getElementsBy:function(W,af,ab,ad,X,ac,ae){af=af||"*";ab=(ab)?e.Dom.get(ab):null||j;var aa=(ae)?null:[],G;if(ab){G=ab.getElementsByTagName(af);for(var Y=0,Z=G.length;Y<Z;++Y){if(W(G[Y])){if(ae){aa=G[Y];break}else{aa[aa.length]=G[Y]}}}if(ad){e.Dom.batch(aa,ad,X,ac)}}return aa},getElementBy:function(X,G,W){return e.Dom.getElementsBy(X,G,W,null,null,null,true)},batch:function(X,ab,aa,Z){var Y=[],W=(Z)?aa:null;X=(X&&(X[c]||X.item))?X:e.Dom.get(X);if(X&&ab){if(X[c]||X.length===undefined){return ab.call(W,X,aa)}for(var G=0;G<X.length;++G){Y[Y.length]=ab.call(W||X[G],X[G],aa)}}else{return false}return Y},getDocumentHeight:function(){var W=(j[S]!=l||h)?j.body.scrollHeight:v.scrollHeight,G=Math.max(W,e.Dom.getViewportHeight());return G},getDocumentWidth:function(){var W=(j[S]!=l||h)?j.body.scrollWidth:v.scrollWidth,G=Math.max(W,e.Dom.getViewportWidth());return G},getViewportHeight:function(){var G=self.innerHeight,W=j[S];if((W||s)&&!d){G=(W==l)?v.clientHeight:j.body.clientHeight}return G},getViewportWidth:function(){var G=self.innerWidth,W=j[S];if(W||s){G=(W==l)?v.clientWidth:j.body.clientWidth}return G},getAncestorBy:function(G,W){while((G=G[x])){if(e.Dom._testElement(G,W)){return G}}return null},getAncestorByClassName:function(W,G){W=e.Dom.get(W);if(!W){return null}var X=function(Y){return e.Dom.hasClass(Y,G)};return e.Dom.getAncestorBy(W,X)},getAncestorByTagName:function(W,G){W=e.Dom.get(W);if(!W){return null}var X=function(Y){return Y[c]&&Y[c].toUpperCase()==G.toUpperCase()};return e.Dom.getAncestorBy(W,X)},getPreviousSiblingBy:function(G,W){while(G){G=G.previousSibling;if(e.Dom._testElement(G,W)){return G}}return null},getPreviousSibling:function(G){G=e.Dom.get(G);if(!G){return null}return e.Dom.getPreviousSiblingBy(G)},getNextSiblingBy:function(G,W){while(G){G=G.nextSibling;if(e.Dom._testElement(G,W)){return G}}return null},getNextSibling:function(G){G=e.Dom.get(G);if(!G){return null}return e.Dom.getNextSiblingBy(G)},getFirstChildBy:function(G,X){var W=(e.Dom._testElement(G.firstChild,X))?G.firstChild:null;return W||e.Dom.getNextSiblingBy(G.firstChild,X)},getFirstChild:function(G,W){G=e.Dom.get(G);if(!G){return null}return e.Dom.getFirstChildBy(G)},getLastChildBy:function(G,X){if(!G){return null}var W=(e.Dom._testElement(G.lastChild,X))?G.lastChild:null;return W||e.Dom.getPreviousSiblingBy(G.lastChild,X)},getLastChild:function(G){G=e.Dom.get(G);return e.Dom.getLastChildBy(G)},getChildrenBy:function(W,Y){var X=e.Dom.getFirstChildBy(W,Y),G=X?[X]:[];e.Dom.getNextSiblingBy(X,function(Z){if(!Y||Y(Z)){G[G.length]=Z}return false});return G},getChildren:function(G){G=e.Dom.get(G);if(!G){}return e.Dom.getChildrenBy(G)},getDocumentScrollLeft:function(G){G=G||j;return Math.max(G[U].scrollLeft,G.body.scrollLeft)},getDocumentScrollTop:function(G){G=G||j;return Math.max(G[U].scrollTop,G.body.scrollTop)},insertBefore:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null}return G[x].insertBefore(W,G)},insertAfter:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null}if(G.nextSibling){return G[x].insertBefore(W,G.nextSibling)}else{return G[x].appendChild(W)}},getClientRegion:function(){var X=e.Dom.getDocumentScrollTop(),W=e.Dom.getDocumentScrollLeft(),Y=e.Dom.getViewportWidth()+W,G=e.Dom.getViewportHeight()+X;return new e.Region(X,Y,G,W)},setAttribute:function(W,G,X){e.Dom.batch(W,e.Dom._setAttribute,{attr:G,val:X})},_setAttribute:function(X,W){var G=e.Dom._toCamel(W.attr),Y=W.val;if(X&&X.setAttribute){if(e.Dom.DOT_ATTRIBUTES[G]&&X.tagName&&X.tagName!="BUTTON"){X[G]=Y}else{G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;X.setAttribute(G,Y)}}else{}},getAttribute:function(W,G){return e.Dom.batch(W,e.Dom._getAttribute,G)},_getAttribute:function(W,G){var X;G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;if(e.Dom.DOT_ATTRIBUTES[G]){X=W[G]}else{if(W&&"getAttribute"in W){if(/^(?:href|src)$/.test(G)){X=W.getAttribute(G,2)}else{X=W.getAttribute(G)}}else{}}return X},_toCamel:function(W){var X=B;function G(Y,Z){return Z.toUpperCase()}return X[W]||(X[W]=W.indexOf("-")===-1?W:W.replace(/-([a-z])/gi,G))},_getClassRegex:function(W){var G;if(W!==undefined){if(W.exec){G=W}else{G=F[W];if(!G){W=W.replace(e.Dom._patterns.CLASS_RE_TOKENS,"\\$1");W=W.replace(/\s+/g,b);G=F[W]=new RegExp(R+W+J,t)}}}return G},_patterns:{ROOT_TAG:/^body|html$/i,CLASS_RE_TOKENS:/([\.\(\)\^\$\*\+\?\|\[\]\{\}\\])/g},_testElement:function(G,W){return G&&G[K]==1&&(!W||W(G))},_calcBorders:function(X,Y){var W=parseInt(e.Dom[V](X,q),10)||0,G=parseInt(e.Dom[V](X,P),10)||0;if(g){if(m.test(X[c])){W=0;G=0}}Y[0]+=G;Y[1]+=W;return Y}};var r=e.Dom[V];if(L.opera){e.Dom[V]=function(W,G){var X=r(W,G);if(w.test(G)){X=e.Dom.Color.toRGB(X)}return X}}if(L.webkit){e.Dom[V]=function(W,G){var X=r(W,G);if(X==="rgba(0, 0, 0, 0)"){X="transparent"}return X}}if(L.ie&&L.ie>=8){e.Dom.DOT_ATTRIBUTES.type=true}})();YAHOO.util.Region=function(d,e,a,c){this.top=d;this.y=d;this[1]=d;this.right=e;this.bottom=a;this.left=c;this.x=c;this[0]=c;this.width=this.right-this.left;this.height=this.bottom-this.top};YAHOO.util.Region.prototype.contains=function(a){return(a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom)};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left))};YAHOO.util.Region.prototype.intersect=function(f){var d=Math.max(this.top,f.top),e=Math.min(this.right,f.right),a=Math.min(this.bottom,f.bottom),c=Math.max(this.left,f.left);if(a>=d&&e>=c){return new YAHOO.util.Region(d,e,a,c)}else{return null}};YAHOO.util.Region.prototype.union=function(f){var d=Math.min(this.top,f.top),e=Math.max(this.right,f.right),a=Math.max(this.bottom,f.bottom),c=Math.min(this.left,f.left);return new YAHOO.util.Region(d,e,a,c)};YAHOO.util.Region.prototype.toString=function(){return("Region {"+"top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+", height: "+this.height+", width: "+this.width+"}")};YAHOO.util.Region.getRegion=function(e){var g=YAHOO.util.Dom.getXY(e),d=g[1],f=g[0]+e.offsetWidth,a=g[1]+e.offsetHeight,c=g[0];return new YAHOO.util.Region(d,f,a,c)};YAHOO.util.Point=function(a,b){if(YAHOO.lang.isArray(a)){b=a[1];a=a[0]}YAHOO.util.Point.superclass.constructor.call(this,b,a,b,a)};YAHOO.extend(YAHOO.util.Point,YAHOO.util.Region);(function(){var b=YAHOO.util,a="clientTop",f="clientLeft",j="parentNode",k="right",w="hasLayout",i="px",u="opacity",l="auto",d="borderLeftWidth",g="borderTopWidth",p="borderRightWidth",v="borderBottomWidth",s="visible",q="transparent",n="height",e="width",h="style",t="currentStyle",r=/^width|height$/,o=/^(\d[.\d]*)+(em|ex|px|gd|rem|vw|vh|vm|ch|mm|cm|in|pt|pc|deg|rad|ms|s|hz|khz|%){1}?/i,m={get:function(x,z){var y="",A=x[t][z];if(z===u){y=b.Dom.getStyle(x,u)}else{if(!A||(A.indexOf&&A.indexOf(i)>-1)){y=A}else{if(b.Dom.IE_COMPUTED[z]){y=b.Dom.IE_COMPUTED[z](x,z)}else{if(o.test(A)){y=b.Dom.IE.ComputedStyle.getPixel(x,z)}else{y=A}}}}return y},getOffset:function(z,E){var B=z[t][E],x=E.charAt(0).toUpperCase()+E.substr(1),C="offset"+x,y="pixel"+x,A="",D;if(B==l){D=z[C];if(D===undefined){A=0}A=D;if(r.test(E)){z[h][E]=D;if(z[C]>D){A=D-(z[C]-D)}z[h][E]=l}}else{if(!z[h][y]&&!z[h][E]){z[h][E]=B}A=z[h][y]}return A+i},getBorderWidth:function(x,z){var y=null;if(!x[t][w]){x[h].zoom=1}switch(z){case g:y=x[a];break;case v:y=x.offsetHeight-x.clientHeight-x[a];break;case d:y=x[f];break;case p:y=x.offsetWidth-x.clientWidth-x[f];break}return y+i},getPixel:function(y,x){var A=null,B=y[t][k],z=y[t][x];y[h][k]=z;A=y[h].pixelRight;y[h][k]=B;return A+i},getMargin:function(y,x){var z;if(y[t][x]==l){z=0+i}else{z=b.Dom.IE.ComputedStyle.getPixel(y,x)}return z},getVisibility:function(y,x){var z;while((z=y[t])&&z[x]=="inherit"){y=y[j]}return(z)?z[x]:s},getColor:function(y,x){return b.Dom.Color.toRGB(y[t][x])||q},getBorderColor:function(y,x){var z=y[t],A=z[x]||z.color;return b.Dom.Color.toRGB(b.Dom.Color.toHex(A))}},c={};c.top=c.right=c.bottom=c.left=c[e]=c[n]=m.getOffset;c.color=m.getColor;c[g]=c[p]=c[v]=c[d]=m.getBorderWidth;c.marginTop=c.marginRight=c.marginBottom=c.marginLeft=m.getMargin;c.visibility=m.getVisibility;c.borderColor=c.borderTopColor=c.borderRightColor=c.borderBottomColor=c.borderLeftColor=m.getBorderColor;b.Dom.IE_COMPUTED=c;b.Dom.IE_ComputedStyle=m})();(function(){var c="toString",a=parseInt,b=RegExp,d=YAHOO.util;d.Dom.Color={KEYWORDS:{black:"000",silver:"c0c0c0",gray:"808080",white:"fff",maroon:"800000",red:"f00",purple:"800080",fuchsia:"f0f",green:"008000",lime:"0f0",olive:"808000",yellow:"ff0",navy:"000080",blue:"00f",teal:"008080",aqua:"0ff"},re_RGB:/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,re_hex:/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i,re_hex3:/([0-9A-F])/gi,toRGB:function(e){if(!d.Dom.Color.re_RGB.test(e)){e=d.Dom.Color.toHex(e)}if(d.Dom.Color.re_hex.exec(e)){e="rgb("+[a(b.$1,16),a(b.$2,16),a(b.$3,16)].join(", ")+")"}return e},toHex:function(f){f=d.Dom.Color.KEYWORDS[f]||f;if(d.Dom.Color.re_RGB.exec(f)){f=[Number(b.$1).toString(16),Number(b.$2).toString(16),Number(b.$3).toString(16)];for(var e=0;e<f.length;e++){if(f[e].length<2){f[e]="0"+f[e]}}f=f.join("")}if(f.length<6){f=f.replace(d.Dom.Color.re_hex3,"$1$1")}if(f!=="transparent"&&f.indexOf("#")<0){f="#"+f}return f.toUpperCase()}}}());YAHOO.register("dom",YAHOO.util.Dom,{version:"2.9.0",build:"2800"});YAHOO.util.CustomEvent=function(d,c,b,a,e){this.type=d;this.scope=c||window;this.silent=b;this.fireOnce=e;this.fired=false;this.firedWith=null;this.signature=a||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}var f="_YUICEOnSubscribe";if(d!==f){this.subscribeEvent=new YAHOO.util.CustomEvent(f,this,true)}this.lastError=null};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(b,c,d){if(!b){throw new Error("Invalid callback for subscriber to '"+this.type+"'")}if(this.subscribeEvent){this.subscribeEvent.fire(b,c,d)}var a=new YAHOO.util.Subscriber(b,c,d);if(this.fireOnce&&this.fired){this.notify(a,this.firedWith)}else{this.subscribers.push(a)}},unsubscribe:function(d,f){if(!d){return this.unsubscribeAll()}var e=false;for(var b=0,a=this.subscribers.length;b<a;++b){var c=this.subscribers[b];if(c&&c.contains(d,f)){this._delete(b);e=true}}return e},fire:function(){this.lastError=null;var h=[],a=this.subscribers.length;var d=[].slice.call(arguments,0),c=true,f,b=false;if(this.fireOnce){if(this.fired){return true}else{this.firedWith=d}}this.fired=true;if(!a&&this.silent){return true}if(!this.silent){}var e=this.subscribers.slice();for(f=0;f<a;++f){var g=e[f];if(!g||!g.fn){b=true}else{c=this.notify(g,d);if(false===c){if(!this.silent){}break}}}return(c!==false)},notify:function(g,c){var b,i=null,f=g.getScope(this.scope),a=YAHOO.util.Event.throwErrors;if(!this.silent){}if(this.signature==YAHOO.util.CustomEvent.FLAT){if(c.length>0){i=c[0]}try{b=g.fn.call(f,i,g.obj)}catch(h){this.lastError=h;if(a){throw h}}}else{try{b=g.fn.call(f,this.type,c,g.obj)}catch(d){this.lastError=d;if(a){throw d}}}return b},unsubscribeAll:function(){var a=this.subscribers.length,b;for(b=a-1;b>-1;b--){this._delete(b)}this.subscribers=[];return a},_delete:function(a){var b=this.subscribers[a];if(b){delete b.fn;delete b.obj}this.subscribers.splice(a,1)},toString:function(){return"CustomEvent: "+"'"+this.type+"', "+"context: "+this.scope}};YAHOO.util.Subscriber=function(a,b,c){this.fn=a;this.obj=YAHOO.lang.isUndefined(b)?null:b;this.overrideContext=c};YAHOO.util.Subscriber.prototype.getScope=function(a){if(this.overrideContext){if(this.overrideContext===true){return this.obj}else{return this.overrideContext}}return a};YAHOO.util.Subscriber.prototype.contains=function(a,b){if(b){return(this.fn==a&&this.obj==b)}else{return(this.fn==a)}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+this.obj+", overrideContext: "+(this.overrideContext||"no")+" }"};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var g=false,h=[],j=[],a=0,e=[],b=0,c={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9},d=YAHOO.env.ua.ie,f="focusin",i="focusout";return{POLL_RETRYS:500,POLL_INTERVAL:40,EL:0,TYPE:1,FN:2,WFN:3,UNLOAD_OBJ:3,ADJ_SCOPE:4,OBJ:5,OVERRIDE:6,CAPTURE:7,lastError:null,isSafari:YAHOO.env.ua.webkit,webkit:YAHOO.env.ua.webkit,isIE:d,_interval:null,_dri:null,_specialTypes:{focusin:(d?"focusin":"focus"),focusout:(d?"focusout":"blur")},DOMReady:false,throwErrors:false,startInterval:function(){if(!this._interval){this._interval=YAHOO.lang.later(this.POLL_INTERVAL,this,this._tryPreloadAttach,null,true)}},onAvailable:function(q,m,o,p,n){var k=(YAHOO.lang.isString(q))?[q]:q;for(var l=0;l<k.length;l=l+1){e.push({id:k[l],fn:m,obj:o,overrideContext:p,checkReady:n})}a=this.POLL_RETRYS;this.startInterval()},onContentReady:function(n,k,l,m){this.onAvailable(n,k,l,m,true)},onDOMReady:function(){this.DOMReadyEvent.subscribe.apply(this.DOMReadyEvent,arguments)},_addListener:function(m,k,v,p,t,y){if(!v||!v.call){return false}if(this._isValidCollection(m)){var w=true;for(var q=0,s=m.length;q<s;++q){w=this.on(m[q],k,v,p,t)&&w}return w}else{if(YAHOO.lang.isString(m)){var o=this.getEl(m);if(o){m=o}else{this.onAvailable(m,function(){YAHOO.util.Event._addListener(m,k,v,p,t,y)});return true}}}if(!m){return false}if("unload"==k&&p!==this){j[j.length]=[m,k,v,p,t];return true}var l=m;if(t){if(t===true){l=p}else{l=t}}var n=function(z){return v.call(l,YAHOO.util.Event.getEvent(z,m),p)};var x=[m,k,v,n,l,p,t,y];var r=h.length;h[r]=x;try{this._simpleAdd(m,k,n,y)}catch(u){this.lastError=u;this.removeListener(m,k,v);return false}return true},_getType:function(k){return this._specialTypes[k]||k},addListener:function(m,p,l,n,o){var k=((p==f||p==i)&&!YAHOO.env.ua.ie)?true:false;return this._addListener(m,this._getType(p),l,n,o,k)},addFocusListener:function(l,k,m,n){return this.on(l,f,k,m,n)},removeFocusListener:function(l,k){return this.removeListener(l,f,k)},addBlurListener:function(l,k,m,n){return this.on(l,i,k,m,n)},removeBlurListener:function(l,k){return this.removeListener(l,i,k)},removeListener:function(l,k,r){var m,p,u;k=this._getType(k);if(typeof l=="string"){l=this.getEl(l)}else{if(this._isValidCollection(l)){var s=true;for(m=l.length-1;m>-1;m--){s=(this.removeListener(l[m],k,r)&&s)}return s}}if(!r||!r.call){return this.purgeElement(l,false,k)}if("unload"==k){for(m=j.length-1;m>-1;m--){u=j[m];if(u&&u[0]==l&&u[1]==k&&u[2]==r){j.splice(m,1);return true}}return false}var n=null;var o=arguments[3];if("undefined"===typeof o){o=this._getCacheIndex(h,l,k,r)}if(o>=0){n=h[o]}if(!l||!n){return false}var t=n[this.CAPTURE]===true?true:false;try{this._simpleRemove(l,k,n[this.WFN],t)}catch(q){this.lastError=q;return false}delete h[o][this.WFN];delete h[o][this.FN];h.splice(o,1);return true},getTarget:function(m,l){var k=m.target||m.srcElement;return this.resolveTextNode(k)},resolveTextNode:function(l){try{if(l&&3==l.nodeType){return l.parentNode}}catch(k){return null}return l},getPageX:function(l){var k=l.pageX;if(!k&&0!==k){k=l.clientX||0;if(this.isIE){k+=this._getScrollLeft()}}return k},getPageY:function(k){var l=k.pageY;if(!l&&0!==l){l=k.clientY||0;if(this.isIE){l+=this._getScrollTop()}}return l},getXY:function(k){return[this.getPageX(k),this.getPageY(k)]},getRelatedTarget:function(l){var k=l.relatedTarget;if(!k){if(l.type=="mouseout"){k=l.toElement}else{if(l.type=="mouseover"){k=l.fromElement}}}return this.resolveTextNode(k)},getTime:function(m){if(!m.time){var l=new Date().getTime();try{m.time=l}catch(k){this.lastError=k;return l}}return m.time},stopEvent:function(k){this.stopPropagation(k);this.preventDefault(k)},stopPropagation:function(k){if(k.stopPropagation){k.stopPropagation()}else{k.cancelBubble=true}},preventDefault:function(k){if(k.preventDefault){k.preventDefault()}else{k.returnValue=false}},getEvent:function(m,k){var l=m||window.event;if(!l){var n=this.getEvent.caller;while(n){l=n.arguments[0];if(l&&Event==l.constructor){break}n=n.caller}}return l},getCharCode:function(l){var k=l.keyCode||l.charCode||0;if(YAHOO.env.ua.webkit&&(k in c)){k=c[k]}return k},_getCacheIndex:function(n,q,r,p){for(var o=0,m=n.length;o<m;o=o+1){var k=n[o];if(k&&k[this.FN]==p&&k[this.EL]==q&&k[this.TYPE]==r){return o}}return-1},generateId:function(k){var l=k.id;if(!l){l="yuievtautoid-"+b;++b;k.id=l}return l},_isValidCollection:function(l){try{return(l&&typeof l!=="string"&&l.length&&!l.tagName&&!l.alert&&typeof l[0]!=="undefined")}catch(k){return false}},elCache:{},getEl:function(k){return(typeof k==="string")?document.getElementById(k):k},clearCache:function(){},DOMReadyEvent:new YAHOO.util.CustomEvent("DOMReady",YAHOO,0,0,1),_load:function(l){if(!g){g=true;var k=YAHOO.util.Event;k._ready();k._tryPreloadAttach()}},_ready:function(l){var k=YAHOO.util.Event;if(!k.DOMReady){k.DOMReady=true;k.DOMReadyEvent.fire();k._simpleRemove(document,"DOMContentLoaded",k._ready)}},_tryPreloadAttach:function(){if(e.length===0){a=0;if(this._interval){this._interval.cancel();this._interval=null}return}if(this.locked){return}if(this.isIE){if(!this.DOMReady){this.startInterval();return}}this.locked=true;var q=!g;if(!q){q=(a>0&&e.length>0)}var p=[];var r=function(t,u){var s=t;if(u.overrideContext){if(u.overrideContext===true){s=u.obj}else{s=u.overrideContext}}u.fn.call(s,u.obj)};var l,k,o,n,m=[];for(l=0,k=e.length;l<k;l=l+1){o=e[l];if(o){n=this.getEl(o.id);if(n){if(o.checkReady){if(g||n.nextSibling||!q){m.push(o);e[l]=null}}else{r(n,o);e[l]=null}}else{p.push(o)}}}for(l=0,k=m.length;l<k;l=l+1){o=m[l];r(this.getEl(o.id),o)}a--;if(q){for(l=e.length-1;l>-1;l--){o=e[l];if(!o||!o.id){e.splice(l,1)}}this.startInterval()}else{if(this._interval){this._interval.cancel();this._interval=null}}this.locked=false},purgeElement:function(p,q,s){var n=(YAHOO.lang.isString(p))?this.getEl(p):p;var r=this.getListeners(n,s),o,k;if(r){for(o=r.length-1;o>-1;o--){var m=r[o];this.removeListener(n,m.type,m.fn)}}if(q&&n&&n.childNodes){for(o=0,k=n.childNodes.length;o<k;++o){this.purgeElement(n.childNodes[o],q,s)}}},getListeners:function(n,k){var q=[],m;if(!k){m=[h,j]}else{if(k==="unload"){m=[j]}else{k=this._getType(k);m=[h]}}var s=(YAHOO.lang.isString(n))?this.getEl(n):n;for(var p=0;p<m.length;p=p+1){var u=m[p];if(u){for(var r=0,t=u.length;r<t;++r){var o=u[r];if(o&&o[this.EL]===s&&(!k||k===o[this.TYPE])){q.push({type:o[this.TYPE],fn:o[this.FN],obj:o[this.OBJ],adjust:o[this.OVERRIDE],scope:o[this.ADJ_SCOPE],index:r})}}}}return(q.length)?q:null},_unload:function(s){var m=YAHOO.util.Event,p,o,n,r,q,t=j.slice(),k;for(p=0,r=j.length;p<r;++p){n=t[p];if(n){try{k=window;if(n[m.ADJ_SCOPE]){if(n[m.ADJ_SCOPE]===true){k=n[m.UNLOAD_OBJ]}else{k=n[m.ADJ_SCOPE]}}n[m.FN].call(k,m.getEvent(s,n[m.EL]),n[m.UNLOAD_OBJ])}catch(w){}t[p]=null}}n=null;k=null;j=null;if(h){for(o=h.length-1;o>-1;o--){n=h[o];if(n){try{m.removeListener(n[m.EL],n[m.TYPE],n[m.FN],o)}catch(v){}}}n=null}try{m._simpleRemove(window,"unload",m._unload);m._simpleRemove(window,"load",m._load)}catch(u){}},_getScrollLeft:function(){return this._getScroll()[1]},_getScrollTop:function(){return this._getScroll()[0]},_getScroll:function(){var k=document.documentElement,l=document.body;if(k&&(k.scrollTop||k.scrollLeft)){return[k.scrollTop,k.scrollLeft]}else{if(l){return[l.scrollTop,l.scrollLeft]}else{return[0,0]}}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(m,n,l,k){m.addEventListener(n,l,(k))}}else{if(window.attachEvent){return function(m,n,l,k){m.attachEvent("on"+n,l)}}else{return function(){}}}}(),_simpleRemove:function(){if(window.removeEventListener){return function(m,n,l,k){m.removeEventListener(n,l,(k))}}else{if(window.detachEvent){return function(l,m,k){l.detachEvent("on"+m,k)}}else{return function(){}}}}()}}();(function(){var a=YAHOO.util.Event;a.on=a.addListener;a.onFocus=a.addFocusListener;a.onBlur=a.addBlurListener;if(a.isIE){if(self!==self.top){document.onreadystatechange=function(){if(document.readyState=="complete"){document.onreadystatechange=null;a._ready()}}}else{YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);var b=document.createElement("p");a._dri=setInterval(function(){try{b.doScroll("left");clearInterval(a._dri);a._dri=null;a._ready();b=null}catch(c){}},a.POLL_INTERVAL)}}else{if(a.webkit&&a.webkit<525){a._dri=setInterval(function(){var c=document.readyState;if("loaded"==c||"complete"==c){clearInterval(a._dri);a._dri=null;a._ready()}},a.POLL_INTERVAL)}else{a._simpleAdd(document,"DOMContentLoaded",a._ready)}}a._simpleAdd(window,"load",a._load);a._simpleAdd(window,"unload",a._unload);a._tryPreloadAttach()})()}YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(a,c,f,e){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[a];if(d){d.subscribe(c,f,e)}else{this.__yui_subscribers=this.__yui_subscribers||{};var b=this.__yui_subscribers;if(!b[a]){b[a]=[]}b[a].push({fn:c,obj:f,overrideContext:e})}},unsubscribe:function(c,e,g){this.__yui_events=this.__yui_events||{};var a=this.__yui_events;if(c){var f=a[c];if(f){return f.unsubscribe(e,g)}}else{var b=true;for(var d in a){if(YAHOO.lang.hasOwnProperty(a,d)){b=b&&a[d].unsubscribe(e,g)}}return b}return false},unsubscribeAll:function(a){return this.unsubscribe(a)},createEvent:function(b,g){this.__yui_events=this.__yui_events||{};var e=g||{},d=this.__yui_events,f;if(d[b]){}else{f=new YAHOO.util.CustomEvent(b,e.scope||this,e.silent,YAHOO.util.CustomEvent.FLAT,e.fireOnce);d[b]=f;if(e.onSubscribeCallback){f.subscribeEvent.subscribe(e.onSubscribeCallback)}this.__yui_subscribers=this.__yui_subscribers||{};var a=this.__yui_subscribers[b];if(a){for(var c=0;c<a.length;++c){f.subscribe(a[c].fn,a[c].obj,a[c].overrideContext)}}}return d[b]},fireEvent:function(b){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[b];if(!d){return null}var a=[];for(var c=1;c<arguments.length;++c){a.push(arguments[c])}return d.fire.apply(d,a)},hasEvent:function(a){if(this.__yui_events){if(this.__yui_events[a]){return true}}return false}};(function(){var a=YAHOO.util.Event,c=YAHOO.lang;YAHOO.util.KeyListener=function(d,i,e,f){if(!d){}else{if(!i){}else{if(!e){}}}if(!f){f=YAHOO.util.KeyListener.KEYDOWN}var g=new YAHOO.util.CustomEvent("keyPressed");this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEvent=new YAHOO.util.CustomEvent("disabled");if(c.isString(d)){d=document.getElementById(d)}if(c.isFunction(e)){g.subscribe(e)}else{g.subscribe(e.fn,e.scope,e.correctScope)}function h(o,n){if(!i.shift){i.shift=false}if(!i.alt){i.alt=false}if(!i.ctrl){i.ctrl=false}if(o.shiftKey==i.shift&&o.altKey==i.alt&&o.ctrlKey==i.ctrl){var j,m=i.keys,l;if(YAHOO.lang.isArray(m)){for(var k=0;k<m.length;k++){j=m[k];l=a.getCharCode(o);if(j==l){g.fire(l,o);break}}}else{l=a.getCharCode(o);if(m==l){g.fire(l,o)}}}}this.enable=function(){if(!this.enabled){a.on(d,f,h);this.enabledEvent.fire(i)}this.enabled=true};this.disable=function(){if(this.enabled){a.removeListener(d,f,h);this.disabledEvent.fire(i)}this.enabled=false};this.toString=function(){return"KeyListener ["+i.keys+"] "+d.tagName+(d.id?"["+d.id+"]":"")}};var b=YAHOO.util.KeyListener;b.KEYDOWN="keydown";b.KEYUP="keyup";b.KEY={ALT:18,BACK_SPACE:8,CAPS_LOCK:20,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,META:224,NUM_LOCK:144,PAGE_DOWN:34,PAGE_UP:33,PAUSE:19,PRINTSCREEN:44,RIGHT:39,SCROLL_LOCK:145,SHIFT:16,SPACE:32,TAB:9,UP:38}})();YAHOO.register("event",YAHOO.util.Event,{version:"2.9.0",build:"2800"});YAHOO.util.Connect={_msxml_progid:["Microsoft.XMLHTTP","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP"],_http_headers:{},_has_http_headers:false,_use_default_post_header:true,_default_post_header:"application/x-www-form-urlencoded; charset=UTF-8",_default_form_header:"application/x-www-form-urlencoded",_use_default_xhr_header:true,_default_xhr_header:"XMLHttpRequest",_has_default_headers:true,_isFormSubmit:false,_default_headers:{},_poll:{},_timeOut:{},_polling_interval:50,_transaction_id:0,startEvent:new YAHOO.util.CustomEvent("start"),completeEvent:new YAHOO.util.CustomEvent("complete"),successEvent:new YAHOO.util.CustomEvent("success"),failureEvent:new YAHOO.util.CustomEvent("failure"),abortEvent:new YAHOO.util.CustomEvent("abort"),_customEvents:{onStart:["startEvent","start"],onComplete:["completeEvent","complete"],onSuccess:["successEvent","success"],onFailure:["failureEvent","failure"],onUpload:["uploadEvent","upload"],onAbort:["abortEvent","abort"]},setProgId:function(a){this._msxml_progid.unshift(a)},setDefaultPostHeader:function(a){if(typeof a=="string"){this._default_post_header=a;this._use_default_post_header=true}else{if(typeof a=="boolean"){this._use_default_post_header=a}}},setDefaultXhrHeader:function(a){if(typeof a=="string"){this._default_xhr_header=a}else{this._use_default_xhr_header=a}},setPollingInterval:function(a){if(typeof a=="number"&&isFinite(a)){this._polling_interval=a}},createXhrObject:function(g){var d,a,b;try{a=new XMLHttpRequest();d={conn:a,tId:g,xhr:true}}catch(c){for(b=0;b<this._msxml_progid.length;++b){try{a=new ActiveXObject(this._msxml_progid[b]);d={conn:a,tId:g,xhr:true};break}catch(f){}}}finally{return d}},getConnectionObject:function(a){var c,d=this._transaction_id;try{if(!a){c=this.createXhrObject(d)}else{c={tId:d};if(a==="xdr"){c.conn=this._transport;c.xdr=true}else{if(a==="upload"){c.upload=true}}}if(c){this._transaction_id++}}catch(b){}return c},asyncRequest:function(h,d,g,a){var b=g&&g.argument?g.argument:null,e=this,f,c;if(this._isFileUpload){c="upload"}else{if(g&&g.xdr){c="xdr"}}f=this.getConnectionObject(c);if(!f){return null}else{if(g&&g.customevents){this.initCustomEvents(f,g)}if(this._isFormSubmit){if(this._isFileUpload){window.setTimeout(function(){e.uploadFile(f,g,d,a)},10);return f}if(h.toUpperCase()=="GET"){if(this._sFormData.length!==0){d+=((d.indexOf("?")==-1)?"?":"&")+this._sFormData}}else{if(h.toUpperCase()=="POST"){a=a?this._sFormData+"&"+a:this._sFormData}}}if(h.toUpperCase()=="GET"&&(g&&g.cache===false)){d+=((d.indexOf("?")==-1)?"?":"&")+"rnd="+new Date().valueOf().toString()}if(this._use_default_xhr_header){if(!this._default_headers["X-Requested-With"]){this.initHeader("X-Requested-With",this._default_xhr_header,true)}}if((h.toUpperCase()==="POST"&&this._use_default_post_header)&&this._isFormSubmit===false){this.initHeader("Content-Type",this._default_post_header)}if(f.xdr){this.xdr(f,h,d,g,a);return f}f.conn.open(h,d,true);if(this._has_default_headers||this._has_http_headers){this.setHeader(f)}this.handleReadyState(f,g);f.conn.send(a||"");if(this._isFormSubmit===true){this.resetFormState()}this.startEvent.fire(f,b);if(f.startEvent){f.startEvent.fire(f,b)}return f}},initCustomEvents:function(a,c){var b;for(b in c.customevents){if(this._customEvents[b][0]){a[this._customEvents[b][0]]=new YAHOO.util.CustomEvent(this._customEvents[b][1],(c.scope)?c.scope:null);a[this._customEvents[b][0]].subscribe(c.customevents[b])}}},handleReadyState:function(c,d){var b=this,a=(d&&d.argument)?d.argument:null;if(d&&d.timeout){this._timeOut[c.tId]=window.setTimeout(function(){b.abort(c,d,true)},d.timeout)}this._poll[c.tId]=window.setInterval(function(){if(c.conn&&c.conn.readyState===4){window.clearInterval(b._poll[c.tId]);delete b._poll[c.tId];if(d&&d.timeout){window.clearTimeout(b._timeOut[c.tId]);delete b._timeOut[c.tId]}b.completeEvent.fire(c,a);if(c.completeEvent){c.completeEvent.fire(c,a)}b.handleTransactionResponse(c,d)}},this._polling_interval)},handleTransactionResponse:function(b,j,d){var f,a,h=(j&&j.argument)?j.argument:null,c=(b.r&&b.r.statusText==="xdr:success")?true:false,i=(b.r&&b.r.statusText==="xdr:failure")?true:false,k=d;try{if((b.conn.status!==undefined&&b.conn.status!==0)||c){f=b.conn.status}else{if(i&&!k){f=0}else{f=13030}}}catch(g){f=13030}if((f>=200&&f<300)||f===1223||c){a=b.xdr?b.r:this.createResponseObject(b,h);if(j&&j.success){if(!j.scope){j.success(a)}else{j.success.apply(j.scope,[a])}}this.successEvent.fire(a);if(b.successEvent){b.successEvent.fire(a)}}else{switch(f){case 12002:case 12029:case 12030:case 12031:case 12152:case 13030:a=this.createExceptionObject(b.tId,h,(d?d:false));if(j&&j.failure){if(!j.scope){j.failure(a)}else{j.failure.apply(j.scope,[a])}}break;default:a=(b.xdr)?b.response:this.createResponseObject(b,h);if(j&&j.failure){if(!j.scope){j.failure(a)}else{j.failure.apply(j.scope,[a])}}}this.failureEvent.fire(a);if(b.failureEvent){b.failureEvent.fire(a)}}this.releaseObject(b);a=null},createResponseObject:function(a,h){var d={},k={},f,c,g,b;try{c=a.conn.getAllResponseHeaders();g=c.split("\n");for(f=0;f<g.length;f++){b=g[f].indexOf(":");if(b!=-1){k[g[f].substring(0,b)]=YAHOO.lang.trim(g[f].substring(b+2))}}}catch(j){}d.tId=a.tId;d.status=(a.conn.status==1223)?204:a.conn.status;d.statusText=(a.conn.status==1223)?"No Content":a.conn.statusText;d.getResponseHeader=k;d.getAllResponseHeaders=c;d.responseText=a.conn.responseText;d.responseXML=a.conn.responseXML;if(h){d.argument=h}return d},createExceptionObject:function(h,d,a){var f=0,g="communication failure",c=-1,b="transaction aborted",e={};e.tId=h;if(a){e.status=c;e.statusText=b}else{e.status=f;e.statusText=g}if(d){e.argument=d}return e},initHeader:function(a,d,c){var b=(c)?this._default_headers:this._http_headers;b[a]=d;if(c){this._has_default_headers=true}else{this._has_http_headers=true}},setHeader:function(a){var b;if(this._has_default_headers){for(b in this._default_headers){if(YAHOO.lang.hasOwnProperty(this._default_headers,b)){a.conn.setRequestHeader(b,this._default_headers[b])}}}if(this._has_http_headers){for(b in this._http_headers){if(YAHOO.lang.hasOwnProperty(this._http_headers,b)){a.conn.setRequestHeader(b,this._http_headers[b])}}this._http_headers={};this._has_http_headers=false}},resetDefaultHeaders:function(){this._default_headers={};this._has_default_headers=false},abort:function(e,g,a){var d,b=(g&&g.argument)?g.argument:null;e=e||{};if(e.conn){if(e.xhr){if(this.isCallInProgress(e)){e.conn.abort();window.clearInterval(this._poll[e.tId]);delete this._poll[e.tId];if(a){window.clearTimeout(this._timeOut[e.tId]);delete this._timeOut[e.tId]}d=true}}else{if(e.xdr){e.conn.abort(e.tId);d=true}}}else{if(e.upload){var c="yuiIO"+e.tId;var f=document.getElementById(c);if(f){YAHOO.util.Event.removeListener(f,"load");document.body.removeChild(f);if(a){window.clearTimeout(this._timeOut[e.tId]);delete this._timeOut[e.tId]}d=true}}else{d=false}}if(d===true){this.abortEvent.fire(e,b);if(e.abortEvent){e.abortEvent.fire(e,b)}this.handleTransactionResponse(e,g,true)}return d},isCallInProgress:function(a){a=a||{};if(a.xhr&&a.conn){return a.conn.readyState!==4&&a.conn.readyState!==0}else{if(a.xdr&&a.conn){return a.conn.isCallInProgress(a.tId)}else{if(a.upload===true){return document.getElementById("yuiIO"+a.tId)?true:false}else{return false}}}},releaseObject:function(a){if(a&&a.conn){a.conn=null;a=null}}};(function(){var g=YAHOO.util.Connect,h={};function d(i){var j='<object id="YUIConnectionSwf" type="application/x-shockwave-flash" data="'+i+'" width="0" height="0">'+'<param name="movie" value="'+i+'">'+'<param name="allowScriptAccess" value="always">'+"</object>",k=document.createElement("div");document.body.appendChild(k);k.innerHTML=j}function b(l,i,j,n,k){h[parseInt(l.tId)]={"o":l,"c":n};if(k){n.method=i;n.data=k}l.conn.send(j,n,l.tId)}function e(i){d(i);g._transport=document.getElementById("YUIConnectionSwf")}function c(){g.xdrReadyEvent.fire()}function a(j,i){if(j){g.startEvent.fire(j,i.argument);if(j.startEvent){j.startEvent.fire(j,i.argument)}}}function f(j){var k=h[j.tId].o,i=h[j.tId].c;if(j.statusText==="xdr:start"){a(k,i);return}j.responseText=decodeURI(j.responseText);k.r=j;if(i.argument){k.r.argument=i.argument}this.handleTransactionResponse(k,i,j.statusText==="xdr:abort"?true:false);delete h[j.tId]}g.xdr=b;g.swf=d;g.transport=e;g.xdrReadyEvent=new YAHOO.util.CustomEvent("xdrReady");g.xdrReady=c;g.handleXdrResponse=f})();(function(){var e=YAHOO.util.Connect,g=YAHOO.util.Event,a=document.documentMode?document.documentMode:false;e._isFileUpload=false;e._formNode=null;e._sFormData=null;e._submitElementValue=null;e.uploadEvent=new YAHOO.util.CustomEvent("upload");e._hasSubmitListener=function(){if(g){g.addListener(document,"click",function(k){var j=g.getTarget(k),i=j.nodeName.toLowerCase();if((i==="input"||i==="button")&&(j.type&&j.type.toLowerCase()=="submit")){e._submitElementValue=encodeURIComponent(j.name)+"="+encodeURIComponent(j.value)}});return true}return false}();function h(w,r,m){var v,l,u,s,z,t=false,p=[],y=0,o,q,n,x,k;this.resetFormState();if(typeof w=="string"){v=(document.getElementById(w)||document.forms[w])}else{if(typeof w=="object"){v=w}else{return}}if(r){this.createFrame(m?m:null);this._isFormSubmit=true;this._isFileUpload=true;this._formNode=v;return}for(o=0,q=v.elements.length;o<q;++o){l=v.elements[o];z=l.disabled;u=l.name;if(!z&&u){u=encodeURIComponent(u)+"=";s=encodeURIComponent(l.value);switch(l.type){case"select-one":if(l.selectedIndex>-1){k=l.options[l.selectedIndex];p[y++]=u+encodeURIComponent((k.attributes.value&&k.attributes.value.specified)?k.value:k.text)}break;case"select-multiple":if(l.selectedIndex>-1){for(n=l.selectedIndex,x=l.options.length;n<x;++n){k=l.options[n];if(k.selected){p[y++]=u+encodeURIComponent((k.attributes.value&&k.attributes.value.specified)?k.value:k.text)}}}break;case"radio":case"checkbox":if(l.checked){p[y++]=u+s}break;case"file":case undefined:case"reset":case"button":break;case"submit":if(t===false){if(this._hasSubmitListener&&this._submitElementValue){p[y++]=this._submitElementValue}t=true}break;default:p[y++]=u+s}}}this._isFormSubmit=true;this._sFormData=p.join("&");this.initHeader("Content-Type",this._default_form_header);return this._sFormData}function d(){this._isFormSubmit=false;this._isFileUpload=false;this._formNode=null;this._sFormData=""}function c(i){var j="yuiIO"+this._transaction_id,l=(a===9)?true:false,k;if(YAHOO.env.ua.ie&&!l){k=document.createElement('<iframe id="'+j+'" name="'+j+'" />');if(typeof i=="boolean"){k.src="javascript:false"}}else{k=document.createElement("iframe");k.id=j;k.name=j}k.style.position="absolute";k.style.top="-1000px";k.style.left="-1000px";document.body.appendChild(k)}function f(j){var m=[],k=j.split("&"),l,n;for(l=0;l<k.length;l++){n=k[l].indexOf("=");if(n!=-1){m[l]=document.createElement("input");m[l].type="hidden";m[l].name=decodeURIComponent(k[l].substring(0,n));m[l].value=decodeURIComponent(k[l].substring(n+1));this._formNode.appendChild(m[l])}}return m}function b(m,y,n,l){var t="yuiIO"+m.tId,u="multipart/form-data",w=document.getElementById(t),p=(a>=8)?true:false,z=this,v=(y&&y.argument)?y.argument:null,x,s,k,r,j,q;j={action:this._formNode.getAttribute("action"),method:this._formNode.getAttribute("method"),target:this._formNode.getAttribute("target")};this._formNode.setAttribute("action",n);this._formNode.setAttribute("method","POST");this._formNode.setAttribute("target",t);if(YAHOO.env.ua.ie&&!p){this._formNode.setAttribute("encoding",u)}else{this._formNode.setAttribute("enctype",u)}if(l){x=this.appendPostData(l)}this._formNode.submit();this.startEvent.fire(m,v);if(m.startEvent){m.startEvent.fire(m,v)}if(y&&y.timeout){this._timeOut[m.tId]=window.setTimeout(function(){z.abort(m,y,true)},y.timeout)}if(x&&x.length>0){for(s=0;s<x.length;s++){this._formNode.removeChild(x[s])}}for(k in j){if(YAHOO.lang.hasOwnProperty(j,k)){if(j[k]){this._formNode.setAttribute(k,j[k])}else{this._formNode.removeAttribute(k)}}}this.resetFormState();q=function(){var i,A,B;if(y&&y.timeout){window.clearTimeout(z._timeOut[m.tId]);delete z._timeOut[m.tId]}z.completeEvent.fire(m,v);if(m.completeEvent){m.completeEvent.fire(m,v)}r={tId:m.tId,argument:v};try{i=w.contentWindow.document.getElementsByTagName("body")[0];A=w.contentWindow.document.getElementsByTagName("pre")[0];if(i){if(A){B=A.textContent?A.textContent:A.innerText}else{B=i.textContent?i.textContent:i.innerText}}r.responseText=B;r.responseXML=w.contentWindow.document.XMLDocument?w.contentWindow.document.XMLDocument:w.contentWindow.document}catch(o){}if(y&&y.upload){if(!y.scope){y.upload(r)}else{y.upload.apply(y.scope,[r])}}z.uploadEvent.fire(r);if(m.uploadEvent){m.uploadEvent.fire(r)}g.removeListener(w,"load",q);setTimeout(function(){document.body.removeChild(w);z.releaseObject(m)},100)};g.addListener(w,"load",q)}e.setForm=h;e.resetFormState=d;e.createFrame=c;e.appendPostData=f;e.uploadFile=b})();YAHOO.register("connection",YAHOO.util.Connect,{version:"2.9.0",build:"2800"});(function(){var b=YAHOO.util;var a=function(d,c,e,f){if(!d){}this.init(d,c,e,f)};a.NAME="Anim";a.prototype={toString:function(){var c=this.getEl()||{};var d=c.id||c.tagName;return(this.constructor.NAME+": "+d)},patterns:{noNegatives:/width|height|opacity|padding/i,offsetAttribute:/^((width|height)|(top|left))$/,defaultUnit:/width|height|top$|bottom$|left$|right$/i,offsetUnit:/\d+(em|%|en|ex|pt|in|cm|mm|pc)$/i},doMethod:function(c,e,d){return this.method(this.currentFrame,e,d-e,this.totalFrames)},setAttribute:function(c,f,e){var d=this.getEl();if(this.patterns.noNegatives.test(c)){f=(f>0)?f:0}if(c in d&&!("style"in d&&c in d.style)){d[c]=f}else{b.Dom.setStyle(d,c,f+e)}},getAttribute:function(c){var e=this.getEl();var g=b.Dom.getStyle(e,c);if(g!=="auto"&&!this.patterns.offsetUnit.test(g)){return parseFloat(g)}var d=this.patterns.offsetAttribute.exec(c)||[];var h=!!(d[3]);var f=!!(d[2]);if("style"in e){if(f||(b.Dom.getStyle(e,"position")=="absolute"&&h)){g=e["offset"+d[0].charAt(0).toUpperCase()+d[0].substr(1)]}else{g=0}}else{if(c in e){g=e[c]}}return g},getDefaultUnit:function(c){if(this.patterns.defaultUnit.test(c)){return"px"}return""},setRuntimeAttribute:function(d){var j;var e;var f=this.attributes;this.runtimeAttributes[d]={};var h=function(i){return(typeof i!=="undefined")};if(!h(f[d]["to"])&&!h(f[d]["by"])){return false}j=(h(f[d]["from"]))?f[d]["from"]:this.getAttribute(d);if(h(f[d]["to"])){e=f[d]["to"]}else{if(h(f[d]["by"])){if(j.constructor==Array){e=[];for(var g=0,c=j.length;g<c;++g){e[g]=j[g]+f[d]["by"][g]*1}}else{e=j+f[d]["by"]*1}}}this.runtimeAttributes[d].start=j;this.runtimeAttributes[d].end=e;this.runtimeAttributes[d].unit=(h(f[d].unit))?f[d]["unit"]:this.getDefaultUnit(d);return true},init:function(f,c,h,i){var d=false;var e=null;var g=0;f=b.Dom.get(f);this.attributes=c||{};this.duration=!YAHOO.lang.isUndefined(h)?h:1;this.method=i||b.Easing.easeNone;this.useSeconds=true;this.currentFrame=0;this.totalFrames=b.AnimMgr.fps;this.setEl=function(j){f=b.Dom.get(j)};this.getEl=function(){return f};this.isAnimated=function(){return d};this.getStartTime=function(){return e};this.runtimeAttributes={};this.animate=function(){if(this.isAnimated()){return false}this.currentFrame=0;this.totalFrames=(this.useSeconds)?Math.ceil(b.AnimMgr.fps*this.duration):this.duration;if(this.duration===0&&this.useSeconds){this.totalFrames=1}b.AnimMgr.registerElement(this);return true};this.stop=function(j){if(!this.isAnimated()){return false}if(j){this.currentFrame=this.totalFrames;this._onTween.fire()}b.AnimMgr.stop(this)};this._handleStart=function(){this.onStart.fire();this.runtimeAttributes={};for(var j in this.attributes){if(this.attributes.hasOwnProperty(j)){this.setRuntimeAttribute(j)}}d=true;g=0;e=new Date()};this._handleTween=function(){var l={duration:new Date()-this.getStartTime(),currentFrame:this.currentFrame};l.toString=function(){return("duration: "+l.duration+", currentFrame: "+l.currentFrame)};this.onTween.fire(l);var k=this.runtimeAttributes;for(var j in k){if(k.hasOwnProperty(j)){this.setAttribute(j,this.doMethod(j,k[j].start,k[j].end),k[j].unit)}}this.afterTween.fire(l);g+=1};this._handleComplete=function(){var j=(new Date()-e)/1000;var k={duration:j,frames:g,fps:g/j};k.toString=function(){return("duration: "+k.duration+", frames: "+k.frames+", fps: "+k.fps)};d=false;g=0;this.onComplete.fire(k)};this._onStart=new b.CustomEvent("_start",this,true);this.onStart=new b.CustomEvent("start",this);this.onTween=new b.CustomEvent("tween",this);this.afterTween=new b.CustomEvent("afterTween",this);this._onTween=new b.CustomEvent("_tween",this,true);this.onComplete=new b.CustomEvent("complete",this);this._onComplete=new b.CustomEvent("_complete",this,true);this._onStart.subscribe(this._handleStart);this._onTween.subscribe(this._handleTween);this._onComplete.subscribe(this._handleComplete)}};b.Anim=a})();YAHOO.util.AnimMgr=new function(){var e=null;var c=[];var g=0;this.fps=1000;this.delay=20;this.registerElement=function(j){c[c.length]=j;g+=1;j._onStart.fire();this.start()};var f=[];var d=false;var h=function(){var j=f.shift();b.apply(YAHOO.util.AnimMgr,j);if(f.length){arguments.callee()}};var b=function(k,j){j=j||a(k);if(!k.isAnimated()||j===-1){return false}k._onComplete.fire();c.splice(j,1);g-=1;if(g<=0){this.stop()}return true};this.unRegister=function(){f.push(arguments);if(!d){d=true;h();d=false}};this.start=function(){if(e===null){e=setInterval(this.run,this.delay)}};this.stop=function(l){if(!l){clearInterval(e);for(var k=0,j=c.length;k<j;++k){this.unRegister(c[0],0)}c=[];e=null;g=0}else{this.unRegister(l)}};this.run=function(){for(var l=0,j=c.length;l<j;++l){var k=c[l];if(!k||!k.isAnimated()){continue}if(k.currentFrame<k.totalFrames||k.totalFrames===null){k.currentFrame+=1;if(k.useSeconds){i(k)}k._onTween.fire()}else{YAHOO.util.AnimMgr.stop(k,l)}}};var a=function(l){for(var k=0,j=c.length;k<j;++k){if(c[k]===l){return k}}return-1};var i=function(k){var n=k.totalFrames;var m=k.currentFrame;var l=(k.currentFrame*k.duration*1000/k.totalFrames);var j=(new Date()-k.getStartTime());var o=0;if(j<k.duration*1000){o=Math.round((j/l-1)*k.currentFrame)}else{o=n-(m+1)}if(o>0&&isFinite(o)){if(k.currentFrame+o>=n){o=n-(m+1)}k.currentFrame+=o}};this._queue=c;this._getIndex=a};YAHOO.util.Bezier=new function(){this.getPosition=function(e,d){var f=e.length;var c=[];for(var b=0;b<f;++b){c[b]=[e[b][0],e[b][1]]}for(var a=1;a<f;++a){for(b=0;b<f-a;++b){c[b][0]=(1-d)*c[b][0]+d*c[parseInt(b+1,10)][0];c[b][1]=(1-d)*c[b][1]+d*c[parseInt(b+1,10)][1]}}return[c[0][0],c[0][1]]}};(function(){var a=function(f,e,g,h){a.superclass.constructor.call(this,f,e,g,h)};a.NAME="ColorAnim";a.DEFAULT_BGCOLOR="#fff";var c=YAHOO.util;YAHOO.extend(a,c.Anim);var d=a.superclass;var b=a.prototype;b.patterns.color=/color$/i;b.patterns.rgb=/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i;b.patterns.hex=/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i;b.patterns.hex3=/^#?([0-9A-F]{1})([0-9A-F]{1})([0-9A-F]{1})$/i;b.patterns.transparent=/^transparent|rgba\(0, 0, 0, 0\)$/;b.parseColor=function(e){if(e.length==3){return e}var f=this.patterns.hex.exec(e);if(f&&f.length==4){return[parseInt(f[1],16),parseInt(f[2],16),parseInt(f[3],16)]}f=this.patterns.rgb.exec(e);if(f&&f.length==4){return[parseInt(f[1],10),parseInt(f[2],10),parseInt(f[3],10)]}f=this.patterns.hex3.exec(e);if(f&&f.length==4){return[parseInt(f[1]+f[1],16),parseInt(f[2]+f[2],16),parseInt(f[3]+f[3],16)]}return null};b.getAttribute=function(e){var g=this.getEl();if(this.patterns.color.test(e)){var i=YAHOO.util.Dom.getStyle(g,e);var h=this;if(this.patterns.transparent.test(i)){var f=YAHOO.util.Dom.getAncestorBy(g,function(j){return!h.patterns.transparent.test(i)});if(f){i=c.Dom.getStyle(f,e)}else{i=a.DEFAULT_BGCOLOR}}}else{i=d.getAttribute.call(this,e)}return i};b.doMethod=function(f,k,g){var j;if(this.patterns.color.test(f)){j=[];for(var h=0,e=k.length;h<e;++h){j[h]=d.doMethod.call(this,f,k[h],g[h])}j="rgb("+Math.floor(j[0])+","+Math.floor(j[1])+","+Math.floor(j[2])+")"}else{j=d.doMethod.call(this,f,k,g)}return j};b.setRuntimeAttribute=function(f){d.setRuntimeAttribute.call(this,f);if(this.patterns.color.test(f)){var h=this.attributes;var k=this.parseColor(this.runtimeAttributes[f].start);var g=this.parseColor(this.runtimeAttributes[f].end);if(typeof h[f]["to"]==="undefined"&&typeof h[f]["by"]!=="undefined"){g=this.parseColor(h[f].by);for(var j=0,e=k.length;j<e;++j){g[j]=k[j]+g[j]}}this.runtimeAttributes[f].start=k;this.runtimeAttributes[f].end=g}};c.ColorAnim=a})();YAHOO.util.Easing={easeNone:function(e,a,g,f){return g*e/f+a},easeIn:function(e,a,g,f){return g*(e/=f)*e+a},easeOut:function(e,a,g,f){return-g*(e/=f)*(e-2)+a},easeBoth:function(e,a,g,f){if((e/=f/2)<1){return g/2*e*e+a}return-g/2*((--e)*(e-2)-1)+a},easeInStrong:function(e,a,g,f){return g*(e/=f)*e*e*e+a},easeOutStrong:function(e,a,g,f){return-g*((e=e/f-1)*e*e*e-1)+a},easeBothStrong:function(e,a,g,f){if((e/=f/2)<1){return g/2*e*e*e*e+a}return-g/2*((e-=2)*e*e*e-2)+a},elasticIn:function(g,e,k,j,f,i){if(g==0){return e}if((g/=j)==1){return e+k}if(!i){i=j*0.3}if(!f||f<Math.abs(k)){f=k;var h=i/4}else{var h=i/(2*Math.PI)*Math.asin(k/f)}return-(f*Math.pow(2,10*(g-=1))*Math.sin((g*j-h)*(2*Math.PI)/i))+e},elasticOut:function(g,e,k,j,f,i){if(g==0){return e}if((g/=j)==1){return e+k}if(!i){i=j*0.3}if(!f||f<Math.abs(k)){f=k;var h=i/4}else{var h=i/(2*Math.PI)*Math.asin(k/f)}return f*Math.pow(2,-10*g)*Math.sin((g*j-h)*(2*Math.PI)/i)+k+e},elasticBoth:function(g,e,k,j,f,i){if(g==0){return e}if((g/=j/2)==2){return e+k}if(!i){i=j*(0.3*1.5)}if(!f||f<Math.abs(k)){f=k;var h=i/4}else{var h=i/(2*Math.PI)*Math.asin(k/f)}if(g<1){return-0.5*(f*Math.pow(2,10*(g-=1))*Math.sin((g*j-h)*(2*Math.PI)/i))+e}return f*Math.pow(2,-10*(g-=1))*Math.sin((g*j-h)*(2*Math.PI)/i)*0.5+k+e},backIn:function(e,a,h,g,f){if(typeof f=="undefined"){f=1.70158}return h*(e/=g)*e*((f+1)*e-f)+a},backOut:function(e,a,h,g,f){if(typeof f=="undefined"){f=1.70158}return h*((e=e/g-1)*e*((f+1)*e+f)+1)+a},backBoth:function(e,a,h,g,f){if(typeof f=="undefined"){f=1.70158}if((e/=g/2)<1){return h/2*(e*e*(((f*=(1.525))+1)*e-f))+a}return h/2*((e-=2)*e*(((f*=(1.525))+1)*e+f)+2)+a},bounceIn:function(e,a,g,f){return g-YAHOO.util.Easing.bounceOut(f-e,0,g,f)+a},bounceOut:function(e,a,g,f){if((e/=f)<(1/2.75)){return g*(7.5625*e*e)+a}else{if(e<(2/2.75)){return g*(7.5625*(e-=(1.5/2.75))*e+0.75)+a}else{if(e<(2.5/2.75)){return g*(7.5625*(e-=(2.25/2.75))*e+0.9375)+a}}}return g*(7.5625*(e-=(2.625/2.75))*e+0.984375)+a},bounceBoth:function(e,a,g,f){if(e<f/2){return YAHOO.util.Easing.bounceIn(e*2,0,g,f)*0.5+a}return YAHOO.util.Easing.bounceOut(e*2-f,0,g,f)*0.5+g*0.5+a}};(function(){var a=function(h,g,i,j){if(h){a.superclass.constructor.call(this,h,g,i,j)}};a.NAME="Motion";var e=YAHOO.util;YAHOO.extend(a,e.ColorAnim);var f=a.superclass;var c=a.prototype;c.patterns.points=/^points$/i;c.setAttribute=function(g,i,h){if(this.patterns.points.test(g)){h=h||"px";f.setAttribute.call(this,"left",i[0],h);f.setAttribute.call(this,"top",i[1],h)}else{f.setAttribute.call(this,g,i,h)}};c.getAttribute=function(g){if(this.patterns.points.test(g)){var h=[f.getAttribute.call(this,"left"),f.getAttribute.call(this,"top")]}else{h=f.getAttribute.call(this,g)}return h};c.doMethod=function(g,k,h){var j=null;if(this.patterns.points.test(g)){var i=this.method(this.currentFrame,0,100,this.totalFrames)/100;j=e.Bezier.getPosition(this.runtimeAttributes[g],i)}else{j=f.doMethod.call(this,g,k,h)}return j};c.setRuntimeAttribute=function(q){if(this.patterns.points.test(q)){var h=this.getEl();var k=this.attributes;var g;var m=k["points"]["control"]||[];var j;var n,p;if(m.length>0&&!(m[0]instanceof Array)){m=[m]}else{var l=[];for(n=0,p=m.length;n<p;++n){l[n]=m[n]}m=l}if(e.Dom.getStyle(h,"position")=="static"){e.Dom.setStyle(h,"position","relative")}if(d(k["points"]["from"])){e.Dom.setXY(h,k["points"]["from"])}else{e.Dom.setXY(h,e.Dom.getXY(h))}g=this.getAttribute("points");if(d(k["points"]["to"])){j=b.call(this,k["points"]["to"],g);var o=e.Dom.getXY(this.getEl());for(n=0,p=m.length;n<p;++n){m[n]=b.call(this,m[n],g)}}else{if(d(k["points"]["by"])){j=[g[0]+k["points"]["by"][0],g[1]+k["points"]["by"][1]];for(n=0,p=m.length;n<p;++n){m[n]=[g[0]+m[n][0],g[1]+m[n][1]]}}}this.runtimeAttributes[q]=[g];if(m.length>0){this.runtimeAttributes[q]=this.runtimeAttributes[q].concat(m)}this.runtimeAttributes[q][this.runtimeAttributes[q].length]=j}else{f.setRuntimeAttribute.call(this,q)}};var b=function(g,i){var h=e.Dom.getXY(this.getEl());g=[g[0]-h[0]+i[0],g[1]-h[1]+i[1]];return g};var d=function(g){return(typeof g!=="undefined")};e.Motion=a})();(function(){var d=function(f,e,g,h){if(f){d.superclass.constructor.call(this,f,e,g,h)}};d.NAME="Scroll";var b=YAHOO.util;YAHOO.extend(d,b.ColorAnim);var c=d.superclass;var a=d.prototype;a.doMethod=function(e,h,f){var g=null;if(e=="scroll"){g=[this.method(this.currentFrame,h[0],f[0]-h[0],this.totalFrames),this.method(this.currentFrame,h[1],f[1]-h[1],this.totalFrames)]}else{g=c.doMethod.call(this,e,h,f)}return g};a.getAttribute=function(e){var g=null;var f=this.getEl();if(e=="scroll"){g=[f.scrollLeft,f.scrollTop]}else{g=c.getAttribute.call(this,e)}return g};a.setAttribute=function(e,h,g){var f=this.getEl();if(e=="scroll"){f.scrollLeft=h[0];f.scrollTop=h[1]}else{c.setAttribute.call(this,e,h,g)}};b.Scroll=d})();YAHOO.register("animation",YAHOO.util.Anim,{version:"2.9.0",build:"2800"});if(!YAHOO.util.DragDropMgr){YAHOO.util.DragDropMgr=function(){var A=YAHOO.util.Event,B=YAHOO.util.Dom;return{useShim:false,_shimActive:false,_shimState:false,_debugShim:false,_createShim:function(){var C=document.createElement("div");C.id="yui-ddm-shim";if(document.body.firstChild){document.body.insertBefore(C,document.body.firstChild)}else{document.body.appendChild(C)}C.style.display="none";C.style.backgroundColor="red";C.style.position="absolute";C.style.zIndex="99999";B.setStyle(C,"opacity","0");this._shim=C;A.on(C,"mouseup",this.handleMouseUp,this,true);A.on(C,"mousemove",this.handleMouseMove,this,true);A.on(window,"scroll",this._sizeShim,this,true)},_sizeShim:function(){if(this._shimActive){var C=this._shim;C.style.height=B.getDocumentHeight()+"px";C.style.width=B.getDocumentWidth()+"px";C.style.top="0";C.style.left="0"}},_activateShim:function(){if(this.useShim){if(!this._shim){this._createShim()}this._shimActive=true;var C=this._shim,D="0";if(this._debugShim){D=".5"}B.setStyle(C,"opacity",D);this._sizeShim();C.style.display="block"}},_deactivateShim:function(){this._shim.style.display="none";this._shimActive=false},_shim:null,ids:{},handleIds:{},dragCurrent:null,dragOvers:{},deltaX:0,deltaY:0,preventDefault:true,stopPropagation:true,initialized:false,locked:false,interactionInfo:null,init:function(){this.initialized=true},POINT:0,INTERSECT:1,STRICT_INTERSECT:2,mode:0,_execOnAll:function(E,D){for(var F in this.ids){for(var C in this.ids[F]){var G=this.ids[F][C];if(!this.isTypeOfDD(G)){continue}G[E].apply(G,D)}}},_onLoad:function(){this.init();A.on(document,"mouseup",this.handleMouseUp,this,true);A.on(document,"mousemove",this.handleMouseMove,this,true);A.on(window,"unload",this._onUnload,this,true);A.on(window,"resize",this._onResize,this,true)},_onResize:function(C){this._execOnAll("resetConstraints",[])},lock:function(){this.locked=true},unlock:function(){this.locked=false},isLocked:function(){return this.locked},locationCache:{},useCache:true,clickPixelThresh:3,clickTimeThresh:1000,dragThreshMet:false,clickTimeout:null,startX:0,startY:0,fromTimeout:false,regDragDrop:function(D,C){if(!this.initialized){this.init()}if(!this.ids[C]){this.ids[C]={}}this.ids[C][D.id]=D},removeDDFromGroup:function(E,C){if(!this.ids[C]){this.ids[C]={}}var D=this.ids[C];if(D&&D[E.id]){delete D[E.id]}},_remove:function(E){for(var D in E.groups){if(D){var C=this.ids[D];if(C&&C[E.id]){delete C[E.id]}}}delete this.handleIds[E.id]},regHandle:function(D,C){if(!this.handleIds[D]){this.handleIds[D]={}}this.handleIds[D][C]=C},isDragDrop:function(C){return(this.getDDById(C))?true:false},getRelated:function(H,D){var G=[];for(var F in H.groups){for(var E in this.ids[F]){var C=this.ids[F][E];if(!this.isTypeOfDD(C)){continue}if(!D||C.isTarget){G[G.length]=C}}}return G},isLegalTarget:function(G,F){var D=this.getRelated(G,true);for(var E=0,C=D.length;E<C;++E){if(D[E].id==F.id){return true}}return false},isTypeOfDD:function(C){return(C&&C.__ygDragDrop)},isHandle:function(D,C){return(this.handleIds[D]&&this.handleIds[D][C])},getDDById:function(D){for(var C in this.ids){if(this.ids[C][D]){return this.ids[C][D]}}return null},handleMouseDown:function(E,D){this.currentTarget=YAHOO.util.Event.getTarget(E);this.dragCurrent=D;var C=D.getEl();this.startX=YAHOO.util.Event.getPageX(E);this.startY=YAHOO.util.Event.getPageY(E);this.deltaX=this.startX-C.offsetLeft;this.deltaY=this.startY-C.offsetTop;this.dragThreshMet=false;this.clickTimeout=setTimeout(function(){var F=YAHOO.util.DDM;F.startDrag(F.startX,F.startY);F.fromTimeout=true},this.clickTimeThresh)},startDrag:function(C,E){if(this.dragCurrent&&this.dragCurrent.useShim){this._shimState=this.useShim;this.useShim=true}this._activateShim();clearTimeout(this.clickTimeout);var D=this.dragCurrent;if(D&&D.events.b4StartDrag){D.b4StartDrag(C,E);D.fireEvent("b4StartDragEvent",{x:C,y:E})}if(D&&D.events.startDrag){D.startDrag(C,E);D.fireEvent("startDragEvent",{x:C,y:E})}this.dragThreshMet=true},handleMouseUp:function(C){if(this.dragCurrent){clearTimeout(this.clickTimeout);if(this.dragThreshMet){if(this.fromTimeout){this.fromTimeout=false;this.handleMouseMove(C)}this.fromTimeout=false;this.fireEvents(C,true)}else{}this.stopDrag(C);this.stopEvent(C)}},stopEvent:function(C){if(this.stopPropagation){YAHOO.util.Event.stopPropagation(C)}if(this.preventDefault){YAHOO.util.Event.preventDefault(C)}},stopDrag:function(E,D){var C=this.dragCurrent;if(C&&!D){if(this.dragThreshMet){if(C.events.b4EndDrag){C.b4EndDrag(E);C.fireEvent("b4EndDragEvent",{e:E})}if(C.events.endDrag){C.endDrag(E);C.fireEvent("endDragEvent",{e:E})}}if(C.events.mouseUp){C.onMouseUp(E);C.fireEvent("mouseUpEvent",{e:E})}}if(this._shimActive){this._deactivateShim();if(this.dragCurrent&&this.dragCurrent.useShim){this.useShim=this._shimState;this._shimState=false}}this.dragCurrent=null;this.dragOvers={}},handleMouseMove:function(F){var C=this.dragCurrent;if(C){if(YAHOO.env.ua.ie&&(YAHOO.env.ua.ie<9)&&!F.button){this.stopEvent(F);return this.handleMouseUp(F)}else{if(F.clientX<0||F.clientY<0){}}if(!this.dragThreshMet){var E=Math.abs(this.startX-YAHOO.util.Event.getPageX(F));var D=Math.abs(this.startY-YAHOO.util.Event.getPageY(F));if(E>this.clickPixelThresh||D>this.clickPixelThresh){this.startDrag(this.startX,this.startY)}}if(this.dragThreshMet){if(C&&C.events.b4Drag){C.b4Drag(F);C.fireEvent("b4DragEvent",{e:F})}if(C&&C.events.drag){C.onDrag(F);C.fireEvent("dragEvent",{e:F})}if(C){this.fireEvents(F,false)}}this.stopEvent(F)}},fireEvents:function(W,M){var c=this.dragCurrent;if(!c||c.isLocked()||c.dragOnly){return}var O=YAHOO.util.Event.getPageX(W),N=YAHOO.util.Event.getPageY(W),Q=new YAHOO.util.Point(O,N),K=c.getTargetCoord(Q.x,Q.y),F=c.getDragEl(),E=["out","over","drop","enter"],V=new YAHOO.util.Region(K.y,K.x+F.offsetWidth,K.y+F.offsetHeight,K.x),I=[],D={},L={},R=[],d={outEvts:[],overEvts:[],dropEvts:[],enterEvts:[]};for(var T in this.dragOvers){var f=this.dragOvers[T];if(!this.isTypeOfDD(f)){continue}if(!this.isOverTarget(Q,f,this.mode,V)){d.outEvts.push(f)}I[T]=true;delete this.dragOvers[T]}for(var S in c.groups){if("string"!=typeof S){continue}for(T in this.ids[S]){var G=this.ids[S][T];if(!this.isTypeOfDD(G)){continue}if(G.isTarget&&!G.isLocked()&&G!=c){if(this.isOverTarget(Q,G,this.mode,V)){D[S]=true;if(M){d.dropEvts.push(G)}else{if(!I[G.id]){d.enterEvts.push(G)}else{d.overEvts.push(G)}this.dragOvers[G.id]=G}}}}}this.interactionInfo={out:d.outEvts,enter:d.enterEvts,over:d.overEvts,drop:d.dropEvts,point:Q,draggedRegion:V,sourceRegion:this.locationCache[c.id],validDrop:M};for(var C in D){R.push(C)}if(M&&!d.dropEvts.length){this.interactionInfo.validDrop=false;if(c.events.invalidDrop){c.onInvalidDrop(W);c.fireEvent("invalidDropEvent",{e:W})}}for(T=0;T<E.length;T++){var Z=null;if(d[E[T]+"Evts"]){Z=d[E[T]+"Evts"]}if(Z&&Z.length){var H=E[T].charAt(0).toUpperCase()+E[T].substr(1),Y="onDrag"+H,J="b4Drag"+H,P="drag"+H+"Event",X="drag"+H;if(this.mode){if(c.events[J]){c[J](W,Z,R);L[Y]=c.fireEvent(J+"Event",{event:W,info:Z,group:R})}if(c.events[X]&&(L[Y]!==false)){c[Y](W,Z,R);c.fireEvent(P,{event:W,info:Z,group:R})}}else{for(var a=0,U=Z.length;a<U;++a){if(c.events[J]){c[J](W,Z[a].id,R[0]);L[Y]=c.fireEvent(J+"Event",{event:W,info:Z[a].id,group:R[0]})}if(c.events[X]&&(L[Y]!==false)){c[Y](W,Z[a].id,R[0]);c.fireEvent(P,{event:W,info:Z[a].id,group:R[0]})}}}}}},getBestMatch:function(E){var G=null;var D=E.length;if(D==1){G=E[0]}else{for(var F=0;F<D;++F){var C=E[F];if(this.mode==this.INTERSECT&&C.cursorIsOver){G=C;break}else{if(!G||!G.overlap||(C.overlap&&G.overlap.getArea()<C.overlap.getArea())){G=C}}}}return G},refreshCache:function(D){var F=D||this.ids;for(var C in F){if("string"!=typeof C){continue}for(var E in this.ids[C]){var G=this.ids[C][E];if(this.isTypeOfDD(G)){var H=this.getLocation(G);if(H){this.locationCache[G.id]=H}else{delete this.locationCache[G.id]}}}}},verifyEl:function(D){try{if(D){var C=D.offsetParent;if(C){return true}}}catch(E){}return false},getLocation:function(H){if(!this.isTypeOfDD(H)){return null}var F=H.getEl(),K,E,D,M,L,N,C,J,G;try{K=YAHOO.util.Dom.getXY(F)}catch(I){}if(!K){return null}E=K[0];D=E+F.offsetWidth;M=K[1];L=M+F.offsetHeight;N=M-H.padding[0];C=D+H.padding[1];J=L+H.padding[2];G=E-H.padding[3];return new YAHOO.util.Region(N,C,J,G)},isOverTarget:function(K,C,E,F){var G=this.locationCache[C.id];if(!G||!this.useCache){G=this.getLocation(C);this.locationCache[C.id]=G}if(!G){return false}C.cursorIsOver=G.contains(K);var J=this.dragCurrent;if(!J||(!E&&!J.constrainX&&!J.constrainY)){return C.cursorIsOver}C.overlap=null;if(!F){var H=J.getTargetCoord(K.x,K.y);var D=J.getDragEl();F=new YAHOO.util.Region(H.y,H.x+D.offsetWidth,H.y+D.offsetHeight,H.x)}var I=F.intersect(G);if(I){C.overlap=I;return(E)?true:C.cursorIsOver}else{return false}},_onUnload:function(D,C){this.unregAll()},unregAll:function(){if(this.dragCurrent){this.stopDrag();this.dragCurrent=null}this._execOnAll("unreg",[]);this.ids={}},elementCache:{},getElWrapper:function(D){var C=this.elementCache[D];if(!C||!C.el){C=this.elementCache[D]=new this.ElementWrapper(YAHOO.util.Dom.get(D))}return C},getElement:function(C){return YAHOO.util.Dom.get(C)},getCss:function(D){var C=YAHOO.util.Dom.get(D);return(C)?C.style:null},ElementWrapper:function(C){this.el=C||null;this.id=this.el&&C.id;this.css=this.el&&C.style},getPosX:function(C){return YAHOO.util.Dom.getX(C)},getPosY:function(C){return YAHOO.util.Dom.getY(C)},swapNode:function(E,C){if(E.swapNode){E.swapNode(C)}else{var F=C.parentNode;var D=C.nextSibling;if(D==E){F.insertBefore(E,C)}else{if(C==E.nextSibling){F.insertBefore(C,E)}else{E.parentNode.replaceChild(C,E);F.insertBefore(E,D)}}}},getScroll:function(){var E,C,F=document.documentElement,D=document.body;if(F&&(F.scrollTop||F.scrollLeft)){E=F.scrollTop;C=F.scrollLeft}else{if(D){E=D.scrollTop;C=D.scrollLeft}else{}}return{top:E,left:C}},getStyle:function(D,C){return YAHOO.util.Dom.getStyle(D,C)},getScrollTop:function(){return this.getScroll().top},getScrollLeft:function(){return this.getScroll().left},moveToEl:function(C,E){var D=YAHOO.util.Dom.getXY(E);YAHOO.util.Dom.setXY(C,D)},getClientHeight:function(){return YAHOO.util.Dom.getViewportHeight()},getClientWidth:function(){return YAHOO.util.Dom.getViewportWidth()},numericSort:function(D,C){return(D-C)},_timeoutCount:0,_addListeners:function(){var C=YAHOO.util.DDM;if(YAHOO.util.Event&&document){C._onLoad()}else{if(C._timeoutCount>2000){}else{setTimeout(C._addListeners,10);if(document&&document.body){C._timeoutCount+=1}}}},handleWasClicked:function(C,E){if(this.isHandle(E,C.id)){return true}else{var D=C.parentNode;while(D){if(this.isHandle(E,D.id)){return true}else{D=D.parentNode}}}return false}}}();YAHOO.util.DDM=YAHOO.util.DragDropMgr;YAHOO.util.DDM._addListeners()}(function(){var A=YAHOO.util.Event;var B=YAHOO.util.Dom;YAHOO.util.DragDrop=function(E,C,D){if(E){this.init(E,C,D)}};YAHOO.util.DragDrop.prototype={events:null,on:function(){this.subscribe.apply(this,arguments)},id:null,config:null,dragElId:null,handleElId:null,invalidHandleTypes:null,invalidHandleIds:null,invalidHandleClasses:null,startPageX:0,startPageY:0,groups:null,locked:false,lock:function(){this.locked=true},unlock:function(){this.locked=false},isTarget:true,padding:null,dragOnly:false,useShim:false,_domRef:null,__ygDragDrop:true,constrainX:false,constrainY:false,minX:0,maxX:0,minY:0,maxY:0,deltaX:0,deltaY:0,maintainOffset:false,xTicks:null,yTicks:null,primaryButtonOnly:true,available:false,hasOuterHandles:false,cursorIsOver:false,overlap:null,b4StartDrag:function(C,D){},startDrag:function(C,D){},b4Drag:function(C){},onDrag:function(C){},onDragEnter:function(C,D){},b4DragOver:function(C){},onDragOver:function(C,D){},b4DragOut:function(C){},onDragOut:function(C,D){},b4DragDrop:function(C){},onDragDrop:function(C,D){},onInvalidDrop:function(C){},b4EndDrag:function(C){},endDrag:function(C){},b4MouseDown:function(C){},onMouseDown:function(C){},onMouseUp:function(C){},onAvailable:function(){},getEl:function(){if(!this._domRef){this._domRef=B.get(this.id)}return this._domRef},getDragEl:function(){return B.get(this.dragElId)},init:function(F,C,D){this.initTarget(F,C,D);A.on(this._domRef||this.id,"mousedown",this.handleMouseDown,this,true);for(var E in this.events){this.createEvent(E+"Event")}},initTarget:function(E,C,D){this.config=D||{};this.events={};this.DDM=YAHOO.util.DDM;this.groups={};if(typeof E!=="string"){this._domRef=E;E=B.generateId(E)}this.id=E;this.addToGroup((C)?C:"default");this.handleElId=E;A.onAvailable(E,this.handleOnAvailable,this,true);this.setDragElId(E);this.invalidHandleTypes={A:"A"};this.invalidHandleIds={};this.invalidHandleClasses=[];this.applyConfig()},applyConfig:function(){this.events={mouseDown:true,b4MouseDown:true,mouseUp:true,b4StartDrag:true,startDrag:true,b4EndDrag:true,endDrag:true,drag:true,b4Drag:true,invalidDrop:true,b4DragOut:true,dragOut:true,dragEnter:true,b4DragOver:true,dragOver:true,b4DragDrop:true,dragDrop:true};if(this.config.events){for(var C in this.config.events){if(this.config.events[C]===false){this.events[C]=false}}}this.padding=this.config.padding||[0,0,0,0];this.isTarget=(this.config.isTarget!==false);this.maintainOffset=(this.config.maintainOffset);this.primaryButtonOnly=(this.config.primaryButtonOnly!==false);this.dragOnly=((this.config.dragOnly===true)?true:false);this.useShim=((this.config.useShim===true)?true:false)},handleOnAvailable:function(){this.available=true;this.resetConstraints();this.onAvailable()},setPadding:function(E,C,F,D){if(!C&&0!==C){this.padding=[E,E,E,E]}else{if(!F&&0!==F){this.padding=[E,C,E,C]}else{this.padding=[E,C,F,D]}}},setInitPosition:function(F,E){var G=this.getEl();if(!this.DDM.verifyEl(G)){if(G&&G.style&&(G.style.display=="none")){}else{}return}var D=F||0;var C=E||0;var H=B.getXY(G);this.initPageX=H[0]-D;this.initPageY=H[1]-C;this.lastPageX=H[0];this.lastPageY=H[1];this.setStartPosition(H)},setStartPosition:function(D){var C=D||B.getXY(this.getEl());this.deltaSetXY=null;this.startPageX=C[0];this.startPageY=C[1]},addToGroup:function(C){this.groups[C]=true;this.DDM.regDragDrop(this,C)},removeFromGroup:function(C){if(this.groups[C]){delete this.groups[C]}this.DDM.removeDDFromGroup(this,C)},setDragElId:function(C){this.dragElId=C},setHandleElId:function(C){if(typeof C!=="string"){C=B.generateId(C)}this.handleElId=C;this.DDM.regHandle(this.id,C)},setOuterHandleElId:function(C){if(typeof C!=="string"){C=B.generateId(C)}A.on(C,"mousedown",this.handleMouseDown,this,true);this.setHandleElId(C);this.hasOuterHandles=true},unreg:function(){A.removeListener(this.id,"mousedown",this.handleMouseDown);this._domRef=null;this.DDM._remove(this)},isLocked:function(){return(this.DDM.isLocked()||this.locked)},handleMouseDown:function(J,I){var D=J.which||J.button;if(this.primaryButtonOnly&&D>1){return}if(this.isLocked()){return}var C=this.b4MouseDown(J),F=true;if(this.events.b4MouseDown){F=this.fireEvent("b4MouseDownEvent",J)}var E=this.onMouseDown(J),H=true;if(this.events.mouseDown){if(E===false){H=false}else{H=this.fireEvent("mouseDownEvent",J)}}if((C===false)||(E===false)||(F===false)||(H===false)){return}this.DDM.refreshCache(this.groups);var G=new YAHOO.util.Point(A.getPageX(J),A.getPageY(J));if(!this.hasOuterHandles&&!this.DDM.isOverTarget(G,this)){}else{if(this.clickValidator(J)){this.setStartPosition();this.DDM.handleMouseDown(J,this);this.DDM.stopEvent(J)}else{}}},clickValidator:function(D){var C=YAHOO.util.Event.getTarget(D);return(this.isValidHandleChild(C)&&(this.id==this.handleElId||this.DDM.handleWasClicked(C,this.id)))},getTargetCoord:function(E,D){var C=E-this.deltaX;var F=D-this.deltaY;if(this.constrainX){if(C<this.minX){C=this.minX}if(C>this.maxX){C=this.maxX}}if(this.constrainY){if(F<this.minY){F=this.minY}if(F>this.maxY){F=this.maxY}}C=this.getTick(C,this.xTicks);F=this.getTick(F,this.yTicks);return{x:C,y:F}},addInvalidHandleType:function(C){var D=C.toUpperCase();this.invalidHandleTypes[D]=D},addInvalidHandleId:function(C){if(typeof C!=="string"){C=B.generateId(C)}this.invalidHandleIds[C]=C},addInvalidHandleClass:function(C){this.invalidHandleClasses.push(C)},removeInvalidHandleType:function(C){var D=C.toUpperCase();delete this.invalidHandleTypes[D]},removeInvalidHandleId:function(C){if(typeof C!=="string"){C=B.generateId(C)}delete this.invalidHandleIds[C]},removeInvalidHandleClass:function(D){for(var E=0,C=this.invalidHandleClasses.length;E<C;++E){if(this.invalidHandleClasses[E]==D){delete this.invalidHandleClasses[E]}}},isValidHandleChild:function(F){var E=true;var H;try{H=F.nodeName.toUpperCase()}catch(G){H=F.nodeName}E=E&&!this.invalidHandleTypes[H];E=E&&!this.invalidHandleIds[F.id];for(var D=0,C=this.invalidHandleClasses.length;E&&D<C;++D){E=!B.hasClass(F,this.invalidHandleClasses[D])}return E},setXTicks:function(F,C){this.xTicks=[];this.xTickSize=C;var E={};for(var D=this.initPageX;D>=this.minX;D=D-C){if(!E[D]){this.xTicks[this.xTicks.length]=D;E[D]=true}}for(D=this.initPageX;D<=this.maxX;D=D+C){if(!E[D]){this.xTicks[this.xTicks.length]=D;E[D]=true}}this.xTicks.sort(this.DDM.numericSort)},setYTicks:function(F,C){this.yTicks=[];this.yTickSize=C;var E={};for(var D=this.initPageY;D>=this.minY;D=D-C){if(!E[D]){this.yTicks[this.yTicks.length]=D;E[D]=true}}for(D=this.initPageY;D<=this.maxY;D=D+C){if(!E[D]){this.yTicks[this.yTicks.length]=D;E[D]=true}}this.yTicks.sort(this.DDM.numericSort)},setXConstraint:function(E,D,C){this.leftConstraint=parseInt(E,10);this.rightConstraint=parseInt(D,10);this.minX=this.initPageX-this.leftConstraint;this.maxX=this.initPageX+this.rightConstraint;if(C){this.setXTicks(this.initPageX,C)}this.constrainX=true},clearConstraints:function(){this.constrainX=false;this.constrainY=false;this.clearTicks()},clearTicks:function(){this.xTicks=null;this.yTicks=null;this.xTickSize=0;this.yTickSize=0},setYConstraint:function(C,E,D){this.topConstraint=parseInt(C,10);this.bottomConstraint=parseInt(E,10);this.minY=this.initPageY-this.topConstraint;this.maxY=this.initPageY+this.bottomConstraint;if(D){this.setYTicks(this.initPageY,D)}this.constrainY=true},resetConstraints:function(){if(this.initPageX||this.initPageX===0){var D=(this.maintainOffset)?this.lastPageX-this.initPageX:0;var C=(this.maintainOffset)?this.lastPageY-this.initPageY:0;this.setInitPosition(D,C)}else{this.setInitPosition()}if(this.constrainX){this.setXConstraint(this.leftConstraint,this.rightConstraint,this.xTickSize)}if(this.constrainY){this.setYConstraint(this.topConstraint,this.bottomConstraint,this.yTickSize)}},getTick:function(I,F){if(!F){return I}else{if(F[0]>=I){return F[0]}else{for(var D=0,C=F.length;D<C;++D){var E=D+1;if(F[E]&&F[E]>=I){var H=I-F[D];var G=F[E]-I;return(G>H)?F[D]:F[E]}}return F[F.length-1]}}},toString:function(){return("DragDrop "+this.id)}};YAHOO.augment(YAHOO.util.DragDrop,YAHOO.util.EventProvider)})();YAHOO.util.DD=function(C,A,B){if(C){this.init(C,A,B)}};YAHOO.extend(YAHOO.util.DD,YAHOO.util.DragDrop,{scroll:true,autoOffset:function(C,B){var A=C-this.startPageX;var D=B-this.startPageY;this.setDelta(A,D)},setDelta:function(B,A){this.deltaX=B;this.deltaY=A},setDragElPos:function(C,B){var A=this.getDragEl();this.alignElWithMouse(A,C,B)},alignElWithMouse:function(C,G,F){var E=this.getTargetCoord(G,F);if(!this.deltaSetXY){var H=[E.x,E.y];YAHOO.util.Dom.setXY(C,H);var D=parseInt(YAHOO.util.Dom.getStyle(C,"left"),10);var B=parseInt(YAHOO.util.Dom.getStyle(C,"top"),10);this.deltaSetXY=[D-E.x,B-E.y]}else{YAHOO.util.Dom.setStyle(C,"left",(E.x+this.deltaSetXY[0])+"px");YAHOO.util.Dom.setStyle(C,"top",(E.y+this.deltaSetXY[1])+"px")}this.cachePosition(E.x,E.y);var A=this;setTimeout(function(){A.autoScroll.call(A,E.x,E.y,C.offsetHeight,C.offsetWidth)},0)},cachePosition:function(B,A){if(B){this.lastPageX=B;this.lastPageY=A}else{var C=YAHOO.util.Dom.getXY(this.getEl());this.lastPageX=C[0];this.lastPageY=C[1]}},autoScroll:function(J,I,E,K){if(this.scroll){var L=this.DDM.getClientHeight();var B=this.DDM.getClientWidth();var N=this.DDM.getScrollTop();var D=this.DDM.getScrollLeft();var H=E+I;var M=K+J;var G=(L+N-I-this.deltaY);var F=(B+D-J-this.deltaX);var C=40;var A=(document.all)?80:30;if(H>L&&G<C){window.scrollTo(D,N+A)}if(I<N&&N>0&&I-N<C){window.scrollTo(D,N-A)}if(M>B&&F<C){window.scrollTo(D+A,N)}if(J<D&&D>0&&J-D<C){window.scrollTo(D-A,N)}}},applyConfig:function(){YAHOO.util.DD.superclass.applyConfig.call(this);this.scroll=(this.config.scroll!==false)},b4MouseDown:function(A){this.setStartPosition();this.autoOffset(YAHOO.util.Event.getPageX(A),YAHOO.util.Event.getPageY(A))},b4Drag:function(A){this.setDragElPos(YAHOO.util.Event.getPageX(A),YAHOO.util.Event.getPageY(A))},toString:function(){return("DD "+this.id)}});YAHOO.util.DDProxy=function(C,A,B){if(C){this.init(C,A,B);this.initFrame()}};YAHOO.util.DDProxy.dragElId="ygddfdiv";YAHOO.extend(YAHOO.util.DDProxy,YAHOO.util.DD,{resizeFrame:true,centerFrame:false,createFrame:function(){var B=this,A=document.body;if(!A||!A.firstChild){setTimeout(function(){B.createFrame()},50);return}var F=this.getDragEl(),E=YAHOO.util.Dom;if(!F){F=document.createElement("div");F.id=this.dragElId;var D=F.style;D.position="absolute";D.visibility="hidden";D.cursor="move";D.border="2px solid #aaa";D.zIndex=999;D.height="25px";D.width="25px";var C=document.createElement("div");E.setStyle(C,"height","100%");E.setStyle(C,"width","100%");E.setStyle(C,"background-color","#ccc");E.setStyle(C,"opacity","0");F.appendChild(C);A.insertBefore(F,A.firstChild)}},initFrame:function(){this.createFrame()},applyConfig:function(){YAHOO.util.DDProxy.superclass.applyConfig.call(this);this.resizeFrame=(this.config.resizeFrame!==false);this.centerFrame=(this.config.centerFrame);this.setDragElId(this.config.dragElId||YAHOO.util.DDProxy.dragElId)},showFrame:function(E,D){var C=this.getEl();var A=this.getDragEl();var B=A.style;this._resizeProxy();if(this.centerFrame){this.setDelta(Math.round(parseInt(B.width,10)/2),Math.round(parseInt(B.height,10)/2))}this.setDragElPos(E,D);YAHOO.util.Dom.setStyle(A,"visibility","visible")},_resizeProxy:function(){if(this.resizeFrame){var H=YAHOO.util.Dom;var B=this.getEl();var C=this.getDragEl();var G=parseInt(H.getStyle(C,"borderTopWidth"),10);var I=parseInt(H.getStyle(C,"borderRightWidth"),10);var F=parseInt(H.getStyle(C,"borderBottomWidth"),10);var D=parseInt(H.getStyle(C,"borderLeftWidth"),10);if(isNaN(G)){G=0}if(isNaN(I)){I=0}if(isNaN(F)){F=0}if(isNaN(D)){D=0}var E=Math.max(0,B.offsetWidth-I-D);var A=Math.max(0,B.offsetHeight-G-F);H.setStyle(C,"width",E+"px");H.setStyle(C,"height",A+"px")}},b4MouseDown:function(B){this.setStartPosition();var A=YAHOO.util.Event.getPageX(B);var C=YAHOO.util.Event.getPageY(B);this.autoOffset(A,C)},b4StartDrag:function(A,B){this.showFrame(A,B)},b4EndDrag:function(A){YAHOO.util.Dom.setStyle(this.getDragEl(),"visibility","hidden")},endDrag:function(D){var C=YAHOO.util.Dom;var B=this.getEl();var A=this.getDragEl();C.setStyle(A,"visibility","");C.setStyle(B,"visibility","hidden");YAHOO.util.DDM.moveToEl(B,A);C.setStyle(A,"visibility","hidden");C.setStyle(B,"visibility","")},toString:function(){return("DDProxy "+this.id)}});YAHOO.util.DDTarget=function(C,A,B){if(C){this.initTarget(C,A,B)}};YAHOO.extend(YAHOO.util.DDTarget,YAHOO.util.DragDrop,{toString:function(){return("DDTarget "+this.id)}});YAHOO.register("dragdrop",YAHOO.util.DragDropMgr,{version:"2.9.0",build:"2800"});YAHOO.util.Attribute=function(b,a){if(a){this.owner=a;this.configure(b,true)}};YAHOO.util.Attribute.INVALID_VALUE={};YAHOO.util.Attribute.prototype={name:undefined,value:null,owner:null,readOnly:false,writeOnce:false,_initialConfig:null,_written:false,method:null,setter:null,getter:null,validator:null,getValue:function(){var a=this.value;if(this.getter){a=this.getter.call(this.owner,this.name,a)}return a},setValue:function(f,b){var e,a=this.owner,c=this.name,g=YAHOO.util.Attribute.INVALID_VALUE,d={type:c,prevValue:this.getValue(),newValue:f};if(this.readOnly||(this.writeOnce&&this._written)){return false}if(this.validator&&!this.validator.call(a,f)){return false}if(!b){e=a.fireBeforeChangeEvent(d);if(e===false){return false}}if(this.setter){f=this.setter.call(a,f,this.name);if(f===undefined){}if(f===g){return false}}if(this.method){if(this.method.call(a,f,this.name)===g){return false}}this.value=f;this._written=true;d.type=c;if(!b){this.owner.fireChangeEvent(d)}return true},configure:function(b,c){b=b||{};if(c){this._written=false}this._initialConfig=this._initialConfig||{};for(var a in b){if(b.hasOwnProperty(a)){this[a]=b[a];if(c){this._initialConfig[a]=b[a]}}}},resetValue:function(){return this.setValue(this._initialConfig.value)},resetConfig:function(){this.configure(this._initialConfig,true)},refresh:function(a){this.setValue(this.value,a)}};(function(){var a=YAHOO.util.Lang;YAHOO.util.AttributeProvider=function(){};YAHOO.util.AttributeProvider.prototype={_configs:null,get:function(c){this._configs=this._configs||{};var b=this._configs[c];if(!b||!this._configs.hasOwnProperty(c)){return null}return b.getValue()},set:function(d,e,b){this._configs=this._configs||{};var c=this._configs[d];if(!c){return false}return c.setValue(e,b)},getAttributeKeys:function(){this._configs=this._configs;var c=[],b;for(b in this._configs){if(a.hasOwnProperty(this._configs,b)&&!a.isUndefined(this._configs[b])){c[c.length]=b}}return c},setAttributes:function(d,b){for(var c in d){if(a.hasOwnProperty(d,c)){this.set(c,d[c],b)}}},resetValue:function(c,b){this._configs=this._configs||{};if(this._configs[c]){this.set(c,this._configs[c]._initialConfig.value,b);return true}return false},refresh:function(e,c){this._configs=this._configs||{};var f=this._configs;e=((a.isString(e))?[e]:e)||this.getAttributeKeys();for(var d=0,b=e.length;d<b;++d){if(f.hasOwnProperty(e[d])){this._configs[e[d]].refresh(c)}}},register:function(b,c){this.setAttributeConfig(b,c)},getAttributeConfig:function(c){this._configs=this._configs||{};var b=this._configs[c]||{};var d={};for(c in b){if(a.hasOwnProperty(b,c)){d[c]=b[c]}}return d},setAttributeConfig:function(b,c,d){this._configs=this._configs||{};c=c||{};if(!this._configs[b]){c.name=b;this._configs[b]=this.createAttribute(c)}else{this._configs[b].configure(c,d)}},configureAttribute:function(b,c,d){this.setAttributeConfig(b,c,d)},resetAttributeConfig:function(b){this._configs=this._configs||{};this._configs[b].resetConfig()},subscribe:function(b,c){this._events=this._events||{};if(!(b in this._events)){this._events[b]=this.createEvent(b)}YAHOO.util.EventProvider.prototype.subscribe.apply(this,arguments)},on:function(){this.subscribe.apply(this,arguments)},addListener:function(){this.subscribe.apply(this,arguments)},fireBeforeChangeEvent:function(c){var b="before";b+=c.type.charAt(0).toUpperCase()+c.type.substr(1)+"Change";c.type=b;return this.fireEvent(c.type,c)},fireChangeEvent:function(b){b.type+="Change";return this.fireEvent(b.type,b)},createAttribute:function(b){return new YAHOO.util.Attribute(b,this)}};YAHOO.augment(YAHOO.util.AttributeProvider,YAHOO.util.EventProvider)})();(function(){var b=YAHOO.util.Dom,d=YAHOO.util.AttributeProvider,c={mouseenter:true,mouseleave:true};var a=function(e,f){this.init.apply(this,arguments)};a.DOM_EVENTS={"click":true,"dblclick":true,"keydown":true,"keypress":true,"keyup":true,"mousedown":true,"mousemove":true,"mouseout":true,"mouseover":true,"mouseup":true,"mouseenter":true,"mouseleave":true,"focus":true,"blur":true,"submit":true,"change":true};a.prototype={DOM_EVENTS:null,DEFAULT_HTML_SETTER:function(g,e){var f=this.get("element");if(f){f[e]=g}return g},DEFAULT_HTML_GETTER:function(e){var f=this.get("element"),g;if(f){g=f[e]}return g},appendChild:function(e){e=e.get?e.get("element"):e;return this.get("element").appendChild(e)},getElementsByTagName:function(e){return this.get("element").getElementsByTagName(e)},hasChildNodes:function(){return this.get("element").hasChildNodes()},insertBefore:function(e,f){e=e.get?e.get("element"):e;f=(f&&f.get)?f.get("element"):f;return this.get("element").insertBefore(e,f)},removeChild:function(e){e=e.get?e.get("element"):e;return this.get("element").removeChild(e)},replaceChild:function(e,f){e=e.get?e.get("element"):e;f=f.get?f.get("element"):f;return this.get("element").replaceChild(e,f)},initAttributes:function(e){},addListener:function(j,i,k,h){h=h||this;var e=YAHOO.util.Event,g=this.get("element")||this.get("id"),f=this;if(c[j]&&!e._createMouseDelegate){return false}if(!this._events[j]){if(g&&this.DOM_EVENTS[j]){e.on(g,j,function(m,l){if(m.srcElement&&!m.target){m.target=m.srcElement}if((m.toElement&&!m.relatedTarget)||(m.fromElement&&!m.relatedTarget)){m.relatedTarget=e.getRelatedTarget(m)}if(!m.currentTarget){m.currentTarget=g}f.fireEvent(j,m,l)},k,h)}this.createEvent(j,{scope:this})}return YAHOO.util.EventProvider.prototype.subscribe.apply(this,arguments)},on:function(){return this.addListener.apply(this,arguments)},subscribe:function(){return this.addListener.apply(this,arguments)},removeListener:function(f,e){return this.unsubscribe.apply(this,arguments)},addClass:function(e){b.addClass(this.get("element"),e)},getElementsByClassName:function(f,e){return b.getElementsByClassName(f,e,this.get("element"))},hasClass:function(e){return b.hasClass(this.get("element"),e)},removeClass:function(e){return b.removeClass(this.get("element"),e)},replaceClass:function(f,e){return b.replaceClass(this.get("element"),f,e)},setStyle:function(f,e){return b.setStyle(this.get("element"),f,e)},getStyle:function(e){return b.getStyle(this.get("element"),e)},fireQueue:function(){var f=this._queue;for(var g=0,e=f.length;g<e;++g){this[f[g][0]].apply(this,f[g][1])}},appendTo:function(f,g){f=(f.get)?f.get("element"):b.get(f);this.fireEvent("beforeAppendTo",{type:"beforeAppendTo",target:f});g=(g&&g.get)?g.get("element"):b.get(g);var e=this.get("element");if(!e){return false}if(!f){return false}if(e.parent!=f){if(g){f.insertBefore(e,g)}else{f.appendChild(e)}}this.fireEvent("appendTo",{type:"appendTo",target:f});return e},get:function(e){var g=this._configs||{},f=g.element;if(f&&!g[e]&&!YAHOO.lang.isUndefined(f.value[e])){this._setHTMLAttrConfig(e)}return d.prototype.get.call(this,e)},setAttributes:function(l,h){var f={},j=this._configOrder;for(var k=0,e=j.length;k<e;++k){if(l[j[k]]!==undefined){f[j[k]]=true;this.set(j[k],l[j[k]],h)}}for(var g in l){if(l.hasOwnProperty(g)&&!f[g]){this.set(g,l[g],h)}}},set:function(f,h,e){var g=this.get("element");if(!g){this._queue[this._queue.length]=["set",arguments];if(this._configs[f]){this._configs[f].value=h}return}if(!this._configs[f]&&!YAHOO.lang.isUndefined(g[f])){this._setHTMLAttrConfig(f)}return d.prototype.set.apply(this,arguments)},setAttributeConfig:function(e,f,g){this._configOrder.push(e);d.prototype.setAttributeConfig.apply(this,arguments)},createEvent:function(f,e){this._events[f]=true;return d.prototype.createEvent.apply(this,arguments)},init:function(f,e){this._initElement(f,e)},destroy:function(){var e=this.get("element");YAHOO.util.Event.purgeElement(e,true);this.unsubscribeAll();if(e&&e.parentNode){e.parentNode.removeChild(e)}this._queue=[];this._events={};this._configs={};this._configOrder=[]},_initElement:function(g,f){this._queue=this._queue||[];this._events=this._events||{};this._configs=this._configs||{};this._configOrder=[];f=f||{};f.element=f.element||g||null;var i=false;var e=a.DOM_EVENTS;this.DOM_EVENTS=this.DOM_EVENTS||{};for(var h in e){if(e.hasOwnProperty(h)){this.DOM_EVENTS[h]=e[h]}}if(typeof f.element==="string"){this._setHTMLAttrConfig("id",{value:f.element})}if(b.get(f.element)){i=true;this._initHTMLElement(f);this._initContent(f)}YAHOO.util.Event.onAvailable(f.element,function(){if(!i){this._initHTMLElement(f)}this.fireEvent("available",{type:"available",target:b.get(f.element)})},this,true);YAHOO.util.Event.onContentReady(f.element,function(){if(!i){this._initContent(f)}this.fireEvent("contentReady",{type:"contentReady",target:b.get(f.element)})},this,true)},_initHTMLElement:function(e){this.setAttributeConfig("element",{value:b.get(e.element),readOnly:true})},_initContent:function(e){this.initAttributes(e);this.setAttributes(e,true);this.fireQueue()},_setHTMLAttrConfig:function(e,g){var f=this.get("element");g=g||{};g.name=e;g.setter=g.setter||this.DEFAULT_HTML_SETTER;g.getter=g.getter||this.DEFAULT_HTML_GETTER;g.value=g.value||f[e];this._configs[e]=new YAHOO.util.Attribute(g,this)}};YAHOO.augment(a,d);YAHOO.util.Element=a})();YAHOO.register("element",YAHOO.util.Element,{version:"2.9.0",build:"2800"});YAHOO.register("utilities",YAHOO,{version:"2.9.0",build:"2800"});
//
//../pacotes/yui290/build/container/container_core_compacto.js
(function(){YAHOO.util.Config=function(owner){if(owner){this.init(owner)}};var Lang=YAHOO.lang,CustomEvent=YAHOO.util.CustomEvent,Config=YAHOO.util.Config;Config.CONFIG_CHANGED_EVENT="configChanged";Config.BOOLEAN_TYPE="boolean";Config.prototype={owner:null,queueInProgress:false,config:null,initialConfig:null,eventQueue:null,configChangedEvent:null,init:function(owner){this.owner=owner;this.configChangedEvent=this.createEvent(Config.CONFIG_CHANGED_EVENT);this.configChangedEvent.signature=CustomEvent.LIST;this.queueInProgress=false;this.config={};this.initialConfig={};this.eventQueue=[]},checkBoolean:function(val){return(typeof val==Config.BOOLEAN_TYPE)},checkNumber:function(val){return(!isNaN(val))},fireEvent:function(key,value){var property=this.config[key];if(property&&property.event){property.event.fire(value)}},addProperty:function(key,propertyObject){key=key.toLowerCase();this.config[key]=propertyObject;propertyObject.event=this.createEvent(key,{scope:this.owner});propertyObject.event.signature=CustomEvent.LIST;propertyObject.key=key;if(propertyObject.handler){propertyObject.event.subscribe(propertyObject.handler,this.owner)}this.setProperty(key,propertyObject.value,true);if(!propertyObject.suppressEvent){this.queueProperty(key,propertyObject.value)}},getConfig:function(){var cfg={},currCfg=this.config,prop,property;for(prop in currCfg){if(Lang.hasOwnProperty(currCfg,prop)){property=currCfg[prop];if(property&&property.event){cfg[prop]=property.value}}}return cfg},getProperty:function(key){var property=this.config[key.toLowerCase()];if(property&&property.event){return property.value}else{return undefined}},resetProperty:function(key){key=key.toLowerCase();var property=this.config[key];if(property&&property.event){if(key in this.initialConfig){this.setProperty(key,this.initialConfig[key]);return true}}else{return false}},setProperty:function(key,value,silent){var property;key=key.toLowerCase();if(this.queueInProgress&&!silent){this.queueProperty(key,value);return true}else{property=this.config[key];if(property&&property.event){if(property.validator&&!property.validator(value)){return false}else{property.value=value;if(!silent){this.fireEvent(key,value);this.configChangedEvent.fire([key,value])}return true}}else{return false}}},queueProperty:function(key,value){key=key.toLowerCase();var property=this.config[key],foundDuplicate=false,iLen,queueItem,queueItemKey,queueItemValue,sLen,supercedesCheck,qLen,queueItemCheck,queueItemCheckKey,queueItemCheckValue,i,s,q;if(property&&property.event){if(!Lang.isUndefined(value)&&property.validator&&!property.validator(value)){return false}else{if(!Lang.isUndefined(value)){property.value=value}else{value=property.value}foundDuplicate=false;iLen=this.eventQueue.length;for(i=0;i<iLen;i++){queueItem=this.eventQueue[i];if(queueItem){queueItemKey=queueItem[0];queueItemValue=queueItem[1];if(queueItemKey==key){this.eventQueue[i]=null;this.eventQueue.push([key,(!Lang.isUndefined(value)?value:queueItemValue)]);foundDuplicate=true;break}}}if(!foundDuplicate&&!Lang.isUndefined(value)){this.eventQueue.push([key,value])}}if(property.supercedes){sLen=property.supercedes.length;for(s=0;s<sLen;s++){supercedesCheck=property.supercedes[s];qLen=this.eventQueue.length;for(q=0;q<qLen;q++){queueItemCheck=this.eventQueue[q];if(queueItemCheck){queueItemCheckKey=queueItemCheck[0];queueItemCheckValue=queueItemCheck[1];if(queueItemCheckKey==supercedesCheck.toLowerCase()){this.eventQueue.push([queueItemCheckKey,queueItemCheckValue]);this.eventQueue[q]=null;break}}}}}return true}else{return false}},refireEvent:function(key){key=key.toLowerCase();var property=this.config[key];if(property&&property.event&&!Lang.isUndefined(property.value)){if(this.queueInProgress){this.queueProperty(key)}else{this.fireEvent(key,property.value)}}},applyConfig:function(userConfig,init){var sKey,oConfig;if(init){oConfig={};for(sKey in userConfig){if(Lang.hasOwnProperty(userConfig,sKey)){oConfig[sKey.toLowerCase()]=userConfig[sKey]}}this.initialConfig=oConfig}for(sKey in userConfig){if(Lang.hasOwnProperty(userConfig,sKey)){this.queueProperty(sKey,userConfig[sKey])}}},refresh:function(){var prop;for(prop in this.config){if(Lang.hasOwnProperty(this.config,prop)){this.refireEvent(prop)}}},fireQueue:function(){var i,queueItem,key,value,property;this.queueInProgress=true;for(i=0;i<this.eventQueue.length;i++){queueItem=this.eventQueue[i];if(queueItem){key=queueItem[0];value=queueItem[1];property=this.config[key];property.value=value;this.eventQueue[i]=null;this.fireEvent(key,value)}}this.queueInProgress=false;this.eventQueue=[]},subscribeToConfigEvent:function(key,handler,obj,overrideContext){var property=this.config[key.toLowerCase()];if(property&&property.event){if(!Config.alreadySubscribed(property.event,handler,obj)){property.event.subscribe(handler,obj,overrideContext)}return true}else{return false}},unsubscribeFromConfigEvent:function(key,handler,obj){var property=this.config[key.toLowerCase()];if(property&&property.event){return property.event.unsubscribe(handler,obj)}else{return false}},toString:function(){var output="Config";if(this.owner){output+=" ["+this.owner.toString()+"]"}return output},outputEventQueue:function(){var output="",queueItem,q,nQueue=this.eventQueue.length;for(q=0;q<nQueue;q++){queueItem=this.eventQueue[q];if(queueItem){output+=queueItem[0]+"="+queueItem[1]+", "}}return output},destroy:function(){var oConfig=this.config,sProperty,oProperty;for(sProperty in oConfig){if(Lang.hasOwnProperty(oConfig,sProperty)){oProperty=oConfig[sProperty];oProperty.event.unsubscribeAll();oProperty.event=null}}this.configChangedEvent.unsubscribeAll();this.configChangedEvent=null;this.owner=null;this.config=null;this.initialConfig=null;this.eventQueue=null}};Config.alreadySubscribed=function(evt,fn,obj){var nSubscribers=evt.subscribers.length,subsc,i;if(nSubscribers>0){i=nSubscribers-1;do{subsc=evt.subscribers[i];if(subsc&&subsc.obj==obj&&subsc.fn==fn){return true}}while(i--)}return false};YAHOO.lang.augmentProto(Config,YAHOO.util.EventProvider)}());(function(){YAHOO.widget.Module=function(el,userConfig){if(el){this.init(el,userConfig)}else{}};var Dom=YAHOO.util.Dom,Config=YAHOO.util.Config,Event=YAHOO.util.Event,CustomEvent=YAHOO.util.CustomEvent,Module=YAHOO.widget.Module,UA=YAHOO.env.ua,m_oModuleTemplate,m_oHeaderTemplate,m_oBodyTemplate,m_oFooterTemplate,EVENT_TYPES={"BEFORE_INIT":"beforeInit","INIT":"init","APPEND":"append","BEFORE_RENDER":"beforeRender","RENDER":"render","CHANGE_HEADER":"changeHeader","CHANGE_BODY":"changeBody","CHANGE_FOOTER":"changeFooter","CHANGE_CONTENT":"changeContent","DESTROY":"destroy","BEFORE_SHOW":"beforeShow","SHOW":"show","BEFORE_HIDE":"beforeHide","HIDE":"hide"},DEFAULT_CONFIG={"VISIBLE":{key:"visible",value:true,validator:YAHOO.lang.isBoolean},"EFFECT":{key:"effect",suppressEvent:true,supercedes:["visible"]},"MONITOR_RESIZE":{key:"monitorresize",value:true},"APPEND_TO_DOCUMENT_BODY":{key:"appendtodocumentbody",value:false}};Module.IMG_ROOT=null;Module.IMG_ROOT_SSL=null;Module.CSS_MODULE="yui-module";Module.CSS_HEADER="hd";Module.CSS_BODY="bd";Module.CSS_FOOTER="ft";Module.RESIZE_MONITOR_SECURE_URL="javascript:false;";Module.RESIZE_MONITOR_BUFFER=1;Module.textResizeEvent=new CustomEvent("textResize");Module.forceDocumentRedraw=function(){var docEl=document.documentElement;if(docEl){docEl.className+=" ";docEl.className=YAHOO.lang.trim(docEl.className)}};function createModuleTemplate(){if(!m_oModuleTemplate){m_oModuleTemplate=document.createElement("div");m_oModuleTemplate.innerHTML=("<div class=\""+Module.CSS_HEADER+"\"></div>"+"<div class=\""+Module.CSS_BODY+"\"></div><div class=\""+Module.CSS_FOOTER+"\"></div>");m_oHeaderTemplate=m_oModuleTemplate.firstChild;m_oBodyTemplate=m_oHeaderTemplate.nextSibling;m_oFooterTemplate=m_oBodyTemplate.nextSibling}return m_oModuleTemplate}function createHeader(){if(!m_oHeaderTemplate){createModuleTemplate()}return(m_oHeaderTemplate.cloneNode(false))}function createBody(){if(!m_oBodyTemplate){createModuleTemplate()}return(m_oBodyTemplate.cloneNode(false))}function createFooter(){if(!m_oFooterTemplate){createModuleTemplate()}return(m_oFooterTemplate.cloneNode(false))}Module.prototype={constructor:Module,element:null,header:null,body:null,footer:null,id:null,imageRoot:Module.IMG_ROOT,initEvents:function(){var SIGNATURE=CustomEvent.LIST;this.beforeInitEvent=this.createEvent(EVENT_TYPES.BEFORE_INIT);this.beforeInitEvent.signature=SIGNATURE;this.initEvent=this.createEvent(EVENT_TYPES.INIT);this.initEvent.signature=SIGNATURE;this.appendEvent=this.createEvent(EVENT_TYPES.APPEND);this.appendEvent.signature=SIGNATURE;this.beforeRenderEvent=this.createEvent(EVENT_TYPES.BEFORE_RENDER);this.beforeRenderEvent.signature=SIGNATURE;this.renderEvent=this.createEvent(EVENT_TYPES.RENDER);this.renderEvent.signature=SIGNATURE;this.changeHeaderEvent=this.createEvent(EVENT_TYPES.CHANGE_HEADER);this.changeHeaderEvent.signature=SIGNATURE;this.changeBodyEvent=this.createEvent(EVENT_TYPES.CHANGE_BODY);this.changeBodyEvent.signature=SIGNATURE;this.changeFooterEvent=this.createEvent(EVENT_TYPES.CHANGE_FOOTER);this.changeFooterEvent.signature=SIGNATURE;this.changeContentEvent=this.createEvent(EVENT_TYPES.CHANGE_CONTENT);this.changeContentEvent.signature=SIGNATURE;this.destroyEvent=this.createEvent(EVENT_TYPES.DESTROY);this.destroyEvent.signature=SIGNATURE;this.beforeShowEvent=this.createEvent(EVENT_TYPES.BEFORE_SHOW);this.beforeShowEvent.signature=SIGNATURE;this.showEvent=this.createEvent(EVENT_TYPES.SHOW);this.showEvent.signature=SIGNATURE;this.beforeHideEvent=this.createEvent(EVENT_TYPES.BEFORE_HIDE);this.beforeHideEvent.signature=SIGNATURE;this.hideEvent=this.createEvent(EVENT_TYPES.HIDE);this.hideEvent.signature=SIGNATURE},platform:function(){var ua=navigator.userAgent.toLowerCase();if(ua.indexOf("windows")!=-1||ua.indexOf("win32")!=-1){return"windows"}else if(ua.indexOf("macintosh")!=-1){return"mac"}else{return false}}(),browser:function(){var ua=navigator.userAgent.toLowerCase();if(ua.indexOf('opera')!=-1){return'opera'}else if(ua.indexOf('msie 7')!=-1){return'ie7'}else if(ua.indexOf('msie')!=-1){return'ie'}else if(ua.indexOf('safari')!=-1){return'safari'}else if(ua.indexOf('gecko')!=-1){return'gecko'}else{return false}}(),isSecure:function(){if(window.location.href.toLowerCase().indexOf("https")===0){return true}else{return false}}(),initDefaultConfig:function(){this.cfg.addProperty(DEFAULT_CONFIG.VISIBLE.key,{handler:this.configVisible,value:DEFAULT_CONFIG.VISIBLE.value,validator:DEFAULT_CONFIG.VISIBLE.validator});this.cfg.addProperty(DEFAULT_CONFIG.EFFECT.key,{handler:this.configEffect,suppressEvent:DEFAULT_CONFIG.EFFECT.suppressEvent,supercedes:DEFAULT_CONFIG.EFFECT.supercedes});this.cfg.addProperty(DEFAULT_CONFIG.MONITOR_RESIZE.key,{handler:this.configMonitorResize,value:DEFAULT_CONFIG.MONITOR_RESIZE.value});this.cfg.addProperty(DEFAULT_CONFIG.APPEND_TO_DOCUMENT_BODY.key,{value:DEFAULT_CONFIG.APPEND_TO_DOCUMENT_BODY.value})},init:function(el,userConfig){var elId,child;this.initEvents();this.beforeInitEvent.fire(Module);this.cfg=new Config(this);if(this.isSecure){this.imageRoot=Module.IMG_ROOT_SSL}if(typeof el=="string"){elId=el;el=document.getElementById(el);if(!el){el=(createModuleTemplate()).cloneNode(false);el.id=elId}}this.id=Dom.generateId(el);this.element=el;child=this.element.firstChild;if(child){var fndHd=false,fndBd=false,fndFt=false;do{if(1==child.nodeType){if(!fndHd&&Dom.hasClass(child,Module.CSS_HEADER)){this.header=child;fndHd=true}else if(!fndBd&&Dom.hasClass(child,Module.CSS_BODY)){this.body=child;fndBd=true}else if(!fndFt&&Dom.hasClass(child,Module.CSS_FOOTER)){this.footer=child;fndFt=true}}}while((child=child.nextSibling))}this.initDefaultConfig();Dom.addClass(this.element,Module.CSS_MODULE);if(userConfig){this.cfg.applyConfig(userConfig,true)}if(!Config.alreadySubscribed(this.renderEvent,this.cfg.fireQueue,this.cfg)){this.renderEvent.subscribe(this.cfg.fireQueue,this.cfg,true)}this.initEvent.fire(Module)},initResizeMonitor:function(){var isGeckoWin=(UA.gecko&&this.platform=="windows");if(isGeckoWin){var self=this;setTimeout(function(){self._initResizeMonitor()},0)}else{this._initResizeMonitor()}},_initResizeMonitor:function(){var oDoc,oIFrame,sHTML;function fireTextResize(){Module.textResizeEvent.fire()}if(!UA.opera){oIFrame=Dom.get("_yuiResizeMonitor");var supportsCWResize=this._supportsCWResize();if(!oIFrame){oIFrame=document.createElement("iframe");if(this.isSecure&&Module.RESIZE_MONITOR_SECURE_URL&&UA.ie){oIFrame.src=Module.RESIZE_MONITOR_SECURE_URL}if(!supportsCWResize){sHTML=["<html><head><script ","type=\"text/javascript\">","window.onresize=function(){window.parent.","YAHOO.widget.Module.textResizeEvent.","fire();};<","\/script></head>","<body></body></html>"].join('');oIFrame.src="data:text/html;charset=utf-8,"+encodeURIComponent(sHTML)}oIFrame.id="_yuiResizeMonitor";oIFrame.title="Text Resize Monitor";oIFrame.tabIndex=-1;oIFrame.setAttribute("role","presentation");oIFrame.style.position="absolute";oIFrame.style.visibility="hidden";var db=document.body,fc=db.firstChild;if(fc){db.insertBefore(oIFrame,fc)}else{db.appendChild(oIFrame)}oIFrame.style.backgroundColor="transparent";oIFrame.style.borderWidth="0";oIFrame.style.width="2em";oIFrame.style.height="2em";oIFrame.style.left="0";oIFrame.style.top=(-1*(oIFrame.offsetHeight+Module.RESIZE_MONITOR_BUFFER))+"px";oIFrame.style.visibility="visible";if(UA.webkit){oDoc=oIFrame.contentWindow.document;oDoc.open();oDoc.close()}}if(oIFrame&&oIFrame.contentWindow){Module.textResizeEvent.subscribe(this.onDomResize,this,true);if(!Module.textResizeInitialized){if(supportsCWResize){if(!Event.on(oIFrame.contentWindow,"resize",fireTextResize)){Event.on(oIFrame,"resize",fireTextResize)}}Module.textResizeInitialized=true}this.resizeMonitor=oIFrame}}},_supportsCWResize:function(){var bSupported=true;if(UA.gecko&&UA.gecko<=1.8){bSupported=false}return bSupported},onDomResize:function(e,obj){var nTop=-1*(this.resizeMonitor.offsetHeight+Module.RESIZE_MONITOR_BUFFER);this.resizeMonitor.style.top=nTop+"px";this.resizeMonitor.style.left="0"},setHeader:function(headerContent){var oHeader=this.header||(this.header=createHeader());if(headerContent.nodeName){oHeader.innerHTML="";oHeader.appendChild(headerContent)}else{oHeader.innerHTML=headerContent}if(this._rendered){this._renderHeader()}this.changeHeaderEvent.fire(headerContent);this.changeContentEvent.fire()},appendToHeader:function(element){var oHeader=this.header||(this.header=createHeader());oHeader.appendChild(element);this.changeHeaderEvent.fire(element);this.changeContentEvent.fire()},setBody:function(bodyContent){var oBody=this.body||(this.body=createBody());if(bodyContent.nodeName){oBody.innerHTML="";oBody.appendChild(bodyContent)}else{oBody.innerHTML=bodyContent}if(this._rendered){this._renderBody()}this.changeBodyEvent.fire(bodyContent);this.changeContentEvent.fire()},appendToBody:function(element){var oBody=this.body||(this.body=createBody());oBody.appendChild(element);this.changeBodyEvent.fire(element);this.changeContentEvent.fire()},setFooter:function(footerContent){var oFooter=this.footer||(this.footer=createFooter());if(footerContent.nodeName){oFooter.innerHTML="";oFooter.appendChild(footerContent)}else{oFooter.innerHTML=footerContent}if(this._rendered){this._renderFooter()}this.changeFooterEvent.fire(footerContent);this.changeContentEvent.fire()},appendToFooter:function(element){var oFooter=this.footer||(this.footer=createFooter());oFooter.appendChild(element);this.changeFooterEvent.fire(element);this.changeContentEvent.fire()},render:function(appendToNode,moduleElement){var me=this;function appendTo(parentNode){if(typeof parentNode=="string"){parentNode=document.getElementById(parentNode)}if(parentNode){me._addToParent(parentNode,me.element);me.appendEvent.fire()}}this.beforeRenderEvent.fire();if(!moduleElement){moduleElement=this.element}if(appendToNode){appendTo(appendToNode)}else{if(!Dom.inDocument(this.element)){return false}}this._renderHeader(moduleElement);this._renderBody(moduleElement);this._renderFooter(moduleElement);this._rendered=true;this.renderEvent.fire();return true},_renderHeader:function(moduleElement){moduleElement=moduleElement||this.element;if(this.header&&!Dom.inDocument(this.header)){var firstChild=moduleElement.firstChild;if(firstChild){moduleElement.insertBefore(this.header,firstChild)}else{moduleElement.appendChild(this.header)}}},_renderBody:function(moduleElement){moduleElement=moduleElement||this.element;if(this.body&&!Dom.inDocument(this.body)){if(this.footer&&Dom.isAncestor(moduleElement,this.footer)){moduleElement.insertBefore(this.body,this.footer)}else{moduleElement.appendChild(this.body)}}},_renderFooter:function(moduleElement){moduleElement=moduleElement||this.element;if(this.footer&&!Dom.inDocument(this.footer)){moduleElement.appendChild(this.footer)}},destroy:function(shallowPurge){var parent,purgeChildren=!(shallowPurge);if(this.element){Event.purgeElement(this.element,purgeChildren);parent=this.element.parentNode}if(parent){parent.removeChild(this.element)}this.element=null;this.header=null;this.body=null;this.footer=null;Module.textResizeEvent.unsubscribe(this.onDomResize,this);this.cfg.destroy();this.cfg=null;this.destroyEvent.fire()},show:function(){this.cfg.setProperty("visible",true)},hide:function(){this.cfg.setProperty("visible",false)},configVisible:function(type,args,obj){var visible=args[0];if(visible){if(this.beforeShowEvent.fire()){Dom.setStyle(this.element,"display","block");this.showEvent.fire()}}else{if(this.beforeHideEvent.fire()){Dom.setStyle(this.element,"display","none");this.hideEvent.fire()}}},configEffect:function(type,args,obj){this._cachedEffects=(this.cacheEffects)?this._createEffects(args[0]):null},cacheEffects:true,_createEffects:function(effectCfg){var effectInstances=null,n,i,eff;if(effectCfg){if(effectCfg instanceof Array){effectInstances=[];n=effectCfg.length;for(i=0;i<n;i++){eff=effectCfg[i];if(eff.effect){effectInstances[effectInstances.length]=eff.effect(this,eff.duration)}}}else if(effectCfg.effect){effectInstances=[effectCfg.effect(this,effectCfg.duration)]}}return effectInstances},configMonitorResize:function(type,args,obj){var monitor=args[0];if(monitor){this.initResizeMonitor()}else{Module.textResizeEvent.unsubscribe(this.onDomResize,this,true);this.resizeMonitor=null}},_addToParent:function(parentNode,element){if(!this.cfg.getProperty("appendtodocumentbody")&&parentNode===document.body&&parentNode.firstChild){parentNode.insertBefore(element,parentNode.firstChild)}else{parentNode.appendChild(element)}},toString:function(){return"Module "+this.id}};YAHOO.lang.augmentProto(Module,YAHOO.util.EventProvider)}());(function(){YAHOO.widget.Overlay=function(el,userConfig){YAHOO.widget.Overlay.superclass.constructor.call(this,el,userConfig)};var Lang=YAHOO.lang,CustomEvent=YAHOO.util.CustomEvent,Module=YAHOO.widget.Module,Event=YAHOO.util.Event,Dom=YAHOO.util.Dom,Config=YAHOO.util.Config,UA=YAHOO.env.ua,Overlay=YAHOO.widget.Overlay,_SUBSCRIBE="subscribe",_UNSUBSCRIBE="unsubscribe",_CONTAINED="contained",m_oIFrameTemplate,EVENT_TYPES={"BEFORE_MOVE":"beforeMove","MOVE":"move"},DEFAULT_CONFIG={"X":{key:"x",validator:Lang.isNumber,suppressEvent:true,supercedes:["iframe"]},"Y":{key:"y",validator:Lang.isNumber,suppressEvent:true,supercedes:["iframe"]},"XY":{key:"xy",suppressEvent:true,supercedes:["iframe"]},"CONTEXT":{key:"context",suppressEvent:true,supercedes:["iframe"]},"FIXED_CENTER":{key:"fixedcenter",value:false,supercedes:["iframe","visible"]},"WIDTH":{key:"width",suppressEvent:true,supercedes:["context","fixedcenter","iframe"]},"HEIGHT":{key:"height",suppressEvent:true,supercedes:["context","fixedcenter","iframe"]},"AUTO_FILL_HEIGHT":{key:"autofillheight",supercedes:["height"],value:"body"},"ZINDEX":{key:"zindex",value:null},"CONSTRAIN_TO_VIEWPORT":{key:"constraintoviewport",value:false,validator:Lang.isBoolean,supercedes:["iframe","x","y","xy"]},"IFRAME":{key:"iframe",value:(UA.ie==6?true:false),validator:Lang.isBoolean,supercedes:["zindex"]},"PREVENT_CONTEXT_OVERLAP":{key:"preventcontextoverlap",value:false,validator:Lang.isBoolean,supercedes:["constraintoviewport"]}};Overlay.IFRAME_SRC="javascript:false;";Overlay.IFRAME_OFFSET=3;Overlay.VIEWPORT_OFFSET=10;Overlay.TOP_LEFT="tl";Overlay.TOP_RIGHT="tr";Overlay.BOTTOM_LEFT="bl";Overlay.BOTTOM_RIGHT="br";Overlay.PREVENT_OVERLAP_X={"tltr":true,"blbr":true,"brbl":true,"trtl":true};Overlay.PREVENT_OVERLAP_Y={"trbr":true,"tlbl":true,"bltl":true,"brtr":true};Overlay.CSS_OVERLAY="yui-overlay";Overlay.CSS_HIDDEN="yui-overlay-hidden";Overlay.CSS_IFRAME="yui-overlay-iframe";Overlay.STD_MOD_RE=/^\s*?(body|footer|header)\s*?$/i;Overlay.windowScrollEvent=new CustomEvent("windowScroll");Overlay.windowResizeEvent=new CustomEvent("windowResize");Overlay.windowScrollHandler=function(e){var t=Event.getTarget(e);if(!t||t===window||t===window.document){if(UA.ie){if(!window.scrollEnd){window.scrollEnd=-1}clearTimeout(window.scrollEnd);window.scrollEnd=setTimeout(function(){Overlay.windowScrollEvent.fire()},1)}else{Overlay.windowScrollEvent.fire()}}};Overlay.windowResizeHandler=function(e){if(UA.ie){if(!window.resizeEnd){window.resizeEnd=-1}clearTimeout(window.resizeEnd);window.resizeEnd=setTimeout(function(){Overlay.windowResizeEvent.fire()},100)}else{Overlay.windowResizeEvent.fire()}};Overlay._initialized=null;if(Overlay._initialized===null){Event.on(window,"scroll",Overlay.windowScrollHandler);Event.on(window,"resize",Overlay.windowResizeHandler);Overlay._initialized=true}Overlay._TRIGGER_MAP={"windowScroll":Overlay.windowScrollEvent,"windowResize":Overlay.windowResizeEvent,"textResize":Module.textResizeEvent};YAHOO.extend(Overlay,Module,{CONTEXT_TRIGGERS:[],init:function(el,userConfig){Overlay.superclass.init.call(this,el);this.beforeInitEvent.fire(Overlay);Dom.addClass(this.element,Overlay.CSS_OVERLAY);if(userConfig){this.cfg.applyConfig(userConfig,true)}if(this.platform=="mac"&&UA.gecko){if(!Config.alreadySubscribed(this.showEvent,this.showMacGeckoScrollbars,this)){this.showEvent.subscribe(this.showMacGeckoScrollbars,this,true)}if(!Config.alreadySubscribed(this.hideEvent,this.hideMacGeckoScrollbars,this)){this.hideEvent.subscribe(this.hideMacGeckoScrollbars,this,true)}}this.initEvent.fire(Overlay)},initEvents:function(){Overlay.superclass.initEvents.call(this);var SIGNATURE=CustomEvent.LIST;this.beforeMoveEvent=this.createEvent(EVENT_TYPES.BEFORE_MOVE);this.beforeMoveEvent.signature=SIGNATURE;this.moveEvent=this.createEvent(EVENT_TYPES.MOVE);this.moveEvent.signature=SIGNATURE},initDefaultConfig:function(){Overlay.superclass.initDefaultConfig.call(this);var cfg=this.cfg;cfg.addProperty(DEFAULT_CONFIG.X.key,{handler:this.configX,validator:DEFAULT_CONFIG.X.validator,suppressEvent:DEFAULT_CONFIG.X.suppressEvent,supercedes:DEFAULT_CONFIG.X.supercedes});cfg.addProperty(DEFAULT_CONFIG.Y.key,{handler:this.configY,validator:DEFAULT_CONFIG.Y.validator,suppressEvent:DEFAULT_CONFIG.Y.suppressEvent,supercedes:DEFAULT_CONFIG.Y.supercedes});cfg.addProperty(DEFAULT_CONFIG.XY.key,{handler:this.configXY,suppressEvent:DEFAULT_CONFIG.XY.suppressEvent,supercedes:DEFAULT_CONFIG.XY.supercedes});cfg.addProperty(DEFAULT_CONFIG.CONTEXT.key,{handler:this.configContext,suppressEvent:DEFAULT_CONFIG.CONTEXT.suppressEvent,supercedes:DEFAULT_CONFIG.CONTEXT.supercedes});cfg.addProperty(DEFAULT_CONFIG.FIXED_CENTER.key,{handler:this.configFixedCenter,value:DEFAULT_CONFIG.FIXED_CENTER.value,validator:DEFAULT_CONFIG.FIXED_CENTER.validator,supercedes:DEFAULT_CONFIG.FIXED_CENTER.supercedes});cfg.addProperty(DEFAULT_CONFIG.WIDTH.key,{handler:this.configWidth,suppressEvent:DEFAULT_CONFIG.WIDTH.suppressEvent,supercedes:DEFAULT_CONFIG.WIDTH.supercedes});cfg.addProperty(DEFAULT_CONFIG.HEIGHT.key,{handler:this.configHeight,suppressEvent:DEFAULT_CONFIG.HEIGHT.suppressEvent,supercedes:DEFAULT_CONFIG.HEIGHT.supercedes});cfg.addProperty(DEFAULT_CONFIG.AUTO_FILL_HEIGHT.key,{handler:this.configAutoFillHeight,value:DEFAULT_CONFIG.AUTO_FILL_HEIGHT.value,validator:this._validateAutoFill,supercedes:DEFAULT_CONFIG.AUTO_FILL_HEIGHT.supercedes});cfg.addProperty(DEFAULT_CONFIG.ZINDEX.key,{handler:this.configzIndex,value:DEFAULT_CONFIG.ZINDEX.value});cfg.addProperty(DEFAULT_CONFIG.CONSTRAIN_TO_VIEWPORT.key,{handler:this.configConstrainToViewport,value:DEFAULT_CONFIG.CONSTRAIN_TO_VIEWPORT.value,validator:DEFAULT_CONFIG.CONSTRAIN_TO_VIEWPORT.validator,supercedes:DEFAULT_CONFIG.CONSTRAIN_TO_VIEWPORT.supercedes});cfg.addProperty(DEFAULT_CONFIG.IFRAME.key,{handler:this.configIframe,value:DEFAULT_CONFIG.IFRAME.value,validator:DEFAULT_CONFIG.IFRAME.validator,supercedes:DEFAULT_CONFIG.IFRAME.supercedes});cfg.addProperty(DEFAULT_CONFIG.PREVENT_CONTEXT_OVERLAP.key,{value:DEFAULT_CONFIG.PREVENT_CONTEXT_OVERLAP.value,validator:DEFAULT_CONFIG.PREVENT_CONTEXT_OVERLAP.validator,supercedes:DEFAULT_CONFIG.PREVENT_CONTEXT_OVERLAP.supercedes})},moveTo:function(x,y){this.cfg.setProperty("xy",[x,y])},hideMacGeckoScrollbars:function(){Dom.replaceClass(this.element,"show-scrollbars","hide-scrollbars")},showMacGeckoScrollbars:function(){Dom.replaceClass(this.element,"hide-scrollbars","show-scrollbars")},_setDomVisibility:function(show){Dom.setStyle(this.element,"visibility",(show)?"visible":"hidden");var hiddenClass=Overlay.CSS_HIDDEN;if(show){Dom.removeClass(this.element,hiddenClass)}else{Dom.addClass(this.element,hiddenClass)}},configVisible:function(type,args,obj){var visible=args[0],currentVis=Dom.getStyle(this.element,"visibility"),effects=this._cachedEffects||this._createEffects(this.cfg.getProperty("effect")),isMacGecko=(this.platform=="mac"&&UA.gecko),alreadySubscribed=Config.alreadySubscribed,ei,e,j,k,h,nEffectInstances;if(currentVis=="inherit"){e=this.element.parentNode;while(e.nodeType!=9&&e.nodeType!=11){currentVis=Dom.getStyle(e,"visibility");if(currentVis!="inherit"){break}e=e.parentNode}if(currentVis=="inherit"){currentVis="visible"}}if(visible){if(isMacGecko){this.showMacGeckoScrollbars()}if(effects){if(visible){if(currentVis!="visible"||currentVis===""||this._fadingOut){if(this.beforeShowEvent.fire()){nEffectInstances=effects.length;for(j=0;j<nEffectInstances;j++){ei=effects[j];if(j===0&&!alreadySubscribed(ei.animateInCompleteEvent,this.showEvent.fire,this.showEvent)){ei.animateInCompleteEvent.subscribe(this.showEvent.fire,this.showEvent,true)}ei.animateIn()}}}}}else{if(currentVis!="visible"||currentVis===""){if(this.beforeShowEvent.fire()){this._setDomVisibility(true);this.cfg.refireEvent("iframe");this.showEvent.fire()}}else{this._setDomVisibility(true)}}}else{if(isMacGecko){this.hideMacGeckoScrollbars()}if(effects){if(currentVis=="visible"||this._fadingIn){if(this.beforeHideEvent.fire()){nEffectInstances=effects.length;for(k=0;k<nEffectInstances;k++){h=effects[k];if(k===0&&!alreadySubscribed(h.animateOutCompleteEvent,this.hideEvent.fire,this.hideEvent)){h.animateOutCompleteEvent.subscribe(this.hideEvent.fire,this.hideEvent,true)}h.animateOut()}}}else if(currentVis===""){this._setDomVisibility(false)}}else{if(currentVis=="visible"||currentVis===""){if(this.beforeHideEvent.fire()){this._setDomVisibility(false);this.hideEvent.fire()}}else{this._setDomVisibility(false)}}}},doCenterOnDOMEvent:function(){var cfg=this.cfg,fc=cfg.getProperty("fixedcenter");if(cfg.getProperty("visible")){if(fc&&(fc!==_CONTAINED||this.fitsInViewport())){this.center()}}},fitsInViewport:function(){var nViewportOffset=Overlay.VIEWPORT_OFFSET,element=this.element,elementWidth=element.offsetWidth,elementHeight=element.offsetHeight,viewportWidth=Dom.getViewportWidth(),viewportHeight=Dom.getViewportHeight();return((elementWidth+nViewportOffset<viewportWidth)&&(elementHeight+nViewportOffset<viewportHeight))},configFixedCenter:function(type,args,obj){var val=args[0],alreadySubscribed=Config.alreadySubscribed,windowResizeEvent=Overlay.windowResizeEvent,windowScrollEvent=Overlay.windowScrollEvent;if(val){this.center();if(!alreadySubscribed(this.beforeShowEvent,this.center)){this.beforeShowEvent.subscribe(this.center)}if(!alreadySubscribed(windowResizeEvent,this.doCenterOnDOMEvent,this)){windowResizeEvent.subscribe(this.doCenterOnDOMEvent,this,true)}if(!alreadySubscribed(windowScrollEvent,this.doCenterOnDOMEvent,this)){windowScrollEvent.subscribe(this.doCenterOnDOMEvent,this,true)}}else{this.beforeShowEvent.unsubscribe(this.center);windowResizeEvent.unsubscribe(this.doCenterOnDOMEvent,this);windowScrollEvent.unsubscribe(this.doCenterOnDOMEvent,this)}},configHeight:function(type,args,obj){var height=args[0],el=this.element;Dom.setStyle(el,"height",height);this.cfg.refireEvent("iframe")},configAutoFillHeight:function(type,args,obj){var fillEl=args[0],cfg=this.cfg,autoFillHeight="autofillheight",height="height",currEl=cfg.getProperty(autoFillHeight),autoFill=this._autoFillOnHeightChange;cfg.unsubscribeFromConfigEvent(height,autoFill);Module.textResizeEvent.unsubscribe(autoFill);this.changeContentEvent.unsubscribe(autoFill);if(currEl&&fillEl!==currEl&&this[currEl]){Dom.setStyle(this[currEl],height,"")}if(fillEl){fillEl=Lang.trim(fillEl.toLowerCase());cfg.subscribeToConfigEvent(height,autoFill,this[fillEl],this);Module.textResizeEvent.subscribe(autoFill,this[fillEl],this);this.changeContentEvent.subscribe(autoFill,this[fillEl],this);cfg.setProperty(autoFillHeight,fillEl,true)}},configWidth:function(type,args,obj){var width=args[0],el=this.element;Dom.setStyle(el,"width",width);this.cfg.refireEvent("iframe")},configzIndex:function(type,args,obj){var zIndex=args[0],el=this.element;if(!zIndex){zIndex=Dom.getStyle(el,"zIndex");if(!zIndex||isNaN(zIndex)){zIndex=0}}if(this.iframe||this.cfg.getProperty("iframe")===true){if(zIndex<=0){zIndex=1}}Dom.setStyle(el,"zIndex",zIndex);this.cfg.setProperty("zIndex",zIndex,true);if(this.iframe){this.stackIframe()}},configXY:function(type,args,obj){var pos=args[0],x=pos[0],y=pos[1];this.cfg.setProperty("x",x);this.cfg.setProperty("y",y);this.beforeMoveEvent.fire([x,y]);x=this.cfg.getProperty("x");y=this.cfg.getProperty("y");this.cfg.refireEvent("iframe");this.moveEvent.fire([x,y])},configX:function(type,args,obj){var x=args[0],y=this.cfg.getProperty("y");this.cfg.setProperty("x",x,true);this.cfg.setProperty("y",y,true);this.beforeMoveEvent.fire([x,y]);x=this.cfg.getProperty("x");y=this.cfg.getProperty("y");Dom.setX(this.element,x,true);this.cfg.setProperty("xy",[x,y],true);this.cfg.refireEvent("iframe");this.moveEvent.fire([x,y])},configY:function(type,args,obj){var x=this.cfg.getProperty("x"),y=args[0];this.cfg.setProperty("x",x,true);this.cfg.setProperty("y",y,true);this.beforeMoveEvent.fire([x,y]);x=this.cfg.getProperty("x");y=this.cfg.getProperty("y");Dom.setY(this.element,y,true);this.cfg.setProperty("xy",[x,y],true);this.cfg.refireEvent("iframe");this.moveEvent.fire([x,y])},showIframe:function(){var oIFrame=this.iframe,oParentNode;if(oIFrame){oParentNode=this.element.parentNode;if(oParentNode!=oIFrame.parentNode){this._addToParent(oParentNode,oIFrame)}oIFrame.style.display="block"}},hideIframe:function(){if(this.iframe){this.iframe.style.display="none"}},syncIframe:function(){var oIFrame=this.iframe,oElement=this.element,nOffset=Overlay.IFRAME_OFFSET,nDimensionOffset=(nOffset*2),aXY;if(oIFrame){oIFrame.style.width=(oElement.offsetWidth+nDimensionOffset+"px");oIFrame.style.height=(oElement.offsetHeight+nDimensionOffset+"px");aXY=this.cfg.getProperty("xy");if(!Lang.isArray(aXY)||(isNaN(aXY[0])||isNaN(aXY[1]))){this.syncPosition();aXY=this.cfg.getProperty("xy")}Dom.setXY(oIFrame,[(aXY[0]-nOffset),(aXY[1]-nOffset)])}},stackIframe:function(){if(this.iframe){var overlayZ=Dom.getStyle(this.element,"zIndex");if(!YAHOO.lang.isUndefined(overlayZ)&&!isNaN(overlayZ)){Dom.setStyle(this.iframe,"zIndex",(overlayZ-1))}}},configIframe:function(type,args,obj){var bIFrame=args[0];function createIFrame(){var oIFrame=this.iframe,oElement=this.element,oParent;if(!oIFrame){if(!m_oIFrameTemplate){m_oIFrameTemplate=document.createElement("iframe");if(this.isSecure){m_oIFrameTemplate.src=Overlay.IFRAME_SRC}if(UA.ie){m_oIFrameTemplate.style.filter="alpha(opacity=0)";m_oIFrameTemplate.frameBorder=0}else{m_oIFrameTemplate.style.opacity="0"}m_oIFrameTemplate.style.position="absolute";m_oIFrameTemplate.style.border="none";m_oIFrameTemplate.style.margin="0";m_oIFrameTemplate.style.padding="0";m_oIFrameTemplate.style.display="none";m_oIFrameTemplate.tabIndex=-1;m_oIFrameTemplate.className=Overlay.CSS_IFRAME}oIFrame=m_oIFrameTemplate.cloneNode(false);oIFrame.id=this.id+"_f";oParent=oElement.parentNode;var parentNode=oParent||document.body;this._addToParent(parentNode,oIFrame);this.iframe=oIFrame}this.showIframe();this.syncIframe();this.stackIframe();if(!this._hasIframeEventListeners){this.showEvent.subscribe(this.showIframe);this.hideEvent.subscribe(this.hideIframe);this.changeContentEvent.subscribe(this.syncIframe);this._hasIframeEventListeners=true}}function onBeforeShow(){createIFrame.call(this);this.beforeShowEvent.unsubscribe(onBeforeShow);this._iframeDeferred=false}if(bIFrame){if(this.cfg.getProperty("visible")){createIFrame.call(this)}else{if(!this._iframeDeferred){this.beforeShowEvent.subscribe(onBeforeShow);this._iframeDeferred=true}}}else{this.hideIframe();if(this._hasIframeEventListeners){this.showEvent.unsubscribe(this.showIframe);this.hideEvent.unsubscribe(this.hideIframe);this.changeContentEvent.unsubscribe(this.syncIframe);this._hasIframeEventListeners=false}}},_primeXYFromDOM:function(){if(YAHOO.lang.isUndefined(this.cfg.getProperty("xy"))){this.syncPosition();this.cfg.refireEvent("xy");this.beforeShowEvent.unsubscribe(this._primeXYFromDOM)}},configConstrainToViewport:function(type,args,obj){var val=args[0];if(val){if(!Config.alreadySubscribed(this.beforeMoveEvent,this.enforceConstraints,this)){this.beforeMoveEvent.subscribe(this.enforceConstraints,this,true)}if(!Config.alreadySubscribed(this.beforeShowEvent,this._primeXYFromDOM)){this.beforeShowEvent.subscribe(this._primeXYFromDOM)}}else{this.beforeShowEvent.unsubscribe(this._primeXYFromDOM);this.beforeMoveEvent.unsubscribe(this.enforceConstraints,this)}},configContext:function(type,args,obj){var contextArgs=args[0],contextEl,elementMagnetCorner,contextMagnetCorner,triggers,offset,defTriggers=this.CONTEXT_TRIGGERS;if(contextArgs){contextEl=contextArgs[0];elementMagnetCorner=contextArgs[1];contextMagnetCorner=contextArgs[2];triggers=contextArgs[3];offset=contextArgs[4];if(defTriggers&&defTriggers.length>0){triggers=(triggers||[]).concat(defTriggers)}if(contextEl){if(typeof contextEl=="string"){this.cfg.setProperty("context",[document.getElementById(contextEl),elementMagnetCorner,contextMagnetCorner,triggers,offset],true)}if(elementMagnetCorner&&contextMagnetCorner){this.align(elementMagnetCorner,contextMagnetCorner,offset)}if(this._contextTriggers){this._processTriggers(this._contextTriggers,_UNSUBSCRIBE,this._alignOnTrigger)}if(triggers){this._processTriggers(triggers,_SUBSCRIBE,this._alignOnTrigger);this._contextTriggers=triggers}}}},_alignOnTrigger:function(type,args){this.align()},_findTriggerCE:function(t){var tce=null;if(t instanceof CustomEvent){tce=t}else if(Overlay._TRIGGER_MAP[t]){tce=Overlay._TRIGGER_MAP[t]}return tce},_processTriggers:function(triggers,mode,fn){var t,tce;for(var i=0,l=triggers.length;i<l;++i){t=triggers[i];tce=this._findTriggerCE(t);if(tce){tce[mode](fn,this,true)}else{this[mode](t,fn)}}},align:function(elementAlign,contextAlign,xyOffset){var contextArgs=this.cfg.getProperty("context"),me=this,context,element,contextRegion;function doAlign(v,h){var alignX=null,alignY=null;switch(elementAlign){case Overlay.TOP_LEFT:alignX=h;alignY=v;break;case Overlay.TOP_RIGHT:alignX=h-element.offsetWidth;alignY=v;break;case Overlay.BOTTOM_LEFT:alignX=h;alignY=v-element.offsetHeight;break;case Overlay.BOTTOM_RIGHT:alignX=h-element.offsetWidth;alignY=v-element.offsetHeight;break}if(alignX!==null&&alignY!==null){if(xyOffset){alignX+=xyOffset[0];alignY+=xyOffset[1]}me.moveTo(alignX,alignY)}}if(contextArgs){context=contextArgs[0];element=this.element;me=this;if(!elementAlign){elementAlign=contextArgs[1]}if(!contextAlign){contextAlign=contextArgs[2]}if(!xyOffset&&contextArgs[4]){xyOffset=contextArgs[4]}if(element&&context){contextRegion=Dom.getRegion(context);switch(contextAlign){case Overlay.TOP_LEFT:doAlign(contextRegion.top,contextRegion.left);break;case Overlay.TOP_RIGHT:doAlign(contextRegion.top,contextRegion.right);break;case Overlay.BOTTOM_LEFT:doAlign(contextRegion.bottom,contextRegion.left);break;case Overlay.BOTTOM_RIGHT:doAlign(contextRegion.bottom,contextRegion.right);break}}}},enforceConstraints:function(type,args,obj){var pos=args[0];var cXY=this.getConstrainedXY(pos[0],pos[1]);this.cfg.setProperty("x",cXY[0],true);this.cfg.setProperty("y",cXY[1],true);this.cfg.setProperty("xy",cXY,true)},_getConstrainedPos:function(pos,val){var overlayEl=this.element,buffer=Overlay.VIEWPORT_OFFSET,x=(pos=="x"),overlaySize=(x)?overlayEl.offsetWidth:overlayEl.offsetHeight,viewportSize=(x)?Dom.getViewportWidth():Dom.getViewportHeight(),docScroll=(x)?Dom.getDocumentScrollLeft():Dom.getDocumentScrollTop(),overlapPositions=(x)?Overlay.PREVENT_OVERLAP_X:Overlay.PREVENT_OVERLAP_Y,context=this.cfg.getProperty("context"),bOverlayFitsInViewport=(overlaySize+buffer<viewportSize),bPreventContextOverlap=this.cfg.getProperty("preventcontextoverlap")&&context&&overlapPositions[(context[1]+context[2])],minConstraint=docScroll+buffer,maxConstraint=docScroll+viewportSize-overlaySize-buffer,constrainedVal=val;if(val<minConstraint||val>maxConstraint){if(bPreventContextOverlap){constrainedVal=this._preventOverlap(pos,context[0],overlaySize,viewportSize,docScroll)}else{if(bOverlayFitsInViewport){if(val<minConstraint){constrainedVal=minConstraint}else if(val>maxConstraint){constrainedVal=maxConstraint}}else{constrainedVal=minConstraint}}}return constrainedVal},_preventOverlap:function(pos,contextEl,overlaySize,viewportSize,docScroll){var x=(pos=="x"),buffer=Overlay.VIEWPORT_OFFSET,overlay=this,contextElPos=((x)?Dom.getX(contextEl):Dom.getY(contextEl))-docScroll,contextElSize=(x)?contextEl.offsetWidth:contextEl.offsetHeight,minRegionSize=contextElPos-buffer,maxRegionSize=(viewportSize-(contextElPos+contextElSize))-buffer,bFlipped=false,flip=function(){var flippedVal;if((overlay.cfg.getProperty(pos)-docScroll)>contextElPos){flippedVal=(contextElPos-overlaySize)}else{flippedVal=(contextElPos+contextElSize)}overlay.cfg.setProperty(pos,(flippedVal+docScroll),true);return flippedVal},setPosition=function(){var displayRegionSize=((overlay.cfg.getProperty(pos)-docScroll)>contextElPos)?maxRegionSize:minRegionSize,position;if(overlaySize>displayRegionSize){if(bFlipped){flip()}else{flip();bFlipped=true;position=setPosition()}}return position};setPosition();return this.cfg.getProperty(pos)},getConstrainedX:function(x){return this._getConstrainedPos("x",x)},getConstrainedY:function(y){return this._getConstrainedPos("y",y)},getConstrainedXY:function(x,y){return[this.getConstrainedX(x),this.getConstrainedY(y)]},center:function(){var nViewportOffset=Overlay.VIEWPORT_OFFSET,elementWidth=this.element.offsetWidth,elementHeight=this.element.offsetHeight,viewPortWidth=Dom.getViewportWidth(),viewPortHeight=Dom.getViewportHeight(),x,y;if(elementWidth<viewPortWidth){x=(viewPortWidth/2)-(elementWidth/2)+Dom.getDocumentScrollLeft()}else{x=nViewportOffset+Dom.getDocumentScrollLeft()}if(elementHeight<viewPortHeight){y=(viewPortHeight/2)-(elementHeight/2)+Dom.getDocumentScrollTop()}else{y=nViewportOffset+Dom.getDocumentScrollTop()}this.cfg.setProperty("xy",[parseInt(x,10),parseInt(y,10)]);this.cfg.refireEvent("iframe");if(UA.webkit){this.forceContainerRedraw()}},syncPosition:function(){var pos=Dom.getXY(this.element);this.cfg.setProperty("x",pos[0],true);this.cfg.setProperty("y",pos[1],true);this.cfg.setProperty("xy",pos,true)},onDomResize:function(e,obj){var me=this;Overlay.superclass.onDomResize.call(this,e,obj);setTimeout(function(){me.syncPosition();me.cfg.refireEvent("iframe");me.cfg.refireEvent("context")},0)},_getComputedHeight:(function(){if(document.defaultView&&document.defaultView.getComputedStyle){return function(el){var height=null;if(el.ownerDocument&&el.ownerDocument.defaultView){var computed=el.ownerDocument.defaultView.getComputedStyle(el,'');if(computed){height=parseInt(computed.height,10)}}return(Lang.isNumber(height))?height:null}}else{return function(el){var height=null;if(el.style.pixelHeight){height=el.style.pixelHeight}return(Lang.isNumber(height))?height:null}}})(),_validateAutoFillHeight:function(val){return(!val)||(Lang.isString(val)&&Overlay.STD_MOD_RE.test(val))},_autoFillOnHeightChange:function(type,args,el){var height=this.cfg.getProperty("height");if((height&&height!=="auto")||(height===0)){this.fillHeight(el)}},_getPreciseHeight:function(el){var height=el.offsetHeight;if(el.getBoundingClientRect){var rect=el.getBoundingClientRect();height=rect.bottom-rect.top}return height},fillHeight:function(el){if(el){var container=this.innerElement||this.element,containerEls=[this.header,this.body,this.footer],containerEl,total=0,filled=0,remaining=0,validEl=false;for(var i=0,l=containerEls.length;i<l;i++){containerEl=containerEls[i];if(containerEl){if(el!==containerEl){filled+=this._getPreciseHeight(containerEl)}else{validEl=true}}}if(validEl){if(UA.ie||UA.opera){Dom.setStyle(el,'height',0+'px')}total=this._getComputedHeight(container);if(total===null){Dom.addClass(container,"yui-override-padding");total=container.clientHeight;Dom.removeClass(container,"yui-override-padding")}remaining=Math.max(total-filled,0);Dom.setStyle(el,"height",remaining+"px");if(el.offsetHeight!=remaining){remaining=Math.max(remaining-(el.offsetHeight-remaining),0)}Dom.setStyle(el,"height",remaining+"px")}}},bringToTop:function(){var aOverlays=[],oElement=this.element;function compareZIndexDesc(p_oOverlay1,p_oOverlay2){var sZIndex1=Dom.getStyle(p_oOverlay1,"zIndex"),sZIndex2=Dom.getStyle(p_oOverlay2,"zIndex"),nZIndex1=(!sZIndex1||isNaN(sZIndex1))?0:parseInt(sZIndex1,10),nZIndex2=(!sZIndex2||isNaN(sZIndex2))?0:parseInt(sZIndex2,10);if(nZIndex1>nZIndex2){return-1}else if(nZIndex1<nZIndex2){return 1}else{return 0}}function isOverlayElement(p_oElement){var isOverlay=Dom.hasClass(p_oElement,Overlay.CSS_OVERLAY),Panel=YAHOO.widget.Panel;if(isOverlay&&!Dom.isAncestor(oElement,p_oElement)){if(Panel&&Dom.hasClass(p_oElement,Panel.CSS_PANEL)){aOverlays[aOverlays.length]=p_oElement.parentNode}else{aOverlays[aOverlays.length]=p_oElement}}}Dom.getElementsBy(isOverlayElement,"div",document.body);aOverlays.sort(compareZIndexDesc);var oTopOverlay=aOverlays[0],nTopZIndex;if(oTopOverlay){nTopZIndex=Dom.getStyle(oTopOverlay,"zIndex");if(!isNaN(nTopZIndex)){var bRequiresBump=false;if(oTopOverlay!=oElement){bRequiresBump=true}else if(aOverlays.length>1){var nNextZIndex=Dom.getStyle(aOverlays[1],"zIndex");if(!isNaN(nNextZIndex)&&(nTopZIndex==nNextZIndex)){bRequiresBump=true}}if(bRequiresBump){this.cfg.setProperty("zindex",(parseInt(nTopZIndex,10)+2))}}}},destroy:function(shallowPurge){if(this.iframe){this.iframe.parentNode.removeChild(this.iframe)}this.iframe=null;Overlay.windowResizeEvent.unsubscribe(this.doCenterOnDOMEvent,this);Overlay.windowScrollEvent.unsubscribe(this.doCenterOnDOMEvent,this);Module.textResizeEvent.unsubscribe(this._autoFillOnHeightChange);if(this._contextTriggers){this._processTriggers(this._contextTriggers,_UNSUBSCRIBE,this._alignOnTrigger)}Overlay.superclass.destroy.call(this,shallowPurge)},forceContainerRedraw:function(){var c=this;Dom.addClass(c.element,"yui-force-redraw");setTimeout(function(){Dom.removeClass(c.element,"yui-force-redraw")},0)},toString:function(){return"Overlay "+this.id}})}());(function(){YAHOO.widget.OverlayManager=function(userConfig){this.init(userConfig)};var Overlay=YAHOO.widget.Overlay,Event=YAHOO.util.Event,Dom=YAHOO.util.Dom,Config=YAHOO.util.Config,CustomEvent=YAHOO.util.CustomEvent,OverlayManager=YAHOO.widget.OverlayManager;OverlayManager.CSS_FOCUSED="focused";OverlayManager.prototype={constructor:OverlayManager,overlays:null,initDefaultConfig:function(){this.cfg.addProperty("overlays",{suppressEvent:true});this.cfg.addProperty("focusevent",{value:"mousedown"})},init:function(userConfig){this.cfg=new Config(this);this.initDefaultConfig();if(userConfig){this.cfg.applyConfig(userConfig,true)}this.cfg.fireQueue();var activeOverlay=null;this.getActive=function(){return activeOverlay};this.focus=function(overlay){var o=this.find(overlay);if(o){o.focus()}};this.remove=function(overlay){var o=this.find(overlay),originalZ;if(o){if(activeOverlay==o){activeOverlay=null}var bDestroyed=(o.element===null&&o.cfg===null)?true:false;if(!bDestroyed){originalZ=Dom.getStyle(o.element,"zIndex");o.cfg.setProperty("zIndex",-1000,true)}this.overlays.sort(this.compareZIndexDesc);this.overlays=this.overlays.slice(0,(this.overlays.length-1));o.hideEvent.unsubscribe(o.blur);o.destroyEvent.unsubscribe(this._onOverlayDestroy,o);o.focusEvent.unsubscribe(this._onOverlayFocusHandler,o);o.blurEvent.unsubscribe(this._onOverlayBlurHandler,o);if(!bDestroyed){Event.removeListener(o.element,this.cfg.getProperty("focusevent"),this._onOverlayElementFocus);o.cfg.setProperty("zIndex",originalZ,true);o.cfg.setProperty("manager",null)}if(o.focusEvent._managed){o.focusEvent=null}if(o.blurEvent._managed){o.blurEvent=null}if(o.focus._managed){o.focus=null}if(o.blur._managed){o.blur=null}}};this.blurAll=function(){var nOverlays=this.overlays.length,i;if(nOverlays>0){i=nOverlays-1;do{this.overlays[i].blur()}while(i--)}};this._manageBlur=function(overlay){var changed=false;if(activeOverlay==overlay){Dom.removeClass(activeOverlay.element,OverlayManager.CSS_FOCUSED);activeOverlay=null;changed=true}return changed};this._manageFocus=function(overlay){var changed=false;if(activeOverlay!=overlay){if(activeOverlay){activeOverlay.blur()}activeOverlay=overlay;this.bringToTop(activeOverlay);Dom.addClass(activeOverlay.element,OverlayManager.CSS_FOCUSED);changed=true}return changed};var overlays=this.cfg.getProperty("overlays");if(!this.overlays){this.overlays=[]}if(overlays){this.register(overlays);this.overlays.sort(this.compareZIndexDesc)}},_onOverlayElementFocus:function(p_oEvent){var oTarget=Event.getTarget(p_oEvent),oClose=this.close;if(oClose&&(oTarget==oClose||Dom.isAncestor(oClose,oTarget))){this.blur()}else{this.focus()}},_onOverlayDestroy:function(p_sType,p_aArgs,p_oOverlay){this.remove(p_oOverlay)},_onOverlayFocusHandler:function(p_sType,p_aArgs,p_oOverlay){this._manageFocus(p_oOverlay)},_onOverlayBlurHandler:function(p_sType,p_aArgs,p_oOverlay){this._manageBlur(p_oOverlay)},_bindFocus:function(overlay){var mgr=this;if(!overlay.focusEvent){overlay.focusEvent=overlay.createEvent("focus");overlay.focusEvent.signature=CustomEvent.LIST;overlay.focusEvent._managed=true}else{overlay.focusEvent.subscribe(mgr._onOverlayFocusHandler,overlay,mgr)}if(!overlay.focus){Event.on(overlay.element,mgr.cfg.getProperty("focusevent"),mgr._onOverlayElementFocus,null,overlay);overlay.focus=function(){if(mgr._manageFocus(this)){if(this.cfg.getProperty("visible")&&this.focusFirst){this.focusFirst()}this.focusEvent.fire()}};overlay.focus._managed=true}},_bindBlur:function(overlay){var mgr=this;if(!overlay.blurEvent){overlay.blurEvent=overlay.createEvent("blur");overlay.blurEvent.signature=CustomEvent.LIST;overlay.focusEvent._managed=true}else{overlay.blurEvent.subscribe(mgr._onOverlayBlurHandler,overlay,mgr)}if(!overlay.blur){overlay.blur=function(){if(mgr._manageBlur(this)){this.blurEvent.fire()}};overlay.blur._managed=true}overlay.hideEvent.subscribe(overlay.blur)},_bindDestroy:function(overlay){var mgr=this;overlay.destroyEvent.subscribe(mgr._onOverlayDestroy,overlay,mgr)},_syncZIndex:function(overlay){var zIndex=Dom.getStyle(overlay.element,"zIndex");if(!isNaN(zIndex)){overlay.cfg.setProperty("zIndex",parseInt(zIndex,10))}else{overlay.cfg.setProperty("zIndex",0)}},register:function(overlay){var registered=false,i,n;if(overlay instanceof Overlay){overlay.cfg.addProperty("manager",{value:this});this._bindFocus(overlay);this._bindBlur(overlay);this._bindDestroy(overlay);this._syncZIndex(overlay);this.overlays.push(overlay);this.bringToTop(overlay);registered=true}else if(overlay instanceof Array){for(i=0,n=overlay.length;i<n;i++){registered=this.register(overlay[i])||registered}}return registered},bringToTop:function(p_oOverlay){var oOverlay=this.find(p_oOverlay),nTopZIndex,oTopOverlay,aOverlays;if(oOverlay){aOverlays=this.overlays;aOverlays.sort(this.compareZIndexDesc);oTopOverlay=aOverlays[0];if(oTopOverlay){nTopZIndex=Dom.getStyle(oTopOverlay.element,"zIndex");if(!isNaN(nTopZIndex)){var bRequiresBump=false;if(oTopOverlay!==oOverlay){bRequiresBump=true}else if(aOverlays.length>1){var nNextZIndex=Dom.getStyle(aOverlays[1].element,"zIndex");if(!isNaN(nNextZIndex)&&(nTopZIndex==nNextZIndex)){bRequiresBump=true}}if(bRequiresBump){oOverlay.cfg.setProperty("zindex",(parseInt(nTopZIndex,10)+2))}}aOverlays.sort(this.compareZIndexDesc)}}},find:function(overlay){var isInstance=overlay instanceof Overlay,overlays=this.overlays,n=overlays.length,found=null,o,i;if(isInstance||typeof overlay=="string"){for(i=n-1;i>=0;i--){o=overlays[i];if((isInstance&&(o===overlay))||(o.id==overlay)){found=o;break}}}return found},compareZIndexDesc:function(o1,o2){var zIndex1=(o1.cfg)?o1.cfg.getProperty("zIndex"):null,zIndex2=(o2.cfg)?o2.cfg.getProperty("zIndex"):null;if(zIndex1===null&&zIndex2===null){return 0}else if(zIndex1===null){return 1}else if(zIndex2===null){return-1}else if(zIndex1>zIndex2){return-1}else if(zIndex1<zIndex2){return 1}else{return 0}},showAll:function(){var overlays=this.overlays,n=overlays.length,i;for(i=n-1;i>=0;i--){overlays[i].show()}},hideAll:function(){var overlays=this.overlays,n=overlays.length,i;for(i=n-1;i>=0;i--){overlays[i].hide()}},toString:function(){return"OverlayManager"}}}());(function(){YAHOO.widget.ContainerEffect=function(overlay,attrIn,attrOut,targetElement,animClass){if(!animClass){animClass=YAHOO.util.Anim}this.overlay=overlay;this.attrIn=attrIn;this.attrOut=attrOut;this.targetElement=targetElement||overlay.element;this.animClass=animClass};var Dom=YAHOO.util.Dom,CustomEvent=YAHOO.util.CustomEvent,ContainerEffect=YAHOO.widget.ContainerEffect;ContainerEffect.FADE=function(overlay,dur){var Easing=YAHOO.util.Easing,fin={attributes:{opacity:{from:0,to:1}},duration:dur,method:Easing.easeIn},fout={attributes:{opacity:{to:0}},duration:dur,method:Easing.easeOut},fade=new ContainerEffect(overlay,fin,fout,overlay.element);fade.handleUnderlayStart=function(){var underlay=this.overlay.underlay;if(underlay&&YAHOO.env.ua.ie){var hasFilters=(underlay.filters&&underlay.filters.length>0);if(hasFilters){Dom.addClass(overlay.element,"yui-effect-fade")}}};fade.handleUnderlayComplete=function(){var underlay=this.overlay.underlay;if(underlay&&YAHOO.env.ua.ie){Dom.removeClass(overlay.element,"yui-effect-fade")}};fade.handleStartAnimateIn=function(type,args,obj){obj.overlay._fadingIn=true;Dom.addClass(obj.overlay.element,"hide-select");if(!obj.overlay.underlay){obj.overlay.cfg.refireEvent("underlay")}obj.handleUnderlayStart();obj.overlay._setDomVisibility(true);Dom.setStyle(obj.overlay.element,"opacity",0)};fade.handleCompleteAnimateIn=function(type,args,obj){obj.overlay._fadingIn=false;Dom.removeClass(obj.overlay.element,"hide-select");if(obj.overlay.element.style.filter){obj.overlay.element.style.filter=null}obj.handleUnderlayComplete();obj.overlay.cfg.refireEvent("iframe");obj.animateInCompleteEvent.fire()};fade.handleStartAnimateOut=function(type,args,obj){obj.overlay._fadingOut=true;Dom.addClass(obj.overlay.element,"hide-select");obj.handleUnderlayStart()};fade.handleCompleteAnimateOut=function(type,args,obj){obj.overlay._fadingOut=false;Dom.removeClass(obj.overlay.element,"hide-select");if(obj.overlay.element.style.filter){obj.overlay.element.style.filter=null}obj.overlay._setDomVisibility(false);Dom.setStyle(obj.overlay.element,"opacity",1);obj.handleUnderlayComplete();obj.overlay.cfg.refireEvent("iframe");obj.animateOutCompleteEvent.fire()};fade.init();return fade};ContainerEffect.SLIDE=function(overlay,dur){var Easing=YAHOO.util.Easing,x=overlay.cfg.getProperty("x")||Dom.getX(overlay.element),y=overlay.cfg.getProperty("y")||Dom.getY(overlay.element),clientWidth=Dom.getClientWidth(),offsetWidth=overlay.element.offsetWidth,sin={attributes:{points:{to:[x,y]}},duration:dur,method:Easing.easeIn},sout={attributes:{points:{to:[(clientWidth+25),y]}},duration:dur,method:Easing.easeOut},slide=new ContainerEffect(overlay,sin,sout,overlay.element,YAHOO.util.Motion);slide.handleStartAnimateIn=function(type,args,obj){obj.overlay.element.style.left=((-25)-offsetWidth)+"px";obj.overlay.element.style.top=y+"px"};slide.handleTweenAnimateIn=function(type,args,obj){var pos=Dom.getXY(obj.overlay.element),currentX=pos[0],currentY=pos[1];if(Dom.getStyle(obj.overlay.element,"visibility")=="hidden"&&currentX<x){obj.overlay._setDomVisibility(true)}obj.overlay.cfg.setProperty("xy",[currentX,currentY],true);obj.overlay.cfg.refireEvent("iframe")};slide.handleCompleteAnimateIn=function(type,args,obj){obj.overlay.cfg.setProperty("xy",[x,y],true);obj.startX=x;obj.startY=y;obj.overlay.cfg.refireEvent("iframe");obj.animateInCompleteEvent.fire()};slide.handleStartAnimateOut=function(type,args,obj){var vw=Dom.getViewportWidth(),pos=Dom.getXY(obj.overlay.element),yso=pos[1];obj.animOut.attributes.points.to=[(vw+25),yso]};slide.handleTweenAnimateOut=function(type,args,obj){var pos=Dom.getXY(obj.overlay.element),xto=pos[0],yto=pos[1];obj.overlay.cfg.setProperty("xy",[xto,yto],true);obj.overlay.cfg.refireEvent("iframe")};slide.handleCompleteAnimateOut=function(type,args,obj){obj.overlay._setDomVisibility(false);obj.overlay.cfg.setProperty("xy",[x,y]);obj.animateOutCompleteEvent.fire()};slide.init();return slide};ContainerEffect.prototype={init:function(){this.beforeAnimateInEvent=this.createEvent("beforeAnimateIn");this.beforeAnimateInEvent.signature=CustomEvent.LIST;this.beforeAnimateOutEvent=this.createEvent("beforeAnimateOut");this.beforeAnimateOutEvent.signature=CustomEvent.LIST;this.animateInCompleteEvent=this.createEvent("animateInComplete");this.animateInCompleteEvent.signature=CustomEvent.LIST;this.animateOutCompleteEvent=this.createEvent("animateOutComplete");this.animateOutCompleteEvent.signature=CustomEvent.LIST;this.animIn=new this.animClass(this.targetElement,this.attrIn.attributes,this.attrIn.duration,this.attrIn.method);this.animIn.onStart.subscribe(this.handleStartAnimateIn,this);this.animIn.onTween.subscribe(this.handleTweenAnimateIn,this);this.animIn.onComplete.subscribe(this.handleCompleteAnimateIn,this);this.animOut=new this.animClass(this.targetElement,this.attrOut.attributes,this.attrOut.duration,this.attrOut.method);this.animOut.onStart.subscribe(this.handleStartAnimateOut,this);this.animOut.onTween.subscribe(this.handleTweenAnimateOut,this);this.animOut.onComplete.subscribe(this.handleCompleteAnimateOut,this)},animateIn:function(){this._stopAnims(this.lastFrameOnStop);this.beforeAnimateInEvent.fire();this.animIn.animate()},animateOut:function(){this._stopAnims(this.lastFrameOnStop);this.beforeAnimateOutEvent.fire();this.animOut.animate()},lastFrameOnStop:true,_stopAnims:function(finish){if(this.animOut&&this.animOut.isAnimated()){this.animOut.stop(finish)}if(this.animIn&&this.animIn.isAnimated()){this.animIn.stop(finish)}},handleStartAnimateIn:function(type,args,obj){},handleTweenAnimateIn:function(type,args,obj){},handleCompleteAnimateIn:function(type,args,obj){},handleStartAnimateOut:function(type,args,obj){},handleTweenAnimateOut:function(type,args,obj){},handleCompleteAnimateOut:function(type,args,obj){},toString:function(){var output="ContainerEffect";if(this.overlay){output+=" ["+this.overlay.toString()+"]"}return output}};YAHOO.lang.augmentProto(ContainerEffect,YAHOO.util.EventProvider)})();YAHOO.register("containercore",YAHOO.widget.Module,{version:"2.9.0",build:"2800"});
//
//../pacotes/yui290/build/menu/menu-min.js
/*
Copyright (c) 2011, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 2.9.0
*/
(function(){var K=YAHOO.env.ua,C=YAHOO.util.Dom,Z=YAHOO.util.Event,H=YAHOO.lang,T="DIV",P="hd",M="bd",O="ft",X="LI",A="disabled",D="mouseover",F="mouseout",U="mousedown",G="mouseup",V="click",B="keydown",N="keyup",I="keypress",L="clicktohide",S="position",Q="dynamic",Y="showdelay",J="selected",E="visible",W="UL",R="MenuManager";YAHOO.widget.MenuManager=function(){var l=false,d={},o={},h={},c={"click":"clickEvent","mousedown":"mouseDownEvent","mouseup":"mouseUpEvent","mouseover":"mouseOverEvent","mouseout":"mouseOutEvent","keydown":"keyDownEvent","keyup":"keyUpEvent","keypress":"keyPressEvent","focus":"focusEvent","focusin":"focusEvent","blur":"blurEvent","focusout":"blurEvent"},i=null;function b(r){var p,q;if(r&&r.tagName){switch(r.tagName.toUpperCase()){case T:p=r.parentNode;if((C.hasClass(r,P)||C.hasClass(r,M)||C.hasClass(r,O))&&p&&p.tagName&&p.tagName.toUpperCase()==T){q=p;}else{q=r;}break;case X:q=r;break;default:p=r.parentNode;if(p){q=b(p);}break;}}return q;}function e(t){var p=Z.getTarget(t),q=b(p),u=true,w=t.type,x,r,s,z,y;if(q){r=q.tagName.toUpperCase();if(r==X){s=q.id;if(s&&h[s]){z=h[s];y=z.parent;}}else{if(r==T){if(q.id){y=d[q.id];}}}}if(y){x=c[w];if(w=="click"&&(K.gecko&&y.platform!="mac")&&t.button>0){u=false;}if(u&&z&&!z.cfg.getProperty(A)){z[x].fire(t);}if(u){y[x].fire(t,z);}}else{if(w==U){for(var v in o){if(H.hasOwnProperty(o,v)){y=o[v];if(y.cfg.getProperty(L)&&!(y instanceof YAHOO.widget.MenuBar)&&y.cfg.getProperty(S)==Q){y.hide();if(K.ie&&p.focus&&(K.ie<9)){p.setActive();}}else{if(y.cfg.getProperty(Y)>0){y._cancelShowDelay();}if(y.activeItem){y.activeItem.blur();y.activeItem.cfg.setProperty(J,false);y.activeItem=null;}}}}}}}function n(q,p,r){if(d[r.id]){this.removeMenu(r);}}function k(q,p){var r=p[1];if(r){i=r;}}function f(q,p){i=null;}function a(r,q){var p=q[0],s=this.id;if(p){o[s]=this;}else{if(o[s]){delete o[s];}}}function j(q,p){m(this);}function m(q){var p=q.id;if(p&&h[p]){if(i==q){i=null;}delete h[p];q.destroyEvent.unsubscribe(j);}}function g(q,p){var s=p[0],r;if(s instanceof YAHOO.widget.MenuItem){r=s.id;if(!h[r]){h[r]=s;s.destroyEvent.subscribe(j);}}}return{addMenu:function(q){var p;if(q instanceof YAHOO.widget.Menu&&q.id&&!d[q.id]){d[q.id]=q;if(!l){p=document;Z.on(p,D,e,this,true);Z.on(p,F,e,this,true);Z.on(p,U,e,this,true);Z.on(p,G,e,this,true);Z.on(p,V,e,this,true);Z.on(p,B,e,this,true);Z.on(p,N,e,this,true);Z.on(p,I,e,this,true);Z.onFocus(p,e,this,true);Z.onBlur(p,e,this,true);l=true;}q.cfg.subscribeToConfigEvent(E,a);q.destroyEvent.subscribe(n,q,this);q.itemAddedEvent.subscribe(g);q.focusEvent.subscribe(k);q.blurEvent.subscribe(f);}},removeMenu:function(s){var q,p,r;if(s){q=s.id;if((q in d)&&(d[q]==s)){p=s.getItems();if(p&&p.length>0){r=p.length-1;do{m(p[r]);}while(r--);}delete d[q];if((q in o)&&(o[q]==s)){delete o[q];}if(s.cfg){s.cfg.unsubscribeFromConfigEvent(E,a);}s.destroyEvent.unsubscribe(n,s);s.itemAddedEvent.unsubscribe(g);s.focusEvent.unsubscribe(k);s.blurEvent.unsubscribe(f);}}},hideVisible:function(){var p;for(var q in o){if(H.hasOwnProperty(o,q)){p=o[q];if(!(p instanceof YAHOO.widget.MenuBar)&&p.cfg.getProperty(S)==Q){p.hide();}}}},getVisible:function(){return o;},getMenus:function(){return d;},getMenu:function(q){var p;if(q in d){p=d[q];}return p;},getMenuItem:function(q){var p;if(q in h){p=h[q];}return p;},getMenuItemGroup:function(t){var q=C.get(t),p,v,u,r,s;if(q&&q.tagName&&q.tagName.toUpperCase()==W){v=q.firstChild;if(v){p=[];do{r=v.id;if(r){u=this.getMenuItem(r);if(u){p[p.length]=u;}}}while((v=v.nextSibling));if(p.length>0){s=p;}}}return s;},getFocusedMenuItem:function(){return i;},getFocusedMenu:function(){var p;if(i){p=i.parent.getRoot();}return p;},toString:function(){return R;}};}();})();(function(){var AM=YAHOO.lang,Aq="Menu",G="DIV",K="div",Am="id",AH="SELECT",e="xy",R="y",Ax="UL",L="ul",AJ="first-of-type",k="LI",h="OPTGROUP",Az="OPTION",Ah="disabled",AY="none",y="selected",At="groupindex",i="index",O="submenu",Au="visible",AX="hidedelay",Ac="position",AD="dynamic",C="static",An=AD+","+C,Q="url",M="#",V="target",AU="maxheight",T="topscrollbar",x="bottomscrollbar",d="_",P=T+d+Ah,E=x+d+Ah,b="mousemove",Av="showdelay",c="submenuhidedelay",AF="iframe",w="constraintoviewport",A4="preventcontextoverlap",AO="submenualignment",Z="autosubmenudisplay",AC="clicktohide",g="container",j="scrollincrement",Aj="minscrollheight",A2="classname",Ag="shadow",Ar="keepopen",A0="hd",D="hastitle",p="context",u="",Ak="mousedown",Ae="keydown",Ao="height",U="width",AQ="px",Ay="effect",AE="monitorresize",AW="display",AV="block",J="visibility",z="absolute",AS="zindex",l="yui-menu-body-scrolled",AK="&#32;",A1=" ",Ai="mouseover",H="mouseout",AR="itemAdded",n="itemRemoved",AL="hidden",s="yui-menu-shadow",AG=s+"-visible",m=s+A1+AG;YAHOO.widget.Menu=function(A6,A5){if(A5){this.parent=A5.parent;this.lazyLoad=A5.lazyLoad||A5.lazyload;this.itemData=A5.itemData||A5.itemdata;}YAHOO.widget.Menu.superclass.constructor.call(this,A6,A5);};function B(A6){var A5=false;if(AM.isString(A6)){A5=(An.indexOf((A6.toLowerCase()))!=-1);}return A5;}var f=YAHOO.util.Dom,AA=YAHOO.util.Event,Aw=YAHOO.widget.Module,AB=YAHOO.widget.Overlay,r=YAHOO.widget.Menu,A3=YAHOO.widget.MenuManager,F=YAHOO.util.CustomEvent,As=YAHOO.env.ua,Ap,AT=false,Ad,Ab=[["mouseOverEvent",Ai],["mouseOutEvent",H],["mouseDownEvent",Ak],["mouseUpEvent","mouseup"],["clickEvent","click"],["keyPressEvent","keypress"],["keyDownEvent",Ae],["keyUpEvent","keyup"],["focusEvent","focus"],["blurEvent","blur"],["itemAddedEvent",AR],["itemRemovedEvent",n]],AZ={key:Au,value:false,validator:AM.isBoolean},AP={key:w,value:true,validator:AM.isBoolean,supercedes:[AF,"x",R,e]},AI={key:A4,value:true,validator:AM.isBoolean,supercedes:[w]},S={key:Ac,value:AD,validator:B,supercedes:[Au,AF]},A={key:AO,value:["tl","tr"]},t={key:Z,value:true,validator:AM.isBoolean,suppressEvent:true},Y={key:Av,value:250,validator:AM.isNumber,suppressEvent:true},q={key:AX,value:0,validator:AM.isNumber,suppressEvent:true},v={key:c,value:250,validator:AM.isNumber,suppressEvent:true},o={key:AC,value:true,validator:AM.isBoolean,suppressEvent:true},AN={key:g,suppressEvent:true},Af={key:j,value:1,validator:AM.isNumber,supercedes:[AU],suppressEvent:true},N={key:Aj,value:90,validator:AM.isNumber,supercedes:[AU],suppressEvent:true},X={key:AU,value:0,validator:AM.isNumber,supercedes:[AF],suppressEvent:true},W={key:A2,value:null,validator:AM.isString,suppressEvent:true},a={key:Ah,value:false,validator:AM.isBoolean,suppressEvent:true},I={key:Ag,value:true,validator:AM.isBoolean,suppressEvent:true,supercedes:[Au]},Al={key:Ar,value:false,validator:AM.isBoolean};
function Aa(A5){Ad=AA.getTarget(A5);}YAHOO.lang.extend(r,AB,{CSS_CLASS_NAME:"yuimenu",ITEM_TYPE:null,GROUP_TITLE_TAG_NAME:"h6",OFF_SCREEN_POSITION:"-999em",_useHideDelay:false,_bHandledMouseOverEvent:false,_bHandledMouseOutEvent:false,_aGroupTitleElements:null,_aItemGroups:null,_aListElements:null,_nCurrentMouseX:0,_bStopMouseEventHandlers:false,_sClassName:null,lazyLoad:false,itemData:null,activeItem:null,parent:null,srcElement:null,init:function(A7,A6){this._aItemGroups=[];this._aListElements=[];this._aGroupTitleElements=[];if(!this.ITEM_TYPE){this.ITEM_TYPE=YAHOO.widget.MenuItem;}var A5;if(AM.isString(A7)){A5=f.get(A7);}else{if(A7.tagName){A5=A7;}}if(A5&&A5.tagName){switch(A5.tagName.toUpperCase()){case G:this.srcElement=A5;if(!A5.id){A5.setAttribute(Am,f.generateId());}r.superclass.init.call(this,A5);this.beforeInitEvent.fire(r);break;case AH:this.srcElement=A5;r.superclass.init.call(this,f.generateId());this.beforeInitEvent.fire(r);break;}}else{r.superclass.init.call(this,A7);this.beforeInitEvent.fire(r);}if(this.element){f.addClass(this.element,this.CSS_CLASS_NAME);this.initEvent.subscribe(this._onInit);this.beforeRenderEvent.subscribe(this._onBeforeRender);this.renderEvent.subscribe(this._onRender);this.beforeShowEvent.subscribe(this._onBeforeShow);this.hideEvent.subscribe(this._onHide);this.showEvent.subscribe(this._onShow);this.beforeHideEvent.subscribe(this._onBeforeHide);this.mouseOverEvent.subscribe(this._onMouseOver);this.mouseOutEvent.subscribe(this._onMouseOut);this.clickEvent.subscribe(this._onClick);this.keyDownEvent.subscribe(this._onKeyDown);this.keyPressEvent.subscribe(this._onKeyPress);this.blurEvent.subscribe(this._onBlur);if(!AT){AA.onFocus(document,Aa);AT=true;}if((As.gecko&&As.gecko<1.9)||(As.webkit&&As.webkit<523)){this.cfg.subscribeToConfigEvent(R,this._onYChange);}if(A6){this.cfg.applyConfig(A6,true);}A3.addMenu(this);this.initEvent.fire(r);}},_initSubTree:function(){var A6=this.srcElement,A5,A8,BB,BC,BA,A9,A7;if(A6){A5=(A6.tagName&&A6.tagName.toUpperCase());if(A5==G){BC=this.body.firstChild;if(BC){A8=0;BB=this.GROUP_TITLE_TAG_NAME.toUpperCase();do{if(BC&&BC.tagName){switch(BC.tagName.toUpperCase()){case BB:this._aGroupTitleElements[A8]=BC;break;case Ax:this._aListElements[A8]=BC;this._aItemGroups[A8]=[];A8++;break;}}}while((BC=BC.nextSibling));if(this._aListElements[0]){f.addClass(this._aListElements[0],AJ);}}}BC=null;if(A5){switch(A5){case G:BA=this._aListElements;A9=BA.length;if(A9>0){A7=A9-1;do{BC=BA[A7].firstChild;if(BC){do{if(BC&&BC.tagName&&BC.tagName.toUpperCase()==k){this.addItem(new this.ITEM_TYPE(BC,{parent:this}),A7);}}while((BC=BC.nextSibling));}}while(A7--);}break;case AH:BC=A6.firstChild;do{if(BC&&BC.tagName){switch(BC.tagName.toUpperCase()){case h:case Az:this.addItem(new this.ITEM_TYPE(BC,{parent:this}));break;}}}while((BC=BC.nextSibling));break;}}}},_getFirstEnabledItem:function(){var A5=this.getItems(),A9=A5.length,A8,A7;for(var A6=0;A6<A9;A6++){A8=A5[A6];if(A8&&!A8.cfg.getProperty(Ah)&&A8.element.style.display!=AY){A7=A8;break;}}return A7;},_addItemToGroup:function(BA,BB,BF){var BD,BG,A8,BE,A9,A6,A7,BC;function A5(BH,BI){return(BH[BI]||A5(BH,(BI+1)));}if(BB instanceof this.ITEM_TYPE){BD=BB;BD.parent=this;}else{if(AM.isString(BB)){BD=new this.ITEM_TYPE(BB,{parent:this});}else{if(AM.isObject(BB)){BB.parent=this;BD=new this.ITEM_TYPE(BB.text,BB);}}}if(BD){if(BD.cfg.getProperty(y)){this.activeItem=BD;}BG=AM.isNumber(BA)?BA:0;A8=this._getItemGroup(BG);if(!A8){A8=this._createItemGroup(BG);}if(AM.isNumber(BF)){A9=(BF>=A8.length);if(A8[BF]){A8.splice(BF,0,BD);}else{A8[BF]=BD;}BE=A8[BF];if(BE){if(A9&&(!BE.element.parentNode||BE.element.parentNode.nodeType==11)){this._aListElements[BG].appendChild(BE.element);}else{A6=A5(A8,(BF+1));if(A6&&(!BE.element.parentNode||BE.element.parentNode.nodeType==11)){this._aListElements[BG].insertBefore(BE.element,A6.element);}}BE.parent=this;this._subscribeToItemEvents(BE);this._configureSubmenu(BE);this._updateItemProperties(BG);this.itemAddedEvent.fire(BE);this.changeContentEvent.fire();BC=BE;}}else{A7=A8.length;A8[A7]=BD;BE=A8[A7];if(BE){if(!f.isAncestor(this._aListElements[BG],BE.element)){this._aListElements[BG].appendChild(BE.element);}BE.element.setAttribute(At,BG);BE.element.setAttribute(i,A7);BE.parent=this;BE.index=A7;BE.groupIndex=BG;this._subscribeToItemEvents(BE);this._configureSubmenu(BE);if(A7===0){f.addClass(BE.element,AJ);}this.itemAddedEvent.fire(BE);this.changeContentEvent.fire();BC=BE;}}}return BC;},_removeItemFromGroupByIndex:function(A8,A6){var A7=AM.isNumber(A8)?A8:0,A9=this._getItemGroup(A7),BB,BA,A5;if(A9){BB=A9.splice(A6,1);BA=BB[0];if(BA){this._updateItemProperties(A7);if(A9.length===0){A5=this._aListElements[A7];if(A5&&A5.parentNode){A5.parentNode.removeChild(A5);}this._aItemGroups.splice(A7,1);this._aListElements.splice(A7,1);A5=this._aListElements[0];if(A5){f.addClass(A5,AJ);}}this.itemRemovedEvent.fire(BA);this.changeContentEvent.fire();}}return BA;},_removeItemFromGroupByValue:function(A8,A5){var BA=this._getItemGroup(A8),BB,A9,A7,A6;if(BA){BB=BA.length;A9=-1;if(BB>0){A6=BB-1;do{if(BA[A6]==A5){A9=A6;break;}}while(A6--);if(A9>-1){A7=this._removeItemFromGroupByIndex(A8,A9);}}}return A7;},_updateItemProperties:function(A6){var A7=this._getItemGroup(A6),BA=A7.length,A9,A8,A5;if(BA>0){A5=BA-1;do{A9=A7[A5];if(A9){A8=A9.element;A9.index=A5;A9.groupIndex=A6;A8.setAttribute(At,A6);A8.setAttribute(i,A5);f.removeClass(A8,AJ);}}while(A5--);if(A8){f.addClass(A8,AJ);}}},_createItemGroup:function(A7){var A5,A6;if(!this._aItemGroups[A7]){this._aItemGroups[A7]=[];A5=document.createElement(L);this._aListElements[A7]=A5;A6=this._aItemGroups[A7];}return A6;},_getItemGroup:function(A7){var A5=AM.isNumber(A7)?A7:0,A8=this._aItemGroups,A6;if(A5 in A8){A6=A8[A5];}return A6;},_configureSubmenu:function(A5){var A6=A5.cfg.getProperty(O);if(A6){this.cfg.configChangedEvent.subscribe(this._onParentMenuConfigChange,A6,true);this.renderEvent.subscribe(this._onParentMenuRender,A6,true);}},_subscribeToItemEvents:function(A5){A5.destroyEvent.subscribe(this._onMenuItemDestroy,A5,this);
A5.cfg.configChangedEvent.subscribe(this._onMenuItemConfigChange,A5,this);},_onVisibleChange:function(A7,A6){var A5=A6[0];if(A5){f.addClass(this.element,Au);}else{f.removeClass(this.element,Au);}},_cancelHideDelay:function(){var A5=this.getRoot()._hideDelayTimer;if(A5){A5.cancel();}},_execHideDelay:function(){this._cancelHideDelay();var A5=this.getRoot();A5._hideDelayTimer=AM.later(A5.cfg.getProperty(AX),this,function(){if(A5.activeItem){if(A5.hasFocus()){A5.activeItem.focus();}A5.clearActiveItem();}if(A5==this&&!(this instanceof YAHOO.widget.MenuBar)&&this.cfg.getProperty(Ac)==AD){this.hide();}});},_cancelShowDelay:function(){var A5=this.getRoot()._showDelayTimer;if(A5){A5.cancel();}},_execSubmenuHideDelay:function(A7,A6,A5){A7._submenuHideDelayTimer=AM.later(50,this,function(){if(this._nCurrentMouseX>(A6+10)){A7._submenuHideDelayTimer=AM.later(A5,A7,function(){this.hide();});}else{A7.hide();}});},_disableScrollHeader:function(){if(!this._bHeaderDisabled){f.addClass(this.header,P);this._bHeaderDisabled=true;}},_disableScrollFooter:function(){if(!this._bFooterDisabled){f.addClass(this.footer,E);this._bFooterDisabled=true;}},_enableScrollHeader:function(){if(this._bHeaderDisabled){f.removeClass(this.header,P);this._bHeaderDisabled=false;}},_enableScrollFooter:function(){if(this._bFooterDisabled){f.removeClass(this.footer,E);this._bFooterDisabled=false;}},_onMouseOver:function(BH,BA){var BI=BA[0],BE=BA[1],A5=AA.getTarget(BI),A9=this.getRoot(),BG=this._submenuHideDelayTimer,A6,A8,BD,A7,BC,BB;var BF=function(){if(this.parent.cfg.getProperty(y)){this.show();}};if(!this._bStopMouseEventHandlers){if(!this._bHandledMouseOverEvent&&(A5==this.element||f.isAncestor(this.element,A5))){if(this._useHideDelay){this._cancelHideDelay();}this._nCurrentMouseX=0;AA.on(this.element,b,this._onMouseMove,this,true);if(!(BE&&f.isAncestor(BE.element,AA.getRelatedTarget(BI)))){this.clearActiveItem();}if(this.parent&&BG){BG.cancel();this.parent.cfg.setProperty(y,true);A6=this.parent.parent;A6._bHandledMouseOutEvent=true;A6._bHandledMouseOverEvent=false;}this._bHandledMouseOverEvent=true;this._bHandledMouseOutEvent=false;}if(BE&&!BE.handledMouseOverEvent&&!BE.cfg.getProperty(Ah)&&(A5==BE.element||f.isAncestor(BE.element,A5))){A8=this.cfg.getProperty(Av);BD=(A8>0);if(BD){this._cancelShowDelay();}A7=this.activeItem;if(A7){A7.cfg.setProperty(y,false);}BC=BE.cfg;BC.setProperty(y,true);if(this.hasFocus()||A9._hasFocus){BE.focus();A9._hasFocus=false;}if(this.cfg.getProperty(Z)){BB=BC.getProperty(O);if(BB){if(BD){A9._showDelayTimer=AM.later(A9.cfg.getProperty(Av),BB,BF);}else{BB.show();}}}BE.handledMouseOverEvent=true;BE.handledMouseOutEvent=false;}}},_onMouseOut:function(BD,A7){var BE=A7[0],BB=A7[1],A8=AA.getRelatedTarget(BE),BC=false,BA,A9,A5,A6;if(!this._bStopMouseEventHandlers){if(BB&&!BB.cfg.getProperty(Ah)){BA=BB.cfg;A9=BA.getProperty(O);if(A9&&(A8==A9.element||f.isAncestor(A9.element,A8))){BC=true;}if(!BB.handledMouseOutEvent&&((A8!=BB.element&&!f.isAncestor(BB.element,A8))||BC)){if(!BC){BB.cfg.setProperty(y,false);if(A9){A5=this.cfg.getProperty(c);A6=this.cfg.getProperty(Av);if(!(this instanceof YAHOO.widget.MenuBar)&&A5>0&&A5>=A6){this._execSubmenuHideDelay(A9,AA.getPageX(BE),A5);}else{A9.hide();}}}BB.handledMouseOutEvent=true;BB.handledMouseOverEvent=false;}}if(!this._bHandledMouseOutEvent){if(this._didMouseLeave(A8)||BC){if(this._useHideDelay){this._execHideDelay();}AA.removeListener(this.element,b,this._onMouseMove);this._nCurrentMouseX=AA.getPageX(BE);this._bHandledMouseOutEvent=true;this._bHandledMouseOverEvent=false;}}}},_didMouseLeave:function(A5){return(A5===this._shadow||(A5!=this.element&&!f.isAncestor(this.element,A5)));},_onMouseMove:function(A6,A5){if(!this._bStopMouseEventHandlers){this._nCurrentMouseX=AA.getPageX(A6);}},_onClick:function(BG,A7){var BH=A7[0],BB=A7[1],BD=false,A9,BE,A6,A5,BA,BC,BF;var A8=function(){A6=this.getRoot();if(A6 instanceof YAHOO.widget.MenuBar||A6.cfg.getProperty(Ac)==C){A6.clearActiveItem();}else{A6.hide();}};if(BB){if(BB.cfg.getProperty(Ah)){AA.preventDefault(BH);A8.call(this);}else{A9=BB.cfg.getProperty(O);BA=BB.cfg.getProperty(Q);if(BA){BC=BA.indexOf(M);BF=BA.length;if(BC!=-1){BA=BA.substr(BC,BF);BF=BA.length;if(BF>1){A5=BA.substr(1,BF);BE=YAHOO.widget.MenuManager.getMenu(A5);if(BE){BD=(this.getRoot()===BE.getRoot());}}else{if(BF===1){BD=true;}}}}if(BD&&!BB.cfg.getProperty(V)){AA.preventDefault(BH);if(As.webkit){BB.focus();}else{BB.focusEvent.fire();}}if(!A9&&!this.cfg.getProperty(Ar)){A8.call(this);}}}},_stopMouseEventHandlers:function(){this._bStopMouseEventHandlers=true;AM.later(10,this,function(){this._bStopMouseEventHandlers=false;});},_onKeyDown:function(BJ,BD){var BG=BD[0],BF=BD[1],BC,BH,A6,A9,BK,A5,BN,A8,BI,A7,BE,BM,BA,BB;if(this._useHideDelay){this._cancelHideDelay();}if(BF&&!BF.cfg.getProperty(Ah)){BH=BF.cfg;A6=this.parent;switch(BG.keyCode){case 38:case 40:BK=(BG.keyCode==38)?BF.getPreviousEnabledSibling():BF.getNextEnabledSibling();if(BK){this.clearActiveItem();BK.cfg.setProperty(y,true);BK.focus();if(this.cfg.getProperty(AU)>0||f.hasClass(this.body,l)){A5=this.body;BN=A5.scrollTop;A8=A5.offsetHeight;BI=this.getItems();A7=BI.length-1;BE=BK.element.offsetTop;if(BG.keyCode==40){if(BE>=(A8+BN)){A5.scrollTop=BE-A8;}else{if(BE<=BN){A5.scrollTop=0;}}if(BK==BI[A7]){A5.scrollTop=BK.element.offsetTop;}}else{if(BE<=BN){A5.scrollTop=BE-BK.element.offsetHeight;}else{if(BE>=(BN+A8)){A5.scrollTop=BE;}}if(BK==BI[0]){A5.scrollTop=0;}}BN=A5.scrollTop;BM=A5.scrollHeight-A5.offsetHeight;if(BN===0){this._disableScrollHeader();this._enableScrollFooter();}else{if(BN==BM){this._enableScrollHeader();this._disableScrollFooter();}else{this._enableScrollHeader();this._enableScrollFooter();}}}}AA.preventDefault(BG);this._stopMouseEventHandlers();break;case 39:BC=BH.getProperty(O);if(BC){if(!BH.getProperty(y)){BH.setProperty(y,true);}BC.show();BC.setInitialFocus();BC.setInitialSelection();}else{A9=this.getRoot();if(A9 instanceof YAHOO.widget.MenuBar){BK=A9.activeItem.getNextEnabledSibling();
if(BK){A9.clearActiveItem();BK.cfg.setProperty(y,true);BC=BK.cfg.getProperty(O);if(BC){BC.show();BC.setInitialFocus();}else{BK.focus();}}}}AA.preventDefault(BG);this._stopMouseEventHandlers();break;case 37:if(A6){BA=A6.parent;if(BA instanceof YAHOO.widget.MenuBar){BK=BA.activeItem.getPreviousEnabledSibling();if(BK){BA.clearActiveItem();BK.cfg.setProperty(y,true);BC=BK.cfg.getProperty(O);if(BC){BC.show();BC.setInitialFocus();}else{BK.focus();}}}else{this.hide();A6.focus();}}AA.preventDefault(BG);this._stopMouseEventHandlers();break;}}if(BG.keyCode==27){if(this.cfg.getProperty(Ac)==AD){this.hide();if(this.parent){this.parent.focus();}else{BB=this._focusedElement;if(BB&&BB.focus){try{BB.focus();}catch(BL){}}}}else{if(this.activeItem){BC=this.activeItem.cfg.getProperty(O);if(BC&&BC.cfg.getProperty(Au)){BC.hide();this.activeItem.focus();}else{this.activeItem.blur();this.activeItem.cfg.setProperty(y,false);}}}AA.preventDefault(BG);}},_onKeyPress:function(A7,A6){var A5=A6[0];if(A5.keyCode==40||A5.keyCode==38){AA.preventDefault(A5);}},_onBlur:function(A6,A5){if(this._hasFocus){this._hasFocus=false;}},_onYChange:function(A6,A5){var A8=this.parent,BA,A7,A9;if(A8){BA=A8.parent.body.scrollTop;if(BA>0){A9=(this.cfg.getProperty(R)-BA);f.setY(this.element,A9);A7=this.iframe;if(A7){f.setY(A7,A9);}this.cfg.setProperty(R,A9,true);}}},_onScrollTargetMouseOver:function(BB,BE){var BD=this._bodyScrollTimer;if(BD){BD.cancel();}this._cancelHideDelay();var A7=AA.getTarget(BB),A9=this.body,A8=this.cfg.getProperty(j),A5,A6;function BC(){var BF=A9.scrollTop;if(BF<A5){A9.scrollTop=(BF+A8);this._enableScrollHeader();}else{A9.scrollTop=A5;this._bodyScrollTimer.cancel();this._disableScrollFooter();}}function BA(){var BF=A9.scrollTop;if(BF>0){A9.scrollTop=(BF-A8);this._enableScrollFooter();}else{A9.scrollTop=0;this._bodyScrollTimer.cancel();this._disableScrollHeader();}}if(f.hasClass(A7,A0)){A6=BA;}else{A5=A9.scrollHeight-A9.offsetHeight;A6=BC;}this._bodyScrollTimer=AM.later(10,this,A6,null,true);},_onScrollTargetMouseOut:function(A7,A5){var A6=this._bodyScrollTimer;if(A6){A6.cancel();}this._cancelHideDelay();},_onInit:function(A6,A5){this.cfg.subscribeToConfigEvent(Au,this._onVisibleChange);var A7=!this.parent,A8=this.lazyLoad;if(((A7&&!A8)||(A7&&(this.cfg.getProperty(Au)||this.cfg.getProperty(Ac)==C))||(!A7&&!A8))&&this.getItemGroups().length===0){if(this.srcElement){this._initSubTree();}if(this.itemData){this.addItems(this.itemData);}}else{if(A8){this.cfg.fireQueue();}}},_onBeforeRender:function(A8,A7){var A9=this.element,BC=this._aListElements.length,A6=true,BB=0,A5,BA;if(BC>0){do{A5=this._aListElements[BB];if(A5){if(A6){f.addClass(A5,AJ);A6=false;}if(!f.isAncestor(A9,A5)){this.appendToBody(A5);}BA=this._aGroupTitleElements[BB];if(BA){if(!f.isAncestor(A9,BA)){A5.parentNode.insertBefore(BA,A5);}f.addClass(A5,D);}}BB++;}while(BB<BC);}},_onRender:function(A6,A5){if(this.cfg.getProperty(Ac)==AD){if(!this.cfg.getProperty(Au)){this.positionOffScreen();}}},_onBeforeShow:function(A7,A6){var A9,BC,A8,BA=this.cfg.getProperty(g);if(this.lazyLoad&&this.getItemGroups().length===0){if(this.srcElement){this._initSubTree();}if(this.itemData){if(this.parent&&this.parent.parent&&this.parent.parent.srcElement&&this.parent.parent.srcElement.tagName.toUpperCase()==AH){A9=this.itemData.length;for(BC=0;BC<A9;BC++){if(this.itemData[BC].tagName){this.addItem((new this.ITEM_TYPE(this.itemData[BC])));}}}else{this.addItems(this.itemData);}}A8=this.srcElement;if(A8){if(A8.tagName.toUpperCase()==AH){if(f.inDocument(A8)){this.render(A8.parentNode);}else{this.render(BA);}}else{this.render();}}else{if(this.parent){this.render(this.parent.element);}else{this.render(BA);}}}var BB=this.parent,A5;if(!BB&&this.cfg.getProperty(Ac)==AD){this.cfg.refireEvent(e);}if(BB){A5=BB.parent.cfg.getProperty(AO);this.cfg.setProperty(p,[BB.element,A5[0],A5[1]]);this.align();}},getConstrainedY:function(BH){var BS=this,BO=BS.cfg.getProperty(p),BV=BS.cfg.getProperty(AU),BR,BG={"trbr":true,"tlbl":true,"bltl":true,"brtr":true},BA=(BO&&BG[BO[1]+BO[2]]),BC=BS.element,BW=BC.offsetHeight,BQ=AB.VIEWPORT_OFFSET,BL=f.getViewportHeight(),BP=f.getDocumentScrollTop(),BM=(BS.cfg.getProperty(Aj)+BQ<BL),BU,BD,BJ,BK,BF=false,BE,A7,BI=BP+BQ,A9=BP+BL-BW-BQ,A5=BH;var BB=function(){var BX;if((BS.cfg.getProperty(R)-BP)>BJ){BX=(BJ-BW);}else{BX=(BJ+BK);}BS.cfg.setProperty(R,(BX+BP),true);return BX;};var A8=function(){if((BS.cfg.getProperty(R)-BP)>BJ){return(A7-BQ);}else{return(BE-BQ);}};var BN=function(){var BX;if((BS.cfg.getProperty(R)-BP)>BJ){BX=(BJ+BK);}else{BX=(BJ-BC.offsetHeight);}BS.cfg.setProperty(R,(BX+BP),true);};var A6=function(){BS._setScrollHeight(this.cfg.getProperty(AU));BS.hideEvent.unsubscribe(A6);};var BT=function(){var Ba=A8(),BX=(BS.getItems().length>0),BZ,BY;if(BW>Ba){BZ=BX?BS.cfg.getProperty(Aj):BW;if((Ba>BZ)&&BX){BR=Ba;}else{BR=BV;}BS._setScrollHeight(BR);BS.hideEvent.subscribe(A6);BN();if(Ba<BZ){if(BF){BB();}else{BB();BF=true;BY=BT();}}}else{if(BR&&(BR!==BV)){BS._setScrollHeight(BV);BS.hideEvent.subscribe(A6);BN();}}return BY;};if(BH<BI||BH>A9){if(BM){if(BS.cfg.getProperty(A4)&&BA){BD=BO[0];BK=BD.offsetHeight;BJ=(f.getY(BD)-BP);BE=BJ;A7=(BL-(BJ+BK));BT();A5=BS.cfg.getProperty(R);}else{if(!(BS instanceof YAHOO.widget.MenuBar)&&BW>=BL){BU=(BL-(BQ*2));if(BU>BS.cfg.getProperty(Aj)){BS._setScrollHeight(BU);BS.hideEvent.subscribe(A6);BN();A5=BS.cfg.getProperty(R);}}else{if(BH<BI){A5=BI;}else{if(BH>A9){A5=A9;}}}}}else{A5=BQ+BP;}}return A5;},_onHide:function(A6,A5){if(this.cfg.getProperty(Ac)===AD){this.positionOffScreen();}},_onShow:function(BD,BB){var A5=this.parent,A7,A8,BA,A6;function A9(BF){var BE;if(BF.type==Ak||(BF.type==Ae&&BF.keyCode==27)){BE=AA.getTarget(BF);if(BE!=A7.element||!f.isAncestor(A7.element,BE)){A7.cfg.setProperty(Z,false);AA.removeListener(document,Ak,A9);AA.removeListener(document,Ae,A9);}}}function BC(BF,BE,BG){this.cfg.setProperty(U,u);this.hideEvent.unsubscribe(BC,BG);}if(A5){A7=A5.parent;if(!A7.cfg.getProperty(Z)&&(A7 instanceof YAHOO.widget.MenuBar||A7.cfg.getProperty(Ac)==C)){A7.cfg.setProperty(Z,true);
AA.on(document,Ak,A9);AA.on(document,Ae,A9);}if((this.cfg.getProperty("x")<A7.cfg.getProperty("x"))&&(As.gecko&&As.gecko<1.9)&&!this.cfg.getProperty(U)){A8=this.element;BA=A8.offsetWidth;A8.style.width=BA+AQ;A6=(BA-(A8.offsetWidth-BA))+AQ;this.cfg.setProperty(U,A6);this.hideEvent.subscribe(BC,A6);}}if(this===this.getRoot()&&this.cfg.getProperty(Ac)===AD){this._focusedElement=Ad;this.focus();}},_onBeforeHide:function(A7,A6){var A5=this.activeItem,A9=this.getRoot(),BA,A8;if(A5){BA=A5.cfg;BA.setProperty(y,false);A8=BA.getProperty(O);if(A8){A8.hide();}}if(As.ie&&this.cfg.getProperty(Ac)===AD&&this.parent){A9._hasFocus=this.hasFocus();}if(A9==this){A9.blur();}},_onParentMenuConfigChange:function(A6,A5,A9){var A7=A5[0][0],A8=A5[0][1];switch(A7){case AF:case w:case AX:case Av:case c:case AC:case Ay:case A2:case j:case AU:case Aj:case AE:case Ag:case A4:case Ar:A9.cfg.setProperty(A7,A8);break;case AO:if(!(this.parent.parent instanceof YAHOO.widget.MenuBar)){A9.cfg.setProperty(A7,A8);}break;}},_onParentMenuRender:function(A6,A5,BB){var A8=BB.parent.parent,A7=A8.cfg,A9={constraintoviewport:A7.getProperty(w),xy:[0,0],clicktohide:A7.getProperty(AC),effect:A7.getProperty(Ay),showdelay:A7.getProperty(Av),hidedelay:A7.getProperty(AX),submenuhidedelay:A7.getProperty(c),classname:A7.getProperty(A2),scrollincrement:A7.getProperty(j),maxheight:A7.getProperty(AU),minscrollheight:A7.getProperty(Aj),iframe:A7.getProperty(AF),shadow:A7.getProperty(Ag),preventcontextoverlap:A7.getProperty(A4),monitorresize:A7.getProperty(AE),keepopen:A7.getProperty(Ar)},BA;if(!(A8 instanceof YAHOO.widget.MenuBar)){A9[AO]=A7.getProperty(AO);}BB.cfg.applyConfig(A9);if(!this.lazyLoad){BA=this.parent.element;if(this.element.parentNode==BA){this.render();}else{this.render(BA);}}},_onMenuItemDestroy:function(A7,A6,A5){this._removeItemFromGroupByValue(A5.groupIndex,A5);},_onMenuItemConfigChange:function(A7,A6,A5){var A9=A6[0][0],BA=A6[0][1],A8;switch(A9){case y:if(BA===true){this.activeItem=A5;}break;case O:A8=A6[0][1];if(A8){this._configureSubmenu(A5);}break;}},configVisible:function(A7,A6,A8){var A5,A9;if(this.cfg.getProperty(Ac)==AD){r.superclass.configVisible.call(this,A7,A6,A8);}else{A5=A6[0];A9=f.getStyle(this.element,AW);f.setStyle(this.element,J,Au);if(A5){if(A9!=AV){this.beforeShowEvent.fire();f.setStyle(this.element,AW,AV);this.showEvent.fire();}}else{if(A9==AV){this.beforeHideEvent.fire();f.setStyle(this.element,AW,AY);this.hideEvent.fire();}}}},configPosition:function(A7,A6,BA){var A9=this.element,A8=A6[0]==C?C:z,BB=this.cfg,A5;f.setStyle(A9,Ac,A8);if(A8==C){f.setStyle(A9,AW,AV);BB.setProperty(Au,true);}else{f.setStyle(A9,J,AL);}if(A8==z){A5=BB.getProperty(AS);if(!A5||A5===0){BB.setProperty(AS,1);}}},configIframe:function(A6,A5,A7){if(this.cfg.getProperty(Ac)==AD){r.superclass.configIframe.call(this,A6,A5,A7);}},configHideDelay:function(A6,A5,A7){var A8=A5[0];this._useHideDelay=(A8>0);},configContainer:function(A6,A5,A8){var A7=A5[0];if(AM.isString(A7)){this.cfg.setProperty(g,f.get(A7),true);}},_clearSetWidthFlag:function(){this._widthSetForScroll=false;this.cfg.unsubscribeFromConfigEvent(U,this._clearSetWidthFlag);},_subscribeScrollHandlers:function(A6,A5){var A8=this._onScrollTargetMouseOver;var A7=this._onScrollTargetMouseOut;AA.on(A6,Ai,A8,this,true);AA.on(A6,H,A7,this,true);AA.on(A5,Ai,A8,this,true);AA.on(A5,H,A7,this,true);},_unsubscribeScrollHandlers:function(A6,A5){var A8=this._onScrollTargetMouseOver;var A7=this._onScrollTargetMouseOut;AA.removeListener(A6,Ai,A8);AA.removeListener(A6,H,A7);AA.removeListener(A5,Ai,A8);AA.removeListener(A5,H,A7);},_setScrollHeight:function(BF){var BC=BF,BB=false,BG=false,A8,A9,BE,A6,A5,BD,BA,A7;if(this.getItems().length>0){A8=this.element;A9=this.body;BE=this.header;A6=this.footer;A5=this.cfg.getProperty(Aj);if(BC>0&&BC<A5){BC=A5;}f.setStyle(A9,Ao,u);f.removeClass(A9,l);A9.scrollTop=0;BG=((As.gecko&&As.gecko<1.9)||As.ie);if(BC>0&&BG&&!this.cfg.getProperty(U)){BA=A8.offsetWidth;A8.style.width=BA+AQ;A7=(BA-(A8.offsetWidth-BA))+AQ;this.cfg.unsubscribeFromConfigEvent(U,this._clearSetWidthFlag);this.cfg.setProperty(U,A7);this._widthSetForScroll=true;this.cfg.subscribeToConfigEvent(U,this._clearSetWidthFlag);}if(BC>0&&(!BE&&!A6)){this.setHeader(AK);this.setFooter(AK);BE=this.header;A6=this.footer;f.addClass(BE,T);f.addClass(A6,x);A8.insertBefore(BE,A9);A8.appendChild(A6);}BD=BC;if(BE&&A6){BD=(BD-(BE.offsetHeight+A6.offsetHeight));}if((BD>0)&&(A9.offsetHeight>BC)){f.addClass(A9,l);f.setStyle(A9,Ao,(BD+AQ));if(!this._hasScrollEventHandlers){this._subscribeScrollHandlers(BE,A6);this._hasScrollEventHandlers=true;}this._disableScrollHeader();this._enableScrollFooter();BB=true;}else{if(BE&&A6){if(this._widthSetForScroll){this._widthSetForScroll=false;this.cfg.unsubscribeFromConfigEvent(U,this._clearSetWidthFlag);this.cfg.setProperty(U,u);}this._enableScrollHeader();this._enableScrollFooter();if(this._hasScrollEventHandlers){this._unsubscribeScrollHandlers(BE,A6);this._hasScrollEventHandlers=false;}A8.removeChild(BE);A8.removeChild(A6);this.header=null;this.footer=null;BB=true;}}if(BB){this.cfg.refireEvent(AF);this.cfg.refireEvent(Ag);}}},_setMaxHeight:function(A6,A5,A7){this._setScrollHeight(A7);this.renderEvent.unsubscribe(this._setMaxHeight);},configMaxHeight:function(A6,A5,A7){var A8=A5[0];if(this.lazyLoad&&!this.body&&A8>0){this.renderEvent.subscribe(this._setMaxHeight,A8,this);}else{this._setScrollHeight(A8);}},configClassName:function(A7,A6,A8){var A5=A6[0];if(this._sClassName){f.removeClass(this.element,this._sClassName);}f.addClass(this.element,A5);this._sClassName=A5;},_onItemAdded:function(A6,A5){var A7=A5[0];if(A7){A7.cfg.setProperty(Ah,true);}},configDisabled:function(A7,A6,BA){var A9=A6[0],A5=this.getItems(),BB,A8;if(AM.isArray(A5)){BB=A5.length;if(BB>0){A8=BB-1;do{A5[A8].cfg.setProperty(Ah,A9);}while(A8--);}if(A9){this.clearActiveItem(true);f.addClass(this.element,Ah);this.itemAddedEvent.subscribe(this._onItemAdded);}else{f.removeClass(this.element,Ah);this.itemAddedEvent.unsubscribe(this._onItemAdded);
}}},_sizeShadow:function(){var A6=this.element,A5=this._shadow;if(A5&&A6){if(A5.style.width&&A5.style.height){A5.style.width=u;A5.style.height=u;}A5.style.width=(A6.offsetWidth+6)+AQ;A5.style.height=(A6.offsetHeight+1)+AQ;}},_replaceShadow:function(){this.element.appendChild(this._shadow);},_addShadowVisibleClass:function(){f.addClass(this._shadow,AG);},_removeShadowVisibleClass:function(){f.removeClass(this._shadow,AG);},_removeShadow:function(){var A5=(this._shadow&&this._shadow.parentNode);if(A5){A5.removeChild(this._shadow);}this.beforeShowEvent.unsubscribe(this._addShadowVisibleClass);this.beforeHideEvent.unsubscribe(this._removeShadowVisibleClass);this.cfg.unsubscribeFromConfigEvent(U,this._sizeShadow);this.cfg.unsubscribeFromConfigEvent(Ao,this._sizeShadow);this.cfg.unsubscribeFromConfigEvent(AU,this._sizeShadow);this.cfg.unsubscribeFromConfigEvent(AU,this._replaceShadow);this.changeContentEvent.unsubscribe(this._sizeShadow);Aw.textResizeEvent.unsubscribe(this._sizeShadow);},_createShadow:function(){var A6=this._shadow,A5;if(!A6){A5=this.element;if(!Ap){Ap=document.createElement(K);Ap.className=m;}A6=Ap.cloneNode(false);A5.appendChild(A6);this._shadow=A6;this.beforeShowEvent.subscribe(this._addShadowVisibleClass);this.beforeHideEvent.subscribe(this._removeShadowVisibleClass);if(As.ie){AM.later(0,this,function(){this._sizeShadow();this.syncIframe();});this.cfg.subscribeToConfigEvent(U,this._sizeShadow);this.cfg.subscribeToConfigEvent(Ao,this._sizeShadow);this.cfg.subscribeToConfigEvent(AU,this._sizeShadow);this.changeContentEvent.subscribe(this._sizeShadow);Aw.textResizeEvent.subscribe(this._sizeShadow,this,true);this.destroyEvent.subscribe(function(){Aw.textResizeEvent.unsubscribe(this._sizeShadow,this);});}this.cfg.subscribeToConfigEvent(AU,this._replaceShadow);}},_shadowBeforeShow:function(){if(this._shadow){this._replaceShadow();if(As.ie){this._sizeShadow();}}else{this._createShadow();}this.beforeShowEvent.unsubscribe(this._shadowBeforeShow);},configShadow:function(A6,A5,A7){var A8=A5[0];if(A8&&this.cfg.getProperty(Ac)==AD){if(this.cfg.getProperty(Au)){if(this._shadow){this._replaceShadow();if(As.ie){this._sizeShadow();}}else{this._createShadow();}}else{this.beforeShowEvent.subscribe(this._shadowBeforeShow);}}else{if(!A8){this.beforeShowEvent.unsubscribe(this._shadowBeforeShow);this._removeShadow();}}},initEvents:function(){r.superclass.initEvents.call(this);var A6=Ab.length-1,A7,A5;do{A7=Ab[A6];A5=this.createEvent(A7[1]);A5.signature=F.LIST;this[A7[0]]=A5;}while(A6--);},positionOffScreen:function(){var A6=this.iframe,A7=this.element,A5=this.OFF_SCREEN_POSITION;A7.style.top=u;A7.style.left=u;if(A6){A6.style.top=A5;A6.style.left=A5;}},getRoot:function(){var A7=this.parent,A6,A5;if(A7){A6=A7.parent;A5=A6?A6.getRoot():this;}else{A5=this;}return A5;},toString:function(){var A6=Aq,A5=this.id;if(A5){A6+=(A1+A5);}return A6;},setItemGroupTitle:function(BA,A9){var A8,A7,A6,A5;if(AM.isString(BA)&&BA.length>0){A8=AM.isNumber(A9)?A9:0;A7=this._aGroupTitleElements[A8];if(A7){A7.innerHTML=BA;}else{A7=document.createElement(this.GROUP_TITLE_TAG_NAME);A7.innerHTML=BA;this._aGroupTitleElements[A8]=A7;}A6=this._aGroupTitleElements.length-1;do{if(this._aGroupTitleElements[A6]){f.removeClass(this._aGroupTitleElements[A6],AJ);A5=A6;}}while(A6--);if(A5!==null){f.addClass(this._aGroupTitleElements[A5],AJ);}this.changeContentEvent.fire();}},addItem:function(A5,A6){return this._addItemToGroup(A6,A5);},addItems:function(A9,A8){var BB,A5,BA,A6,A7;if(AM.isArray(A9)){BB=A9.length;A5=[];for(A6=0;A6<BB;A6++){BA=A9[A6];if(BA){if(AM.isArray(BA)){A5[A5.length]=this.addItems(BA,A6);}else{A5[A5.length]=this._addItemToGroup(A8,BA);}}}if(A5.length){A7=A5;}}return A7;},insertItem:function(A5,A6,A7){return this._addItemToGroup(A7,A5,A6);},removeItem:function(A5,A7){var A8,A6;if(!AM.isUndefined(A5)){if(A5 instanceof YAHOO.widget.MenuItem){A8=this._removeItemFromGroupByValue(A7,A5);}else{if(AM.isNumber(A5)){A8=this._removeItemFromGroupByIndex(A7,A5);}}if(A8){A8.destroy();A6=A8;}}return A6;},getItems:function(){var A8=this._aItemGroups,A6,A7,A5=[];if(AM.isArray(A8)){A6=A8.length;A7=((A6==1)?A8[0]:(Array.prototype.concat.apply(A5,A8)));}return A7;},getItemGroups:function(){return this._aItemGroups;},getItem:function(A6,A7){var A8,A5;if(AM.isNumber(A6)){A8=this._getItemGroup(A7);if(A8){A5=A8[A6];}}return A5;},getSubmenus:function(){var A6=this.getItems(),BA=A6.length,A5,A7,A9,A8;if(BA>0){A5=[];for(A8=0;A8<BA;A8++){A9=A6[A8];if(A9){A7=A9.cfg.getProperty(O);if(A7){A5[A5.length]=A7;}}}}return A5;},clearContent:function(){var A9=this.getItems(),A6=A9.length,A7=this.element,A8=this.body,BD=this.header,A5=this.footer,BC,BB,BA;if(A6>0){BA=A6-1;do{BC=A9[BA];if(BC){BB=BC.cfg.getProperty(O);if(BB){this.cfg.configChangedEvent.unsubscribe(this._onParentMenuConfigChange,BB);this.renderEvent.unsubscribe(this._onParentMenuRender,BB);}this.removeItem(BC,BC.groupIndex);}}while(BA--);}if(BD){AA.purgeElement(BD);A7.removeChild(BD);}if(A5){AA.purgeElement(A5);A7.removeChild(A5);}if(A8){AA.purgeElement(A8);A8.innerHTML=u;}this.activeItem=null;this._aItemGroups=[];this._aListElements=[];this._aGroupTitleElements=[];this.cfg.setProperty(U,null);},destroy:function(A5){this.clearContent();this._aItemGroups=null;this._aListElements=null;this._aGroupTitleElements=null;r.superclass.destroy.call(this,A5);},setInitialFocus:function(){var A5=this._getFirstEnabledItem();if(A5){A5.focus();}},setInitialSelection:function(){var A5=this._getFirstEnabledItem();if(A5){A5.cfg.setProperty(y,true);}},clearActiveItem:function(A7){if(this.cfg.getProperty(Av)>0){this._cancelShowDelay();}var A5=this.activeItem,A8,A6;if(A5){A8=A5.cfg;if(A7){A5.blur();this.getRoot()._hasFocus=true;}A8.setProperty(y,false);A6=A8.getProperty(O);if(A6){A6.hide();}this.activeItem=null;}},focus:function(){if(!this.hasFocus()){this.setInitialFocus();}},blur:function(){var A5;if(this.hasFocus()){A5=A3.getFocusedMenuItem();if(A5){A5.blur();}}},hasFocus:function(){return(A3.getFocusedMenu()==this.getRoot());
},_doItemSubmenuSubscribe:function(A6,A5,A8){var A9=A5[0],A7=A9.cfg.getProperty(O);if(A7){A7.subscribe.apply(A7,A8);}},_doSubmenuSubscribe:function(A6,A5,A8){var A7=this.cfg.getProperty(O);if(A7){A7.subscribe.apply(A7,A8);}},subscribe:function(){r.superclass.subscribe.apply(this,arguments);r.superclass.subscribe.call(this,AR,this._doItemSubmenuSubscribe,arguments);var A5=this.getItems(),A9,A8,A6,A7;if(A5){A9=A5.length;if(A9>0){A7=A9-1;do{A8=A5[A7];A6=A8.cfg.getProperty(O);if(A6){A6.subscribe.apply(A6,arguments);}else{A8.cfg.subscribeToConfigEvent(O,this._doSubmenuSubscribe,arguments);}}while(A7--);}}},unsubscribe:function(){r.superclass.unsubscribe.apply(this,arguments);r.superclass.unsubscribe.call(this,AR,this._doItemSubmenuSubscribe,arguments);var A5=this.getItems(),A9,A8,A6,A7;if(A5){A9=A5.length;if(A9>0){A7=A9-1;do{A8=A5[A7];A6=A8.cfg.getProperty(O);if(A6){A6.unsubscribe.apply(A6,arguments);}else{A8.cfg.unsubscribeFromConfigEvent(O,this._doSubmenuSubscribe,arguments);}}while(A7--);}}},initDefaultConfig:function(){r.superclass.initDefaultConfig.call(this);var A5=this.cfg;A5.addProperty(AZ.key,{handler:this.configVisible,value:AZ.value,validator:AZ.validator});A5.addProperty(AP.key,{handler:this.configConstrainToViewport,value:AP.value,validator:AP.validator,supercedes:AP.supercedes});A5.addProperty(AI.key,{value:AI.value,validator:AI.validator,supercedes:AI.supercedes});A5.addProperty(S.key,{handler:this.configPosition,value:S.value,validator:S.validator,supercedes:S.supercedes});A5.addProperty(A.key,{value:A.value,suppressEvent:A.suppressEvent});A5.addProperty(t.key,{value:t.value,validator:t.validator,suppressEvent:t.suppressEvent});A5.addProperty(Y.key,{value:Y.value,validator:Y.validator,suppressEvent:Y.suppressEvent});A5.addProperty(q.key,{handler:this.configHideDelay,value:q.value,validator:q.validator,suppressEvent:q.suppressEvent});A5.addProperty(v.key,{value:v.value,validator:v.validator,suppressEvent:v.suppressEvent});A5.addProperty(o.key,{value:o.value,validator:o.validator,suppressEvent:o.suppressEvent});A5.addProperty(AN.key,{handler:this.configContainer,value:document.body,suppressEvent:AN.suppressEvent});A5.addProperty(Af.key,{value:Af.value,validator:Af.validator,supercedes:Af.supercedes,suppressEvent:Af.suppressEvent});A5.addProperty(N.key,{value:N.value,validator:N.validator,supercedes:N.supercedes,suppressEvent:N.suppressEvent});A5.addProperty(X.key,{handler:this.configMaxHeight,value:X.value,validator:X.validator,suppressEvent:X.suppressEvent,supercedes:X.supercedes});A5.addProperty(W.key,{handler:this.configClassName,value:W.value,validator:W.validator,supercedes:W.supercedes});A5.addProperty(a.key,{handler:this.configDisabled,value:a.value,validator:a.validator,suppressEvent:a.suppressEvent});A5.addProperty(I.key,{handler:this.configShadow,value:I.value,validator:I.validator});A5.addProperty(Al.key,{value:Al.value,validator:Al.validator});}});})();(function(){YAHOO.widget.MenuItem=function(AS,AR){if(AS){if(AR){this.parent=AR.parent;this.value=AR.value;this.id=AR.id;}this.init(AS,AR);}};var x=YAHOO.util.Dom,j=YAHOO.widget.Module,AB=YAHOO.widget.Menu,c=YAHOO.widget.MenuItem,AK=YAHOO.util.CustomEvent,k=YAHOO.env.ua,AQ=YAHOO.lang,AL="text",O="#",Q="-",L="helptext",n="url",AH="target",A="emphasis",N="strongemphasis",b="checked",w="submenu",H="disabled",B="selected",P="hassubmenu",U="checked-disabled",AI="hassubmenu-disabled",AD="hassubmenu-selected",T="checked-selected",q="onclick",J="classname",AJ="",i="OPTION",v="OPTGROUP",K="LI",AE="href",r="SELECT",X="DIV",AN='<em class="helptext">',a="<em>",I="</em>",W="<strong>",y="</strong>",Y="preventcontextoverlap",h="obj",AG="scope",t="none",V="visible",E=" ",m="MenuItem",AA="click",D="show",M="hide",S="li",AF='<a href="#"></a>',p=[["mouseOverEvent","mouseover"],["mouseOutEvent","mouseout"],["mouseDownEvent","mousedown"],["mouseUpEvent","mouseup"],["clickEvent",AA],["keyPressEvent","keypress"],["keyDownEvent","keydown"],["keyUpEvent","keyup"],["focusEvent","focus"],["blurEvent","blur"],["destroyEvent","destroy"]],o={key:AL,value:AJ,validator:AQ.isString,suppressEvent:true},s={key:L,supercedes:[AL],suppressEvent:true},G={key:n,value:O,suppressEvent:true},AO={key:AH,suppressEvent:true},AP={key:A,value:false,validator:AQ.isBoolean,suppressEvent:true,supercedes:[AL]},d={key:N,value:false,validator:AQ.isBoolean,suppressEvent:true,supercedes:[AL]},l={key:b,value:false,validator:AQ.isBoolean,suppressEvent:true,supercedes:[H,B]},F={key:w,suppressEvent:true,supercedes:[H,B]},AM={key:H,value:false,validator:AQ.isBoolean,suppressEvent:true,supercedes:[AL,B]},f={key:B,value:false,validator:AQ.isBoolean,suppressEvent:true},u={key:q,suppressEvent:true},AC={key:J,value:null,validator:AQ.isString,suppressEvent:true},z={key:"keylistener",value:null,suppressEvent:true},C=null,e={};var Z=function(AU,AT){var AR=e[AU];if(!AR){e[AU]={};AR=e[AU];}var AS=AR[AT];if(!AS){AS=AU+Q+AT;AR[AT]=AS;}return AS;};var g=function(AR){x.addClass(this.element,Z(this.CSS_CLASS_NAME,AR));x.addClass(this._oAnchor,Z(this.CSS_LABEL_CLASS_NAME,AR));};var R=function(AR){x.removeClass(this.element,Z(this.CSS_CLASS_NAME,AR));x.removeClass(this._oAnchor,Z(this.CSS_LABEL_CLASS_NAME,AR));};c.prototype={CSS_CLASS_NAME:"yuimenuitem",CSS_LABEL_CLASS_NAME:"yuimenuitemlabel",SUBMENU_TYPE:null,_oAnchor:null,_oHelpTextEM:null,_oSubmenu:null,_oOnclickAttributeValue:null,_sClassName:null,constructor:c,index:null,groupIndex:null,parent:null,element:null,srcElement:null,value:null,browser:j.prototype.browser,id:null,init:function(AR,Ab){if(!this.SUBMENU_TYPE){this.SUBMENU_TYPE=AB;}this.cfg=new YAHOO.util.Config(this);this.initDefaultConfig();var AX=this.cfg,AY=O,AT,Aa,AZ,AS,AV,AU,AW;if(AQ.isString(AR)){this._createRootNodeStructure();AX.queueProperty(AL,AR);}else{if(AR&&AR.tagName){switch(AR.tagName.toUpperCase()){case i:this._createRootNodeStructure();AX.queueProperty(AL,AR.text);AX.queueProperty(H,AR.disabled);this.value=AR.value;this.srcElement=AR;break;case v:this._createRootNodeStructure();
AX.queueProperty(AL,AR.label);AX.queueProperty(H,AR.disabled);this.srcElement=AR;this._initSubTree();break;case K:AZ=x.getFirstChild(AR);if(AZ){AY=AZ.getAttribute(AE,2);AS=AZ.getAttribute(AH);AV=AZ.innerHTML;}this.srcElement=AR;this.element=AR;this._oAnchor=AZ;AX.setProperty(AL,AV,true);AX.setProperty(n,AY,true);AX.setProperty(AH,AS,true);this._initSubTree();break;}}}if(this.element){AU=(this.srcElement||this.element).id;if(!AU){AU=this.id||x.generateId();this.element.id=AU;}this.id=AU;x.addClass(this.element,this.CSS_CLASS_NAME);x.addClass(this._oAnchor,this.CSS_LABEL_CLASS_NAME);AW=p.length-1;do{Aa=p[AW];AT=this.createEvent(Aa[1]);AT.signature=AK.LIST;this[Aa[0]]=AT;}while(AW--);if(Ab){AX.applyConfig(Ab);}AX.fireQueue();}},_createRootNodeStructure:function(){var AR,AS;if(!C){C=document.createElement(S);C.innerHTML=AF;}AR=C.cloneNode(true);AR.className=this.CSS_CLASS_NAME;AS=AR.firstChild;AS.className=this.CSS_LABEL_CLASS_NAME;this.element=AR;this._oAnchor=AS;},_initSubTree:function(){var AX=this.srcElement,AT=this.cfg,AV,AU,AS,AR,AW;if(AX.childNodes.length>0){if(this.parent.lazyLoad&&this.parent.srcElement&&this.parent.srcElement.tagName.toUpperCase()==r){AT.setProperty(w,{id:x.generateId(),itemdata:AX.childNodes});}else{AV=AX.firstChild;AU=[];do{if(AV&&AV.tagName){switch(AV.tagName.toUpperCase()){case X:AT.setProperty(w,AV);break;case i:AU[AU.length]=AV;break;}}}while((AV=AV.nextSibling));AS=AU.length;if(AS>0){AR=new this.SUBMENU_TYPE(x.generateId());AT.setProperty(w,AR);for(AW=0;AW<AS;AW++){AR.addItem((new AR.ITEM_TYPE(AU[AW])));}}}}},configText:function(Aa,AT,AV){var AS=AT[0],AU=this.cfg,AY=this._oAnchor,AR=AU.getProperty(L),AZ=AJ,AW=AJ,AX=AJ;if(AS){if(AR){AZ=AN+AR+I;}if(AU.getProperty(A)){AW=a;AX=I;}if(AU.getProperty(N)){AW=W;AX=y;}AY.innerHTML=(AW+AS+AX+AZ);}},configHelpText:function(AT,AS,AR){this.cfg.refireEvent(AL);},configURL:function(AT,AS,AR){var AV=AS[0];if(!AV){AV=O;}var AU=this._oAnchor;if(k.opera){AU.removeAttribute(AE);}AU.setAttribute(AE,AV);},configTarget:function(AU,AT,AS){var AR=AT[0],AV=this._oAnchor;if(AR&&AR.length>0){AV.setAttribute(AH,AR);}else{AV.removeAttribute(AH);}},configEmphasis:function(AT,AS,AR){var AV=AS[0],AU=this.cfg;if(AV&&AU.getProperty(N)){AU.setProperty(N,false);}AU.refireEvent(AL);},configStrongEmphasis:function(AU,AT,AS){var AR=AT[0],AV=this.cfg;if(AR&&AV.getProperty(A)){AV.setProperty(A,false);}AV.refireEvent(AL);},configChecked:function(AT,AS,AR){var AV=AS[0],AU=this.cfg;if(AV){g.call(this,b);}else{R.call(this,b);}AU.refireEvent(AL);if(AU.getProperty(H)){AU.refireEvent(H);}if(AU.getProperty(B)){AU.refireEvent(B);}},configDisabled:function(AT,AS,AR){var AV=AS[0],AW=this.cfg,AU=AW.getProperty(w),AX=AW.getProperty(b);if(AV){if(AW.getProperty(B)){AW.setProperty(B,false);}g.call(this,H);if(AU){g.call(this,AI);}if(AX){g.call(this,U);}}else{R.call(this,H);if(AU){R.call(this,AI);}if(AX){R.call(this,U);}}},configSelected:function(AT,AS,AR){var AX=this.cfg,AW=this._oAnchor,AV=AS[0],AY=AX.getProperty(b),AU=AX.getProperty(w);if(k.opera){AW.blur();}if(AV&&!AX.getProperty(H)){g.call(this,B);if(AU){g.call(this,AD);}if(AY){g.call(this,T);}}else{R.call(this,B);if(AU){R.call(this,AD);}if(AY){R.call(this,T);}}if(this.hasFocus()&&k.opera){AW.focus();}},_onSubmenuBeforeHide:function(AU,AT){var AV=this.parent,AR;function AS(){AV._oAnchor.blur();AR.beforeHideEvent.unsubscribe(AS);}if(AV.hasFocus()){AR=AV.parent;AR.beforeHideEvent.subscribe(AS);}},configSubmenu:function(AY,AT,AW){var AV=AT[0],AU=this.cfg,AS=this.parent&&this.parent.lazyLoad,AX,AZ,AR;if(AV){if(AV instanceof AB){AX=AV;AX.parent=this;AX.lazyLoad=AS;}else{if(AQ.isObject(AV)&&AV.id&&!AV.nodeType){AZ=AV.id;AR=AV;AR.lazyload=AS;AR.parent=this;AX=new this.SUBMENU_TYPE(AZ,AR);AU.setProperty(w,AX,true);}else{AX=new this.SUBMENU_TYPE(AV,{lazyload:AS,parent:this});AU.setProperty(w,AX,true);}}if(AX){AX.cfg.setProperty(Y,true);g.call(this,P);if(AU.getProperty(n)===O){AU.setProperty(n,(O+AX.id));}this._oSubmenu=AX;if(k.opera){AX.beforeHideEvent.subscribe(this._onSubmenuBeforeHide);}}}else{R.call(this,P);if(this._oSubmenu){this._oSubmenu.destroy();}}if(AU.getProperty(H)){AU.refireEvent(H);}if(AU.getProperty(B)){AU.refireEvent(B);}},configOnClick:function(AT,AS,AR){var AU=AS[0];if(this._oOnclickAttributeValue&&(this._oOnclickAttributeValue!=AU)){this.clickEvent.unsubscribe(this._oOnclickAttributeValue.fn,this._oOnclickAttributeValue.obj);this._oOnclickAttributeValue=null;}if(!this._oOnclickAttributeValue&&AQ.isObject(AU)&&AQ.isFunction(AU.fn)){this.clickEvent.subscribe(AU.fn,((h in AU)?AU.obj:this),((AG in AU)?AU.scope:null));this._oOnclickAttributeValue=AU;}},configClassName:function(AU,AT,AS){var AR=AT[0];if(this._sClassName){x.removeClass(this.element,this._sClassName);}x.addClass(this.element,AR);this._sClassName=AR;},_dispatchClickEvent:function(){var AS=this,AR;if(!AS.cfg.getProperty(H)){AR=x.getFirstChild(AS.element);this._dispatchDOMClick(AR);}},_dispatchDOMClick:function(AS){var AR;if(k.ie&&k.ie<9){AS.fireEvent(q);}else{if((k.gecko&&k.gecko>=1.9)||k.opera||k.webkit){AR=document.createEvent("HTMLEvents");AR.initEvent(AA,true,true);}else{AR=document.createEvent("MouseEvents");AR.initMouseEvent(AA,true,true,window,0,0,0,0,0,false,false,false,false,0,null);}AS.dispatchEvent(AR);}},_createKeyListener:function(AU,AT,AW){var AV=this,AS=AV.parent;var AR=new YAHOO.util.KeyListener(AS.element.ownerDocument,AW,{fn:AV._dispatchClickEvent,scope:AV,correctScope:true});if(AS.cfg.getProperty(V)){AR.enable();}AS.subscribe(D,AR.enable,null,AR);AS.subscribe(M,AR.disable,null,AR);AV._keyListener=AR;AS.unsubscribe(D,AV._createKeyListener,AW);},configKeyListener:function(AT,AS){var AV=AS[0],AU=this,AR=AU.parent;if(AU._keyData){AR.unsubscribe(D,AU._createKeyListener,AU._keyData);AU._keyData=null;}if(AU._keyListener){AR.unsubscribe(D,AU._keyListener.enable);AR.unsubscribe(M,AU._keyListener.disable);AU._keyListener.disable();AU._keyListener=null;}if(AV){AU._keyData=AV;AR.subscribe(D,AU._createKeyListener,AV,AU);}},initDefaultConfig:function(){var AR=this.cfg;
AR.addProperty(o.key,{handler:this.configText,value:o.value,validator:o.validator,suppressEvent:o.suppressEvent});AR.addProperty(s.key,{handler:this.configHelpText,supercedes:s.supercedes,suppressEvent:s.suppressEvent});AR.addProperty(G.key,{handler:this.configURL,value:G.value,suppressEvent:G.suppressEvent});AR.addProperty(AO.key,{handler:this.configTarget,suppressEvent:AO.suppressEvent});AR.addProperty(AP.key,{handler:this.configEmphasis,value:AP.value,validator:AP.validator,suppressEvent:AP.suppressEvent,supercedes:AP.supercedes});AR.addProperty(d.key,{handler:this.configStrongEmphasis,value:d.value,validator:d.validator,suppressEvent:d.suppressEvent,supercedes:d.supercedes});AR.addProperty(l.key,{handler:this.configChecked,value:l.value,validator:l.validator,suppressEvent:l.suppressEvent,supercedes:l.supercedes});AR.addProperty(AM.key,{handler:this.configDisabled,value:AM.value,validator:AM.validator,suppressEvent:AM.suppressEvent});AR.addProperty(f.key,{handler:this.configSelected,value:f.value,validator:f.validator,suppressEvent:f.suppressEvent});AR.addProperty(F.key,{handler:this.configSubmenu,supercedes:F.supercedes,suppressEvent:F.suppressEvent});AR.addProperty(u.key,{handler:this.configOnClick,suppressEvent:u.suppressEvent});AR.addProperty(AC.key,{handler:this.configClassName,value:AC.value,validator:AC.validator,suppressEvent:AC.suppressEvent});AR.addProperty(z.key,{handler:this.configKeyListener,value:z.value,suppressEvent:z.suppressEvent});},getNextSibling:function(){var AR=function(AX){return(AX.nodeName.toLowerCase()==="ul");},AV=this.element,AU=x.getNextSibling(AV),AT,AS,AW;if(!AU){AT=AV.parentNode;AS=x.getNextSiblingBy(AT,AR);if(AS){AW=AS;}else{AW=x.getFirstChildBy(AT.parentNode,AR);}AU=x.getFirstChild(AW);}return YAHOO.widget.MenuManager.getMenuItem(AU.id);},getNextEnabledSibling:function(){var AR=this.getNextSibling();return(AR.cfg.getProperty(H)||AR.element.style.display==t)?AR.getNextEnabledSibling():AR;},getPreviousSibling:function(){var AR=function(AX){return(AX.nodeName.toLowerCase()==="ul");},AV=this.element,AU=x.getPreviousSibling(AV),AT,AS,AW;if(!AU){AT=AV.parentNode;AS=x.getPreviousSiblingBy(AT,AR);if(AS){AW=AS;}else{AW=x.getLastChildBy(AT.parentNode,AR);}AU=x.getLastChild(AW);}return YAHOO.widget.MenuManager.getMenuItem(AU.id);},getPreviousEnabledSibling:function(){var AR=this.getPreviousSibling();return(AR.cfg.getProperty(H)||AR.element.style.display==t)?AR.getPreviousEnabledSibling():AR;},focus:function(){var AU=this.parent,AT=this._oAnchor,AR=AU.activeItem;function AS(){try{if(!(k.ie&&!document.hasFocus())){if(AR){AR.blurEvent.fire();}AT.focus();this.focusEvent.fire();}}catch(AV){}}if(!this.cfg.getProperty(H)&&AU&&AU.cfg.getProperty(V)&&this.element.style.display!=t){AQ.later(0,this,AS);}},blur:function(){var AR=this.parent;if(!this.cfg.getProperty(H)&&AR&&AR.cfg.getProperty(V)){AQ.later(0,this,function(){try{this._oAnchor.blur();this.blurEvent.fire();}catch(AS){}},0);}},hasFocus:function(){return(YAHOO.widget.MenuManager.getFocusedMenuItem()==this);},destroy:function(){var AT=this.element,AS,AR,AV,AU;if(AT){AS=this.cfg.getProperty(w);if(AS){AS.destroy();}AR=AT.parentNode;if(AR){AR.removeChild(AT);this.destroyEvent.fire();}AU=p.length-1;do{AV=p[AU];this[AV[0]].unsubscribeAll();}while(AU--);this.cfg.configChangedEvent.unsubscribeAll();}},toString:function(){var AS=m,AR=this.id;if(AR){AS+=(E+AR);}return AS;}};AQ.augmentProto(c,YAHOO.util.EventProvider);})();(function(){var B="xy",C="mousedown",F="ContextMenu",J=" ";YAHOO.widget.ContextMenu=function(L,K){YAHOO.widget.ContextMenu.superclass.constructor.call(this,L,K);};var I=YAHOO.util.Event,E=YAHOO.env.ua,G=YAHOO.widget.ContextMenu,A={"TRIGGER_CONTEXT_MENU":"triggerContextMenu","CONTEXT_MENU":(E.opera?C:"contextmenu"),"CLICK":"click"},H={key:"trigger",suppressEvent:true};function D(L,K,M){this.cfg.setProperty(B,M);this.beforeShowEvent.unsubscribe(D,M);}YAHOO.lang.extend(G,YAHOO.widget.Menu,{_oTrigger:null,_bCancelled:false,contextEventTarget:null,triggerContextMenuEvent:null,init:function(L,K){G.superclass.init.call(this,L);this.beforeInitEvent.fire(G);if(K){this.cfg.applyConfig(K,true);}this.initEvent.fire(G);},initEvents:function(){G.superclass.initEvents.call(this);this.triggerContextMenuEvent=this.createEvent(A.TRIGGER_CONTEXT_MENU);this.triggerContextMenuEvent.signature=YAHOO.util.CustomEvent.LIST;},cancel:function(){this._bCancelled=true;},_removeEventHandlers:function(){var K=this._oTrigger;if(K){I.removeListener(K,A.CONTEXT_MENU,this._onTriggerContextMenu);if(E.opera){I.removeListener(K,A.CLICK,this._onTriggerClick);}}},_onTriggerClick:function(L,K){if(L.ctrlKey){I.stopEvent(L);}},_onTriggerContextMenu:function(M,K){var L;if(!(M.type==C&&!M.ctrlKey)){this.contextEventTarget=I.getTarget(M);this.triggerContextMenuEvent.fire(M);if(!this._bCancelled){I.stopEvent(M);YAHOO.widget.MenuManager.hideVisible();L=I.getXY(M);if(!YAHOO.util.Dom.inDocument(this.element)){this.beforeShowEvent.subscribe(D,L);}else{this.cfg.setProperty(B,L);}this.show();}this._bCancelled=false;}},toString:function(){var L=F,K=this.id;if(K){L+=(J+K);}return L;},initDefaultConfig:function(){G.superclass.initDefaultConfig.call(this);this.cfg.addProperty(H.key,{handler:this.configTrigger,suppressEvent:H.suppressEvent});},destroy:function(K){this._removeEventHandlers();G.superclass.destroy.call(this,K);},configTrigger:function(L,K,N){var M=K[0];if(M){if(this._oTrigger){this._removeEventHandlers();}this._oTrigger=M;I.on(M,A.CONTEXT_MENU,this._onTriggerContextMenu,this,true);if(E.opera){I.on(M,A.CLICK,this._onTriggerClick,this,true);}}else{this._removeEventHandlers();}}});}());YAHOO.widget.ContextMenuItem=YAHOO.widget.MenuItem;(function(){var D=YAHOO.lang,N="static",M="dynamic,"+N,A="disabled",F="selected",B="autosubmenudisplay",G="submenu",C="visible",Q=" ",H="submenutoggleregion",P="MenuBar";YAHOO.widget.MenuBar=function(T,S){YAHOO.widget.MenuBar.superclass.constructor.call(this,T,S);};function O(T){var S=false;if(D.isString(T)){S=(M.indexOf((T.toLowerCase()))!=-1);
}return S;}var R=YAHOO.util.Event,L=YAHOO.widget.MenuBar,K={key:"position",value:N,validator:O,supercedes:[C]},E={key:"submenualignment",value:["tl","bl"]},J={key:B,value:false,validator:D.isBoolean,suppressEvent:true},I={key:H,value:false,validator:D.isBoolean};D.extend(L,YAHOO.widget.Menu,{init:function(T,S){if(!this.ITEM_TYPE){this.ITEM_TYPE=YAHOO.widget.MenuBarItem;}L.superclass.init.call(this,T);this.beforeInitEvent.fire(L);if(S){this.cfg.applyConfig(S,true);}this.initEvent.fire(L);},CSS_CLASS_NAME:"yuimenubar",SUBMENU_TOGGLE_REGION_WIDTH:20,_onKeyDown:function(U,T,Y){var S=T[0],Z=T[1],W,X,V;if(Z&&!Z.cfg.getProperty(A)){X=Z.cfg;switch(S.keyCode){case 37:case 39:if(Z==this.activeItem&&!X.getProperty(F)){X.setProperty(F,true);}else{V=(S.keyCode==37)?Z.getPreviousEnabledSibling():Z.getNextEnabledSibling();if(V){this.clearActiveItem();V.cfg.setProperty(F,true);W=V.cfg.getProperty(G);if(W){W.show();W.setInitialFocus();}else{V.focus();}}}R.preventDefault(S);break;case 40:if(this.activeItem!=Z){this.clearActiveItem();X.setProperty(F,true);Z.focus();}W=X.getProperty(G);if(W){if(W.cfg.getProperty(C)){W.setInitialSelection();W.setInitialFocus();}else{W.show();W.setInitialFocus();}}R.preventDefault(S);break;}}if(S.keyCode==27&&this.activeItem){W=this.activeItem.cfg.getProperty(G);if(W&&W.cfg.getProperty(C)){W.hide();this.activeItem.focus();}else{this.activeItem.cfg.setProperty(F,false);this.activeItem.blur();}R.preventDefault(S);}},_onClick:function(e,Y,b){L.superclass._onClick.call(this,e,Y,b);var d=Y[1],T=true,S,f,U,W,Z,a,c,V;var X=function(){if(a.cfg.getProperty(C)){a.hide();}else{a.show();}};if(d&&!d.cfg.getProperty(A)){f=Y[0];U=R.getTarget(f);W=this.activeItem;Z=this.cfg;if(W&&W!=d){this.clearActiveItem();}d.cfg.setProperty(F,true);a=d.cfg.getProperty(G);if(a){S=d.element;c=YAHOO.util.Dom.getX(S);V=c+(S.offsetWidth-this.SUBMENU_TOGGLE_REGION_WIDTH);if(Z.getProperty(H)){if(R.getPageX(f)>V){X();R.preventDefault(f);T=false;}}else{X();}}}return T;},configSubmenuToggle:function(U,T){var S=T[0];if(S){this.cfg.setProperty(B,false);}},toString:function(){var T=P,S=this.id;if(S){T+=(Q+S);}return T;},initDefaultConfig:function(){L.superclass.initDefaultConfig.call(this);var S=this.cfg;S.addProperty(K.key,{handler:this.configPosition,value:K.value,validator:K.validator,supercedes:K.supercedes});S.addProperty(E.key,{value:E.value,suppressEvent:E.suppressEvent});S.addProperty(J.key,{value:J.value,validator:J.validator,suppressEvent:J.suppressEvent});S.addProperty(I.key,{value:I.value,validator:I.validator,handler:this.configSubmenuToggle});}});}());YAHOO.widget.MenuBarItem=function(B,A){YAHOO.widget.MenuBarItem.superclass.constructor.call(this,B,A);};YAHOO.lang.extend(YAHOO.widget.MenuBarItem,YAHOO.widget.MenuItem,{init:function(B,A){if(!this.SUBMENU_TYPE){this.SUBMENU_TYPE=YAHOO.widget.Menu;}YAHOO.widget.MenuBarItem.superclass.init.call(this,B);var C=this.cfg;if(A){C.applyConfig(A,true);}C.fireQueue();},CSS_CLASS_NAME:"yuimenubaritem",CSS_LABEL_CLASS_NAME:"yuimenubaritemlabel",toString:function(){var A="MenuBarItem";if(this.cfg&&this.cfg.getProperty("text")){A+=(": "+this.cfg.getProperty("text"));}return A;}});YAHOO.register("menu",YAHOO.widget.Menu,{version:"2.9.0",build:"2800"});
//
//../pacotes/yui290/build/dragdrop/dragdrop-min.js
/*
Copyright (c) 2011, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 2.9.0
*/
if(!YAHOO.util.DragDropMgr){YAHOO.util.DragDropMgr=function(){var A=YAHOO.util.Event,B=YAHOO.util.Dom;return{useShim:false,_shimActive:false,_shimState:false,_debugShim:false,_createShim:function(){var C=document.createElement("div");C.id="yui-ddm-shim";if(document.body.firstChild){document.body.insertBefore(C,document.body.firstChild);}else{document.body.appendChild(C);}C.style.display="none";C.style.backgroundColor="red";C.style.position="absolute";C.style.zIndex="99999";B.setStyle(C,"opacity","0");this._shim=C;A.on(C,"mouseup",this.handleMouseUp,this,true);A.on(C,"mousemove",this.handleMouseMove,this,true);A.on(window,"scroll",this._sizeShim,this,true);},_sizeShim:function(){if(this._shimActive){var C=this._shim;C.style.height=B.getDocumentHeight()+"px";C.style.width=B.getDocumentWidth()+"px";C.style.top="0";C.style.left="0";}},_activateShim:function(){if(this.useShim){if(!this._shim){this._createShim();}this._shimActive=true;var C=this._shim,D="0";if(this._debugShim){D=".5";}B.setStyle(C,"opacity",D);this._sizeShim();C.style.display="block";}},_deactivateShim:function(){this._shim.style.display="none";this._shimActive=false;},_shim:null,ids:{},handleIds:{},dragCurrent:null,dragOvers:{},deltaX:0,deltaY:0,preventDefault:true,stopPropagation:true,initialized:false,locked:false,interactionInfo:null,init:function(){this.initialized=true;},POINT:0,INTERSECT:1,STRICT_INTERSECT:2,mode:0,_execOnAll:function(E,D){for(var F in this.ids){for(var C in this.ids[F]){var G=this.ids[F][C];if(!this.isTypeOfDD(G)){continue;}G[E].apply(G,D);}}},_onLoad:function(){this.init();A.on(document,"mouseup",this.handleMouseUp,this,true);A.on(document,"mousemove",this.handleMouseMove,this,true);A.on(window,"unload",this._onUnload,this,true);A.on(window,"resize",this._onResize,this,true);},_onResize:function(C){this._execOnAll("resetConstraints",[]);},lock:function(){this.locked=true;},unlock:function(){this.locked=false;},isLocked:function(){return this.locked;},locationCache:{},useCache:true,clickPixelThresh:3,clickTimeThresh:1000,dragThreshMet:false,clickTimeout:null,startX:0,startY:0,fromTimeout:false,regDragDrop:function(D,C){if(!this.initialized){this.init();}if(!this.ids[C]){this.ids[C]={};}this.ids[C][D.id]=D;},removeDDFromGroup:function(E,C){if(!this.ids[C]){this.ids[C]={};}var D=this.ids[C];if(D&&D[E.id]){delete D[E.id];}},_remove:function(E){for(var D in E.groups){if(D){var C=this.ids[D];if(C&&C[E.id]){delete C[E.id];}}}delete this.handleIds[E.id];},regHandle:function(D,C){if(!this.handleIds[D]){this.handleIds[D]={};}this.handleIds[D][C]=C;},isDragDrop:function(C){return(this.getDDById(C))?true:false;},getRelated:function(H,D){var G=[];for(var F in H.groups){for(var E in this.ids[F]){var C=this.ids[F][E];if(!this.isTypeOfDD(C)){continue;}if(!D||C.isTarget){G[G.length]=C;}}}return G;},isLegalTarget:function(G,F){var D=this.getRelated(G,true);for(var E=0,C=D.length;E<C;++E){if(D[E].id==F.id){return true;}}return false;},isTypeOfDD:function(C){return(C&&C.__ygDragDrop);},isHandle:function(D,C){return(this.handleIds[D]&&this.handleIds[D][C]);},getDDById:function(D){for(var C in this.ids){if(this.ids[C][D]){return this.ids[C][D];}}return null;},handleMouseDown:function(E,D){this.currentTarget=YAHOO.util.Event.getTarget(E);this.dragCurrent=D;var C=D.getEl();this.startX=YAHOO.util.Event.getPageX(E);this.startY=YAHOO.util.Event.getPageY(E);this.deltaX=this.startX-C.offsetLeft;this.deltaY=this.startY-C.offsetTop;this.dragThreshMet=false;this.clickTimeout=setTimeout(function(){var F=YAHOO.util.DDM;F.startDrag(F.startX,F.startY);F.fromTimeout=true;},this.clickTimeThresh);},startDrag:function(C,E){if(this.dragCurrent&&this.dragCurrent.useShim){this._shimState=this.useShim;this.useShim=true;}this._activateShim();clearTimeout(this.clickTimeout);var D=this.dragCurrent;if(D&&D.events.b4StartDrag){D.b4StartDrag(C,E);D.fireEvent("b4StartDragEvent",{x:C,y:E});}if(D&&D.events.startDrag){D.startDrag(C,E);D.fireEvent("startDragEvent",{x:C,y:E});}this.dragThreshMet=true;},handleMouseUp:function(C){if(this.dragCurrent){clearTimeout(this.clickTimeout);if(this.dragThreshMet){if(this.fromTimeout){this.fromTimeout=false;this.handleMouseMove(C);}this.fromTimeout=false;this.fireEvents(C,true);}else{}this.stopDrag(C);this.stopEvent(C);}},stopEvent:function(C){if(this.stopPropagation){YAHOO.util.Event.stopPropagation(C);}if(this.preventDefault){YAHOO.util.Event.preventDefault(C);}},stopDrag:function(E,D){var C=this.dragCurrent;if(C&&!D){if(this.dragThreshMet){if(C.events.b4EndDrag){C.b4EndDrag(E);C.fireEvent("b4EndDragEvent",{e:E});}if(C.events.endDrag){C.endDrag(E);C.fireEvent("endDragEvent",{e:E});}}if(C.events.mouseUp){C.onMouseUp(E);C.fireEvent("mouseUpEvent",{e:E});}}if(this._shimActive){this._deactivateShim();if(this.dragCurrent&&this.dragCurrent.useShim){this.useShim=this._shimState;this._shimState=false;}}this.dragCurrent=null;this.dragOvers={};},handleMouseMove:function(F){var C=this.dragCurrent;if(C){if(YAHOO.env.ua.ie&&(YAHOO.env.ua.ie<9)&&!F.button){this.stopEvent(F);return this.handleMouseUp(F);}else{if(F.clientX<0||F.clientY<0){}}if(!this.dragThreshMet){var E=Math.abs(this.startX-YAHOO.util.Event.getPageX(F));var D=Math.abs(this.startY-YAHOO.util.Event.getPageY(F));if(E>this.clickPixelThresh||D>this.clickPixelThresh){this.startDrag(this.startX,this.startY);}}if(this.dragThreshMet){if(C&&C.events.b4Drag){C.b4Drag(F);C.fireEvent("b4DragEvent",{e:F});}if(C&&C.events.drag){C.onDrag(F);C.fireEvent("dragEvent",{e:F});}if(C){this.fireEvents(F,false);}}this.stopEvent(F);}},fireEvents:function(W,M){var c=this.dragCurrent;if(!c||c.isLocked()||c.dragOnly){return;}var O=YAHOO.util.Event.getPageX(W),N=YAHOO.util.Event.getPageY(W),Q=new YAHOO.util.Point(O,N),K=c.getTargetCoord(Q.x,Q.y),F=c.getDragEl(),E=["out","over","drop","enter"],V=new YAHOO.util.Region(K.y,K.x+F.offsetWidth,K.y+F.offsetHeight,K.x),I=[],D={},L={},R=[],d={outEvts:[],overEvts:[],dropEvts:[],enterEvts:[]};for(var T in this.dragOvers){var f=this.dragOvers[T];if(!this.isTypeOfDD(f)){continue;
}if(!this.isOverTarget(Q,f,this.mode,V)){d.outEvts.push(f);}I[T]=true;delete this.dragOvers[T];}for(var S in c.groups){if("string"!=typeof S){continue;}for(T in this.ids[S]){var G=this.ids[S][T];if(!this.isTypeOfDD(G)){continue;}if(G.isTarget&&!G.isLocked()&&G!=c){if(this.isOverTarget(Q,G,this.mode,V)){D[S]=true;if(M){d.dropEvts.push(G);}else{if(!I[G.id]){d.enterEvts.push(G);}else{d.overEvts.push(G);}this.dragOvers[G.id]=G;}}}}}this.interactionInfo={out:d.outEvts,enter:d.enterEvts,over:d.overEvts,drop:d.dropEvts,point:Q,draggedRegion:V,sourceRegion:this.locationCache[c.id],validDrop:M};for(var C in D){R.push(C);}if(M&&!d.dropEvts.length){this.interactionInfo.validDrop=false;if(c.events.invalidDrop){c.onInvalidDrop(W);c.fireEvent("invalidDropEvent",{e:W});}}for(T=0;T<E.length;T++){var Z=null;if(d[E[T]+"Evts"]){Z=d[E[T]+"Evts"];}if(Z&&Z.length){var H=E[T].charAt(0).toUpperCase()+E[T].substr(1),Y="onDrag"+H,J="b4Drag"+H,P="drag"+H+"Event",X="drag"+H;if(this.mode){if(c.events[J]){c[J](W,Z,R);L[Y]=c.fireEvent(J+"Event",{event:W,info:Z,group:R});}if(c.events[X]&&(L[Y]!==false)){c[Y](W,Z,R);c.fireEvent(P,{event:W,info:Z,group:R});}}else{for(var a=0,U=Z.length;a<U;++a){if(c.events[J]){c[J](W,Z[a].id,R[0]);L[Y]=c.fireEvent(J+"Event",{event:W,info:Z[a].id,group:R[0]});}if(c.events[X]&&(L[Y]!==false)){c[Y](W,Z[a].id,R[0]);c.fireEvent(P,{event:W,info:Z[a].id,group:R[0]});}}}}}},getBestMatch:function(E){var G=null;var D=E.length;if(D==1){G=E[0];}else{for(var F=0;F<D;++F){var C=E[F];if(this.mode==this.INTERSECT&&C.cursorIsOver){G=C;break;}else{if(!G||!G.overlap||(C.overlap&&G.overlap.getArea()<C.overlap.getArea())){G=C;}}}}return G;},refreshCache:function(D){var F=D||this.ids;for(var C in F){if("string"!=typeof C){continue;}for(var E in this.ids[C]){var G=this.ids[C][E];if(this.isTypeOfDD(G)){var H=this.getLocation(G);if(H){this.locationCache[G.id]=H;}else{delete this.locationCache[G.id];}}}}},verifyEl:function(D){try{if(D){var C=D.offsetParent;if(C){return true;}}}catch(E){}return false;},getLocation:function(H){if(!this.isTypeOfDD(H)){return null;}var F=H.getEl(),K,E,D,M,L,N,C,J,G;try{K=YAHOO.util.Dom.getXY(F);}catch(I){}if(!K){return null;}E=K[0];D=E+F.offsetWidth;M=K[1];L=M+F.offsetHeight;N=M-H.padding[0];C=D+H.padding[1];J=L+H.padding[2];G=E-H.padding[3];return new YAHOO.util.Region(N,C,J,G);},isOverTarget:function(K,C,E,F){var G=this.locationCache[C.id];if(!G||!this.useCache){G=this.getLocation(C);this.locationCache[C.id]=G;}if(!G){return false;}C.cursorIsOver=G.contains(K);var J=this.dragCurrent;if(!J||(!E&&!J.constrainX&&!J.constrainY)){return C.cursorIsOver;}C.overlap=null;if(!F){var H=J.getTargetCoord(K.x,K.y);var D=J.getDragEl();F=new YAHOO.util.Region(H.y,H.x+D.offsetWidth,H.y+D.offsetHeight,H.x);}var I=F.intersect(G);if(I){C.overlap=I;return(E)?true:C.cursorIsOver;}else{return false;}},_onUnload:function(D,C){this.unregAll();},unregAll:function(){if(this.dragCurrent){this.stopDrag();this.dragCurrent=null;}this._execOnAll("unreg",[]);this.ids={};},elementCache:{},getElWrapper:function(D){var C=this.elementCache[D];if(!C||!C.el){C=this.elementCache[D]=new this.ElementWrapper(YAHOO.util.Dom.get(D));}return C;},getElement:function(C){return YAHOO.util.Dom.get(C);},getCss:function(D){var C=YAHOO.util.Dom.get(D);return(C)?C.style:null;},ElementWrapper:function(C){this.el=C||null;this.id=this.el&&C.id;this.css=this.el&&C.style;},getPosX:function(C){return YAHOO.util.Dom.getX(C);},getPosY:function(C){return YAHOO.util.Dom.getY(C);},swapNode:function(E,C){if(E.swapNode){E.swapNode(C);}else{var F=C.parentNode;var D=C.nextSibling;if(D==E){F.insertBefore(E,C);}else{if(C==E.nextSibling){F.insertBefore(C,E);}else{E.parentNode.replaceChild(C,E);F.insertBefore(E,D);}}}},getScroll:function(){var E,C,F=document.documentElement,D=document.body;if(F&&(F.scrollTop||F.scrollLeft)){E=F.scrollTop;C=F.scrollLeft;}else{if(D){E=D.scrollTop;C=D.scrollLeft;}else{}}return{top:E,left:C};},getStyle:function(D,C){return YAHOO.util.Dom.getStyle(D,C);},getScrollTop:function(){return this.getScroll().top;},getScrollLeft:function(){return this.getScroll().left;},moveToEl:function(C,E){var D=YAHOO.util.Dom.getXY(E);YAHOO.util.Dom.setXY(C,D);},getClientHeight:function(){return YAHOO.util.Dom.getViewportHeight();},getClientWidth:function(){return YAHOO.util.Dom.getViewportWidth();},numericSort:function(D,C){return(D-C);},_timeoutCount:0,_addListeners:function(){var C=YAHOO.util.DDM;if(YAHOO.util.Event&&document){C._onLoad();}else{if(C._timeoutCount>2000){}else{setTimeout(C._addListeners,10);if(document&&document.body){C._timeoutCount+=1;}}}},handleWasClicked:function(C,E){if(this.isHandle(E,C.id)){return true;}else{var D=C.parentNode;while(D){if(this.isHandle(E,D.id)){return true;}else{D=D.parentNode;}}}return false;}};}();YAHOO.util.DDM=YAHOO.util.DragDropMgr;YAHOO.util.DDM._addListeners();}(function(){var A=YAHOO.util.Event;var B=YAHOO.util.Dom;YAHOO.util.DragDrop=function(E,C,D){if(E){this.init(E,C,D);}};YAHOO.util.DragDrop.prototype={events:null,on:function(){this.subscribe.apply(this,arguments);},id:null,config:null,dragElId:null,handleElId:null,invalidHandleTypes:null,invalidHandleIds:null,invalidHandleClasses:null,startPageX:0,startPageY:0,groups:null,locked:false,lock:function(){this.locked=true;},unlock:function(){this.locked=false;},isTarget:true,padding:null,dragOnly:false,useShim:false,_domRef:null,__ygDragDrop:true,constrainX:false,constrainY:false,minX:0,maxX:0,minY:0,maxY:0,deltaX:0,deltaY:0,maintainOffset:false,xTicks:null,yTicks:null,primaryButtonOnly:true,available:false,hasOuterHandles:false,cursorIsOver:false,overlap:null,b4StartDrag:function(C,D){},startDrag:function(C,D){},b4Drag:function(C){},onDrag:function(C){},onDragEnter:function(C,D){},b4DragOver:function(C){},onDragOver:function(C,D){},b4DragOut:function(C){},onDragOut:function(C,D){},b4DragDrop:function(C){},onDragDrop:function(C,D){},onInvalidDrop:function(C){},b4EndDrag:function(C){},endDrag:function(C){},b4MouseDown:function(C){},onMouseDown:function(C){},onMouseUp:function(C){},onAvailable:function(){},getEl:function(){if(!this._domRef){this._domRef=B.get(this.id);
}return this._domRef;},getDragEl:function(){return B.get(this.dragElId);},init:function(F,C,D){this.initTarget(F,C,D);A.on(this._domRef||this.id,"mousedown",this.handleMouseDown,this,true);for(var E in this.events){this.createEvent(E+"Event");}},initTarget:function(E,C,D){this.config=D||{};this.events={};this.DDM=YAHOO.util.DDM;this.groups={};if(typeof E!=="string"){this._domRef=E;E=B.generateId(E);}this.id=E;this.addToGroup((C)?C:"default");this.handleElId=E;A.onAvailable(E,this.handleOnAvailable,this,true);this.setDragElId(E);this.invalidHandleTypes={A:"A"};this.invalidHandleIds={};this.invalidHandleClasses=[];this.applyConfig();},applyConfig:function(){this.events={mouseDown:true,b4MouseDown:true,mouseUp:true,b4StartDrag:true,startDrag:true,b4EndDrag:true,endDrag:true,drag:true,b4Drag:true,invalidDrop:true,b4DragOut:true,dragOut:true,dragEnter:true,b4DragOver:true,dragOver:true,b4DragDrop:true,dragDrop:true};if(this.config.events){for(var C in this.config.events){if(this.config.events[C]===false){this.events[C]=false;}}}this.padding=this.config.padding||[0,0,0,0];this.isTarget=(this.config.isTarget!==false);this.maintainOffset=(this.config.maintainOffset);this.primaryButtonOnly=(this.config.primaryButtonOnly!==false);this.dragOnly=((this.config.dragOnly===true)?true:false);this.useShim=((this.config.useShim===true)?true:false);},handleOnAvailable:function(){this.available=true;this.resetConstraints();this.onAvailable();},setPadding:function(E,C,F,D){if(!C&&0!==C){this.padding=[E,E,E,E];}else{if(!F&&0!==F){this.padding=[E,C,E,C];}else{this.padding=[E,C,F,D];}}},setInitPosition:function(F,E){var G=this.getEl();if(!this.DDM.verifyEl(G)){if(G&&G.style&&(G.style.display=="none")){}else{}return;}var D=F||0;var C=E||0;var H=B.getXY(G);this.initPageX=H[0]-D;this.initPageY=H[1]-C;this.lastPageX=H[0];this.lastPageY=H[1];this.setStartPosition(H);},setStartPosition:function(D){var C=D||B.getXY(this.getEl());this.deltaSetXY=null;this.startPageX=C[0];this.startPageY=C[1];},addToGroup:function(C){this.groups[C]=true;this.DDM.regDragDrop(this,C);},removeFromGroup:function(C){if(this.groups[C]){delete this.groups[C];}this.DDM.removeDDFromGroup(this,C);},setDragElId:function(C){this.dragElId=C;},setHandleElId:function(C){if(typeof C!=="string"){C=B.generateId(C);}this.handleElId=C;this.DDM.regHandle(this.id,C);},setOuterHandleElId:function(C){if(typeof C!=="string"){C=B.generateId(C);}A.on(C,"mousedown",this.handleMouseDown,this,true);this.setHandleElId(C);this.hasOuterHandles=true;},unreg:function(){A.removeListener(this.id,"mousedown",this.handleMouseDown);this._domRef=null;this.DDM._remove(this);},isLocked:function(){return(this.DDM.isLocked()||this.locked);},handleMouseDown:function(J,I){var D=J.which||J.button;if(this.primaryButtonOnly&&D>1){return;}if(this.isLocked()){return;}var C=this.b4MouseDown(J),F=true;if(this.events.b4MouseDown){F=this.fireEvent("b4MouseDownEvent",J);}var E=this.onMouseDown(J),H=true;if(this.events.mouseDown){if(E===false){H=false;}else{H=this.fireEvent("mouseDownEvent",J);}}if((C===false)||(E===false)||(F===false)||(H===false)){return;}this.DDM.refreshCache(this.groups);var G=new YAHOO.util.Point(A.getPageX(J),A.getPageY(J));if(!this.hasOuterHandles&&!this.DDM.isOverTarget(G,this)){}else{if(this.clickValidator(J)){this.setStartPosition();this.DDM.handleMouseDown(J,this);this.DDM.stopEvent(J);}else{}}},clickValidator:function(D){var C=YAHOO.util.Event.getTarget(D);return(this.isValidHandleChild(C)&&(this.id==this.handleElId||this.DDM.handleWasClicked(C,this.id)));},getTargetCoord:function(E,D){var C=E-this.deltaX;var F=D-this.deltaY;if(this.constrainX){if(C<this.minX){C=this.minX;}if(C>this.maxX){C=this.maxX;}}if(this.constrainY){if(F<this.minY){F=this.minY;}if(F>this.maxY){F=this.maxY;}}C=this.getTick(C,this.xTicks);F=this.getTick(F,this.yTicks);return{x:C,y:F};},addInvalidHandleType:function(C){var D=C.toUpperCase();this.invalidHandleTypes[D]=D;},addInvalidHandleId:function(C){if(typeof C!=="string"){C=B.generateId(C);}this.invalidHandleIds[C]=C;},addInvalidHandleClass:function(C){this.invalidHandleClasses.push(C);},removeInvalidHandleType:function(C){var D=C.toUpperCase();delete this.invalidHandleTypes[D];},removeInvalidHandleId:function(C){if(typeof C!=="string"){C=B.generateId(C);}delete this.invalidHandleIds[C];},removeInvalidHandleClass:function(D){for(var E=0,C=this.invalidHandleClasses.length;E<C;++E){if(this.invalidHandleClasses[E]==D){delete this.invalidHandleClasses[E];}}},isValidHandleChild:function(F){var E=true;var H;try{H=F.nodeName.toUpperCase();}catch(G){H=F.nodeName;}E=E&&!this.invalidHandleTypes[H];E=E&&!this.invalidHandleIds[F.id];for(var D=0,C=this.invalidHandleClasses.length;E&&D<C;++D){E=!B.hasClass(F,this.invalidHandleClasses[D]);}return E;},setXTicks:function(F,C){this.xTicks=[];this.xTickSize=C;var E={};for(var D=this.initPageX;D>=this.minX;D=D-C){if(!E[D]){this.xTicks[this.xTicks.length]=D;E[D]=true;}}for(D=this.initPageX;D<=this.maxX;D=D+C){if(!E[D]){this.xTicks[this.xTicks.length]=D;E[D]=true;}}this.xTicks.sort(this.DDM.numericSort);},setYTicks:function(F,C){this.yTicks=[];this.yTickSize=C;var E={};for(var D=this.initPageY;D>=this.minY;D=D-C){if(!E[D]){this.yTicks[this.yTicks.length]=D;E[D]=true;}}for(D=this.initPageY;D<=this.maxY;D=D+C){if(!E[D]){this.yTicks[this.yTicks.length]=D;E[D]=true;}}this.yTicks.sort(this.DDM.numericSort);},setXConstraint:function(E,D,C){this.leftConstraint=parseInt(E,10);this.rightConstraint=parseInt(D,10);this.minX=this.initPageX-this.leftConstraint;this.maxX=this.initPageX+this.rightConstraint;if(C){this.setXTicks(this.initPageX,C);}this.constrainX=true;},clearConstraints:function(){this.constrainX=false;this.constrainY=false;this.clearTicks();},clearTicks:function(){this.xTicks=null;this.yTicks=null;this.xTickSize=0;this.yTickSize=0;},setYConstraint:function(C,E,D){this.topConstraint=parseInt(C,10);this.bottomConstraint=parseInt(E,10);this.minY=this.initPageY-this.topConstraint;this.maxY=this.initPageY+this.bottomConstraint;
if(D){this.setYTicks(this.initPageY,D);}this.constrainY=true;},resetConstraints:function(){if(this.initPageX||this.initPageX===0){var D=(this.maintainOffset)?this.lastPageX-this.initPageX:0;var C=(this.maintainOffset)?this.lastPageY-this.initPageY:0;this.setInitPosition(D,C);}else{this.setInitPosition();}if(this.constrainX){this.setXConstraint(this.leftConstraint,this.rightConstraint,this.xTickSize);}if(this.constrainY){this.setYConstraint(this.topConstraint,this.bottomConstraint,this.yTickSize);}},getTick:function(I,F){if(!F){return I;}else{if(F[0]>=I){return F[0];}else{for(var D=0,C=F.length;D<C;++D){var E=D+1;if(F[E]&&F[E]>=I){var H=I-F[D];var G=F[E]-I;return(G>H)?F[D]:F[E];}}return F[F.length-1];}}},toString:function(){return("DragDrop "+this.id);}};YAHOO.augment(YAHOO.util.DragDrop,YAHOO.util.EventProvider);})();YAHOO.util.DD=function(C,A,B){if(C){this.init(C,A,B);}};YAHOO.extend(YAHOO.util.DD,YAHOO.util.DragDrop,{scroll:true,autoOffset:function(C,B){var A=C-this.startPageX;var D=B-this.startPageY;this.setDelta(A,D);},setDelta:function(B,A){this.deltaX=B;this.deltaY=A;},setDragElPos:function(C,B){var A=this.getDragEl();this.alignElWithMouse(A,C,B);},alignElWithMouse:function(C,G,F){var E=this.getTargetCoord(G,F);if(!this.deltaSetXY){var H=[E.x,E.y];YAHOO.util.Dom.setXY(C,H);var D=parseInt(YAHOO.util.Dom.getStyle(C,"left"),10);var B=parseInt(YAHOO.util.Dom.getStyle(C,"top"),10);this.deltaSetXY=[D-E.x,B-E.y];}else{YAHOO.util.Dom.setStyle(C,"left",(E.x+this.deltaSetXY[0])+"px");YAHOO.util.Dom.setStyle(C,"top",(E.y+this.deltaSetXY[1])+"px");}this.cachePosition(E.x,E.y);var A=this;setTimeout(function(){A.autoScroll.call(A,E.x,E.y,C.offsetHeight,C.offsetWidth);},0);},cachePosition:function(B,A){if(B){this.lastPageX=B;this.lastPageY=A;}else{var C=YAHOO.util.Dom.getXY(this.getEl());this.lastPageX=C[0];this.lastPageY=C[1];}},autoScroll:function(J,I,E,K){if(this.scroll){var L=this.DDM.getClientHeight();var B=this.DDM.getClientWidth();var N=this.DDM.getScrollTop();var D=this.DDM.getScrollLeft();var H=E+I;var M=K+J;var G=(L+N-I-this.deltaY);var F=(B+D-J-this.deltaX);var C=40;var A=(document.all)?80:30;if(H>L&&G<C){window.scrollTo(D,N+A);}if(I<N&&N>0&&I-N<C){window.scrollTo(D,N-A);}if(M>B&&F<C){window.scrollTo(D+A,N);}if(J<D&&D>0&&J-D<C){window.scrollTo(D-A,N);}}},applyConfig:function(){YAHOO.util.DD.superclass.applyConfig.call(this);this.scroll=(this.config.scroll!==false);},b4MouseDown:function(A){this.setStartPosition();this.autoOffset(YAHOO.util.Event.getPageX(A),YAHOO.util.Event.getPageY(A));},b4Drag:function(A){this.setDragElPos(YAHOO.util.Event.getPageX(A),YAHOO.util.Event.getPageY(A));},toString:function(){return("DD "+this.id);}});YAHOO.util.DDProxy=function(C,A,B){if(C){this.init(C,A,B);this.initFrame();}};YAHOO.util.DDProxy.dragElId="ygddfdiv";YAHOO.extend(YAHOO.util.DDProxy,YAHOO.util.DD,{resizeFrame:true,centerFrame:false,createFrame:function(){var B=this,A=document.body;if(!A||!A.firstChild){setTimeout(function(){B.createFrame();},50);return;}var F=this.getDragEl(),E=YAHOO.util.Dom;if(!F){F=document.createElement("div");F.id=this.dragElId;var D=F.style;D.position="absolute";D.visibility="hidden";D.cursor="move";D.border="2px solid #aaa";D.zIndex=999;D.height="25px";D.width="25px";var C=document.createElement("div");E.setStyle(C,"height","100%");E.setStyle(C,"width","100%");E.setStyle(C,"background-color","#ccc");E.setStyle(C,"opacity","0");F.appendChild(C);A.insertBefore(F,A.firstChild);}},initFrame:function(){this.createFrame();},applyConfig:function(){YAHOO.util.DDProxy.superclass.applyConfig.call(this);this.resizeFrame=(this.config.resizeFrame!==false);this.centerFrame=(this.config.centerFrame);this.setDragElId(this.config.dragElId||YAHOO.util.DDProxy.dragElId);},showFrame:function(E,D){var C=this.getEl();var A=this.getDragEl();var B=A.style;this._resizeProxy();if(this.centerFrame){this.setDelta(Math.round(parseInt(B.width,10)/2),Math.round(parseInt(B.height,10)/2));}this.setDragElPos(E,D);YAHOO.util.Dom.setStyle(A,"visibility","visible");},_resizeProxy:function(){if(this.resizeFrame){var H=YAHOO.util.Dom;var B=this.getEl();var C=this.getDragEl();var G=parseInt(H.getStyle(C,"borderTopWidth"),10);var I=parseInt(H.getStyle(C,"borderRightWidth"),10);var F=parseInt(H.getStyle(C,"borderBottomWidth"),10);var D=parseInt(H.getStyle(C,"borderLeftWidth"),10);if(isNaN(G)){G=0;}if(isNaN(I)){I=0;}if(isNaN(F)){F=0;}if(isNaN(D)){D=0;}var E=Math.max(0,B.offsetWidth-I-D);var A=Math.max(0,B.offsetHeight-G-F);H.setStyle(C,"width",E+"px");H.setStyle(C,"height",A+"px");}},b4MouseDown:function(B){this.setStartPosition();var A=YAHOO.util.Event.getPageX(B);var C=YAHOO.util.Event.getPageY(B);this.autoOffset(A,C);},b4StartDrag:function(A,B){this.showFrame(A,B);},b4EndDrag:function(A){YAHOO.util.Dom.setStyle(this.getDragEl(),"visibility","hidden");},endDrag:function(D){var C=YAHOO.util.Dom;var B=this.getEl();var A=this.getDragEl();C.setStyle(A,"visibility","");C.setStyle(B,"visibility","hidden");YAHOO.util.DDM.moveToEl(B,A);C.setStyle(A,"visibility","hidden");C.setStyle(B,"visibility","");},toString:function(){return("DDProxy "+this.id);}});YAHOO.util.DDTarget=function(C,A,B){if(C){this.initTarget(C,A,B);}};YAHOO.extend(YAHOO.util.DDTarget,YAHOO.util.DragDrop,{toString:function(){return("DDTarget "+this.id);}});YAHOO.register("dragdrop",YAHOO.util.DragDropMgr,{version:"2.9.0",build:"2800"});
//
//../pacotes/yui290/build/animation/animation-min270.js
/*
Copyright (c) 2009, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
version: 2.7.0
*/
(function(){var B=YAHOO.util;var A=function(D,C,E,F){if(!D){}this.init(D,C,E,F);};A.NAME="Anim";A.prototype={toString:function(){var C=this.getEl()||{};var D=C.id||C.tagName;return(this.constructor.NAME+": "+D);},patterns:{noNegatives:/width|height|opacity|padding/i,offsetAttribute:/^((width|height)|(top|left))$/,defaultUnit:/width|height|top$|bottom$|left$|right$/i,offsetUnit:/\d+(em|%|en|ex|pt|in|cm|mm|pc)$/i},doMethod:function(C,E,D){return this.method(this.currentFrame,E,D-E,this.totalFrames);},setAttribute:function(C,F,E){var D=this.getEl();if(this.patterns.noNegatives.test(C)){F=(F>0)?F:0;}if("style" in D){B.Dom.setStyle(D,C,F+E);}else{if(C in D){D[C]=F;}}},getAttribute:function(C){var E=this.getEl();var G=B.Dom.getStyle(E,C);if(G!=="auto"&&!this.patterns.offsetUnit.test(G)){return parseFloat(G);}var D=this.patterns.offsetAttribute.exec(C)||[];var H=!!(D[3]);var F=!!(D[2]);if("style" in E){if(F||(B.Dom.getStyle(E,"position")=="absolute"&&H)){G=E["offset"+D[0].charAt(0).toUpperCase()+D[0].substr(1)];}else{G=0;}}else{if(C in E){G=E[C];}}return G;},getDefaultUnit:function(C){if(this.patterns.defaultUnit.test(C)){return"px";}return"";},setRuntimeAttribute:function(D){var I;var E;var F=this.attributes;this.runtimeAttributes[D]={};var H=function(J){return(typeof J!=="undefined");};if(!H(F[D]["to"])&&!H(F[D]["by"])){return false;}I=(H(F[D]["from"]))?F[D]["from"]:this.getAttribute(D);if(H(F[D]["to"])){E=F[D]["to"];}else{if(H(F[D]["by"])){if(I.constructor==Array){E=[];for(var G=0,C=I.length;G<C;++G){E[G]=I[G]+F[D]["by"][G]*1;}}else{E=I+F[D]["by"]*1;}}}this.runtimeAttributes[D].start=I;this.runtimeAttributes[D].end=E;this.runtimeAttributes[D].unit=(H(F[D].unit))?F[D]["unit"]:this.getDefaultUnit(D);return true;},init:function(E,J,I,C){var D=false;var F=null;var H=0;E=B.Dom.get(E);this.attributes=J||{};this.duration=!YAHOO.lang.isUndefined(I)?I:1;this.method=C||B.Easing.easeNone;this.useSeconds=true;this.currentFrame=0;this.totalFrames=B.AnimMgr.fps;this.setEl=function(M){E=B.Dom.get(M);};this.getEl=function(){return E;};this.isAnimated=function(){return D;};this.getStartTime=function(){return F;};this.runtimeAttributes={};this.animate=function(){if(this.isAnimated()){return false;}this.currentFrame=0;this.totalFrames=(this.useSeconds)?Math.ceil(B.AnimMgr.fps*this.duration):this.duration;if(this.duration===0&&this.useSeconds){this.totalFrames=1;}B.AnimMgr.registerElement(this);return true;};this.stop=function(M){if(!this.isAnimated()){return false;}if(M){this.currentFrame=this.totalFrames;this._onTween.fire();}B.AnimMgr.stop(this);};var L=function(){this.onStart.fire();this.runtimeAttributes={};for(var M in this.attributes){this.setRuntimeAttribute(M);}D=true;H=0;F=new Date();};var K=function(){var O={duration:new Date()-this.getStartTime(),currentFrame:this.currentFrame};O.toString=function(){return("duration: "+O.duration+", currentFrame: "+O.currentFrame);};this.onTween.fire(O);var N=this.runtimeAttributes;for(var M in N){this.setAttribute(M,this.doMethod(M,N[M].start,N[M].end),N[M].unit);}H+=1;};var G=function(){var M=(new Date()-F)/1000;var N={duration:M,frames:H,fps:H/M};N.toString=function(){return("duration: "+N.duration+", frames: "+N.frames+", fps: "+N.fps);};D=false;H=0;this.onComplete.fire(N);};this._onStart=new B.CustomEvent("_start",this,true);this.onStart=new B.CustomEvent("start",this);this.onTween=new B.CustomEvent("tween",this);this._onTween=new B.CustomEvent("_tween",this,true);this.onComplete=new B.CustomEvent("complete",this);this._onComplete=new B.CustomEvent("_complete",this,true);this._onStart.subscribe(L);this._onTween.subscribe(K);this._onComplete.subscribe(G);}};B.Anim=A;})();YAHOO.util.AnimMgr=new function(){var C=null;var B=[];var A=0;this.fps=1000;this.delay=1;this.registerElement=function(F){B[B.length]=F;A+=1;F._onStart.fire();this.start();};this.unRegister=function(G,F){F=F||E(G);if(!G.isAnimated()||F==-1){return false;}G._onComplete.fire();B.splice(F,1);A-=1;if(A<=0){this.stop();}return true;};this.start=function(){if(C===null){C=setInterval(this.run,this.delay);}};this.stop=function(H){if(!H){clearInterval(C);for(var G=0,F=B.length;G<F;++G){this.unRegister(B[0],0);}B=[];C=null;A=0;}else{this.unRegister(H);}};this.run=function(){for(var H=0,F=B.length;H<F;++H){var G=B[H];if(!G||!G.isAnimated()){continue;}if(G.currentFrame<G.totalFrames||G.totalFrames===null){G.currentFrame+=1;if(G.useSeconds){D(G);}G._onTween.fire();}else{YAHOO.util.AnimMgr.stop(G,H);}}};var E=function(H){for(var G=0,F=B.length;G<F;++G){if(B[G]==H){return G;}}return -1;};var D=function(G){var J=G.totalFrames;var I=G.currentFrame;var H=(G.currentFrame*G.duration*1000/G.totalFrames);var F=(new Date()-G.getStartTime());var K=0;if(F<G.duration*1000){K=Math.round((F/H-1)*G.currentFrame);}else{K=J-(I+1);}if(K>0&&isFinite(K)){if(G.currentFrame+K>=J){K=J-(I+1);}G.currentFrame+=K;}};};YAHOO.util.Bezier=new function(){this.getPosition=function(E,D){var F=E.length;var C=[];for(var B=0;B<F;++B){C[B]=[E[B][0],E[B][1]];}for(var A=1;A<F;++A){for(B=0;B<F-A;++B){C[B][0]=(1-D)*C[B][0]+D*C[parseInt(B+1,10)][0];C[B][1]=(1-D)*C[B][1]+D*C[parseInt(B+1,10)][1];}}return[C[0][0],C[0][1]];};};(function(){var A=function(F,E,G,H){A.superclass.constructor.call(this,F,E,G,H);};A.NAME="ColorAnim";A.DEFAULT_BGCOLOR="#fff";var C=YAHOO.util;YAHOO.extend(A,C.Anim);var D=A.superclass;var B=A.prototype;B.patterns.color=/color$/i;B.patterns.rgb=/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i;B.patterns.hex=/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i;B.patterns.hex3=/^#?([0-9A-F]{1})([0-9A-F]{1})([0-9A-F]{1})$/i;B.patterns.transparent=/^transparent|rgba\(0, 0, 0, 0\)$/;B.parseColor=function(E){if(E.length==3){return E;}var F=this.patterns.hex.exec(E);if(F&&F.length==4){return[parseInt(F[1],16),parseInt(F[2],16),parseInt(F[3],16)];}F=this.patterns.rgb.exec(E);if(F&&F.length==4){return[parseInt(F[1],10),parseInt(F[2],10),parseInt(F[3],10)];}F=this.patterns.hex3.exec(E);if(F&&F.length==4){return[parseInt(F[1]+F[1],16),parseInt(F[2]+F[2],16),parseInt(F[3]+F[3],16)];
}return null;};B.getAttribute=function(E){var G=this.getEl();if(this.patterns.color.test(E)){var I=YAHOO.util.Dom.getStyle(G,E);var H=this;if(this.patterns.transparent.test(I)){var F=YAHOO.util.Dom.getAncestorBy(G,function(J){return !H.patterns.transparent.test(I);});if(F){I=C.Dom.getStyle(F,E);}else{I=A.DEFAULT_BGCOLOR;}}}else{I=D.getAttribute.call(this,E);}return I;};B.doMethod=function(F,J,G){var I;if(this.patterns.color.test(F)){I=[];for(var H=0,E=J.length;H<E;++H){I[H]=D.doMethod.call(this,F,J[H],G[H]);}I="rgb("+Math.floor(I[0])+","+Math.floor(I[1])+","+Math.floor(I[2])+")";}else{I=D.doMethod.call(this,F,J,G);}return I;};B.setRuntimeAttribute=function(F){D.setRuntimeAttribute.call(this,F);if(this.patterns.color.test(F)){var H=this.attributes;var J=this.parseColor(this.runtimeAttributes[F].start);var G=this.parseColor(this.runtimeAttributes[F].end);if(typeof H[F]["to"]==="undefined"&&typeof H[F]["by"]!=="undefined"){G=this.parseColor(H[F].by);for(var I=0,E=J.length;I<E;++I){G[I]=J[I]+G[I];}}this.runtimeAttributes[F].start=J;this.runtimeAttributes[F].end=G;}};C.ColorAnim=A;})();
/*
TERMS OF USE - EASING EQUATIONS
Open source under the BSD License.
Copyright 2001 Robert Penner All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
* Neither the name of the author nor the names of contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
YAHOO.util.Easing={easeNone:function(B,A,D,C){return D*B/C+A;},easeIn:function(B,A,D,C){return D*(B/=C)*B+A;},easeOut:function(B,A,D,C){return -D*(B/=C)*(B-2)+A;},easeBoth:function(B,A,D,C){if((B/=C/2)<1){return D/2*B*B+A;}return -D/2*((--B)*(B-2)-1)+A;},easeInStrong:function(B,A,D,C){return D*(B/=C)*B*B*B+A;},easeOutStrong:function(B,A,D,C){return -D*((B=B/C-1)*B*B*B-1)+A;},easeBothStrong:function(B,A,D,C){if((B/=C/2)<1){return D/2*B*B*B*B+A;}return -D/2*((B-=2)*B*B*B-2)+A;},elasticIn:function(C,A,G,F,B,E){if(C==0){return A;}if((C/=F)==1){return A+G;}if(!E){E=F*0.3;}if(!B||B<Math.abs(G)){B=G;var D=E/4;}else{var D=E/(2*Math.PI)*Math.asin(G/B);}return -(B*Math.pow(2,10*(C-=1))*Math.sin((C*F-D)*(2*Math.PI)/E))+A;},elasticOut:function(C,A,G,F,B,E){if(C==0){return A;}if((C/=F)==1){return A+G;}if(!E){E=F*0.3;}if(!B||B<Math.abs(G)){B=G;var D=E/4;}else{var D=E/(2*Math.PI)*Math.asin(G/B);}return B*Math.pow(2,-10*C)*Math.sin((C*F-D)*(2*Math.PI)/E)+G+A;},elasticBoth:function(C,A,G,F,B,E){if(C==0){return A;}if((C/=F/2)==2){return A+G;}if(!E){E=F*(0.3*1.5);}if(!B||B<Math.abs(G)){B=G;var D=E/4;}else{var D=E/(2*Math.PI)*Math.asin(G/B);}if(C<1){return -0.5*(B*Math.pow(2,10*(C-=1))*Math.sin((C*F-D)*(2*Math.PI)/E))+A;}return B*Math.pow(2,-10*(C-=1))*Math.sin((C*F-D)*(2*Math.PI)/E)*0.5+G+A;},backIn:function(B,A,E,D,C){if(typeof C=="undefined"){C=1.70158;}return E*(B/=D)*B*((C+1)*B-C)+A;},backOut:function(B,A,E,D,C){if(typeof C=="undefined"){C=1.70158;}return E*((B=B/D-1)*B*((C+1)*B+C)+1)+A;},backBoth:function(B,A,E,D,C){if(typeof C=="undefined"){C=1.70158;}if((B/=D/2)<1){return E/2*(B*B*(((C*=(1.525))+1)*B-C))+A;}return E/2*((B-=2)*B*(((C*=(1.525))+1)*B+C)+2)+A;},bounceIn:function(B,A,D,C){return D-YAHOO.util.Easing.bounceOut(C-B,0,D,C)+A;},bounceOut:function(B,A,D,C){if((B/=C)<(1/2.75)){return D*(7.5625*B*B)+A;}else{if(B<(2/2.75)){return D*(7.5625*(B-=(1.5/2.75))*B+0.75)+A;}else{if(B<(2.5/2.75)){return D*(7.5625*(B-=(2.25/2.75))*B+0.9375)+A;}}}return D*(7.5625*(B-=(2.625/2.75))*B+0.984375)+A;},bounceBoth:function(B,A,D,C){if(B<C/2){return YAHOO.util.Easing.bounceIn(B*2,0,D,C)*0.5+A;}return YAHOO.util.Easing.bounceOut(B*2-C,0,D,C)*0.5+D*0.5+A;}};(function(){var A=function(H,G,I,J){if(H){A.superclass.constructor.call(this,H,G,I,J);}};A.NAME="Motion";var E=YAHOO.util;YAHOO.extend(A,E.ColorAnim);var F=A.superclass;var C=A.prototype;C.patterns.points=/^points$/i;C.setAttribute=function(G,I,H){if(this.patterns.points.test(G)){H=H||"px";F.setAttribute.call(this,"left",I[0],H);F.setAttribute.call(this,"top",I[1],H);}else{F.setAttribute.call(this,G,I,H);}};C.getAttribute=function(G){if(this.patterns.points.test(G)){var H=[F.getAttribute.call(this,"left"),F.getAttribute.call(this,"top")];}else{H=F.getAttribute.call(this,G);}return H;};C.doMethod=function(G,K,H){var J=null;if(this.patterns.points.test(G)){var I=this.method(this.currentFrame,0,100,this.totalFrames)/100;J=E.Bezier.getPosition(this.runtimeAttributes[G],I);}else{J=F.doMethod.call(this,G,K,H);}return J;};C.setRuntimeAttribute=function(P){if(this.patterns.points.test(P)){var H=this.getEl();var J=this.attributes;var G;var L=J["points"]["control"]||[];var I;var M,O;if(L.length>0&&!(L[0] instanceof Array)){L=[L];}else{var K=[];for(M=0,O=L.length;M<O;++M){K[M]=L[M];}L=K;}if(E.Dom.getStyle(H,"position")=="static"){E.Dom.setStyle(H,"position","relative");}if(D(J["points"]["from"])){E.Dom.setXY(H,J["points"]["from"]);
}else{E.Dom.setXY(H,E.Dom.getXY(H));}G=this.getAttribute("points");if(D(J["points"]["to"])){I=B.call(this,J["points"]["to"],G);var N=E.Dom.getXY(this.getEl());for(M=0,O=L.length;M<O;++M){L[M]=B.call(this,L[M],G);}}else{if(D(J["points"]["by"])){I=[G[0]+J["points"]["by"][0],G[1]+J["points"]["by"][1]];for(M=0,O=L.length;M<O;++M){L[M]=[G[0]+L[M][0],G[1]+L[M][1]];}}}this.runtimeAttributes[P]=[G];if(L.length>0){this.runtimeAttributes[P]=this.runtimeAttributes[P].concat(L);}this.runtimeAttributes[P][this.runtimeAttributes[P].length]=I;}else{F.setRuntimeAttribute.call(this,P);}};var B=function(G,I){var H=E.Dom.getXY(this.getEl());G=[G[0]-H[0]+I[0],G[1]-H[1]+I[1]];return G;};var D=function(G){return(typeof G!=="undefined");};E.Motion=A;})();(function(){var D=function(F,E,G,H){if(F){D.superclass.constructor.call(this,F,E,G,H);}};D.NAME="Scroll";var B=YAHOO.util;YAHOO.extend(D,B.ColorAnim);var C=D.superclass;var A=D.prototype;A.doMethod=function(E,H,F){var G=null;if(E=="scroll"){G=[this.method(this.currentFrame,H[0],F[0]-H[0],this.totalFrames),this.method(this.currentFrame,H[1],F[1]-H[1],this.totalFrames)];}else{G=C.doMethod.call(this,E,H,F);}return G;};A.getAttribute=function(E){var G=null;var F=this.getEl();if(E=="scroll"){G=[F.scrollLeft,F.scrollTop];}else{G=C.getAttribute.call(this,E);}return G;};A.setAttribute=function(E,H,G){var F=this.getEl();if(E=="scroll"){F.scrollLeft=H[0];F.scrollTop=H[1];}else{C.setAttribute.call(this,E,H,G);}};B.Scroll=D;})();YAHOO.register("animation",YAHOO.util.Anim,{version:"2.7.0",build:"1799"});
//
//../pacotes/yui290/build/container/container_compacto.js
(function(){YAHOO.util.Config=function(owner){if(owner){this.init(owner)}};var Lang=YAHOO.lang,CustomEvent=YAHOO.util.CustomEvent,Config=YAHOO.util.Config;Config.CONFIG_CHANGED_EVENT="configChanged";Config.BOOLEAN_TYPE="boolean";Config.prototype={owner:null,queueInProgress:false,config:null,initialConfig:null,eventQueue:null,configChangedEvent:null,init:function(owner){this.owner=owner;this.configChangedEvent=this.createEvent(Config.CONFIG_CHANGED_EVENT);this.configChangedEvent.signature=CustomEvent.LIST;this.queueInProgress=false;this.config={};this.initialConfig={};this.eventQueue=[]},checkBoolean:function(val){return(typeof val==Config.BOOLEAN_TYPE)},checkNumber:function(val){return(!isNaN(val))},fireEvent:function(key,value){var property=this.config[key];if(property&&property.event){property.event.fire(value)}},addProperty:function(key,propertyObject){key=key.toLowerCase();this.config[key]=propertyObject;propertyObject.event=this.createEvent(key,{scope:this.owner});propertyObject.event.signature=CustomEvent.LIST;propertyObject.key=key;if(propertyObject.handler){propertyObject.event.subscribe(propertyObject.handler,this.owner)}this.setProperty(key,propertyObject.value,true);if(!propertyObject.suppressEvent){this.queueProperty(key,propertyObject.value)}},getConfig:function(){var cfg={},currCfg=this.config,prop,property;for(prop in currCfg){if(Lang.hasOwnProperty(currCfg,prop)){property=currCfg[prop];if(property&&property.event){cfg[prop]=property.value}}}return cfg},getProperty:function(key){var property=this.config[key.toLowerCase()];if(property&&property.event){return property.value}else{return undefined}},resetProperty:function(key){key=key.toLowerCase();var property=this.config[key];if(property&&property.event){if(key in this.initialConfig){this.setProperty(key,this.initialConfig[key]);return true}}else{return false}},setProperty:function(key,value,silent){var property;key=key.toLowerCase();if(this.queueInProgress&&!silent){this.queueProperty(key,value);return true}else{property=this.config[key];if(property&&property.event){if(property.validator&&!property.validator(value)){return false}else{property.value=value;if(!silent){this.fireEvent(key,value);this.configChangedEvent.fire([key,value])}return true}}else{return false}}},queueProperty:function(key,value){key=key.toLowerCase();var property=this.config[key],foundDuplicate=false,iLen,queueItem,queueItemKey,queueItemValue,sLen,supercedesCheck,qLen,queueItemCheck,queueItemCheckKey,queueItemCheckValue,i,s,q;if(property&&property.event){if(!Lang.isUndefined(value)&&property.validator&&!property.validator(value)){return false}else{if(!Lang.isUndefined(value)){property.value=value}else{value=property.value}foundDuplicate=false;iLen=this.eventQueue.length;for(i=0;i<iLen;i++){queueItem=this.eventQueue[i];if(queueItem){queueItemKey=queueItem[0];queueItemValue=queueItem[1];if(queueItemKey==key){this.eventQueue[i]=null;this.eventQueue.push([key,(!Lang.isUndefined(value)?value:queueItemValue)]);foundDuplicate=true;break}}}if(!foundDuplicate&&!Lang.isUndefined(value)){this.eventQueue.push([key,value])}}if(property.supercedes){sLen=property.supercedes.length;for(s=0;s<sLen;s++){supercedesCheck=property.supercedes[s];qLen=this.eventQueue.length;for(q=0;q<qLen;q++){queueItemCheck=this.eventQueue[q];if(queueItemCheck){queueItemCheckKey=queueItemCheck[0];queueItemCheckValue=queueItemCheck[1];if(queueItemCheckKey==supercedesCheck.toLowerCase()){this.eventQueue.push([queueItemCheckKey,queueItemCheckValue]);this.eventQueue[q]=null;break}}}}}return true}else{return false}},refireEvent:function(key){key=key.toLowerCase();var property=this.config[key];if(property&&property.event&&!Lang.isUndefined(property.value)){if(this.queueInProgress){this.queueProperty(key)}else{this.fireEvent(key,property.value)}}},applyConfig:function(userConfig,init){var sKey,oConfig;if(init){oConfig={};for(sKey in userConfig){if(Lang.hasOwnProperty(userConfig,sKey)){oConfig[sKey.toLowerCase()]=userConfig[sKey]}}this.initialConfig=oConfig}for(sKey in userConfig){if(Lang.hasOwnProperty(userConfig,sKey)){this.queueProperty(sKey,userConfig[sKey])}}},refresh:function(){var prop;for(prop in this.config){if(Lang.hasOwnProperty(this.config,prop)){this.refireEvent(prop)}}},fireQueue:function(){var i,queueItem,key,value,property;this.queueInProgress=true;for(i=0;i<this.eventQueue.length;i++){queueItem=this.eventQueue[i];if(queueItem){key=queueItem[0];value=queueItem[1];property=this.config[key];property.value=value;this.eventQueue[i]=null;this.fireEvent(key,value)}}this.queueInProgress=false;this.eventQueue=[]},subscribeToConfigEvent:function(key,handler,obj,overrideContext){var property=this.config[key.toLowerCase()];if(property&&property.event){if(!Config.alreadySubscribed(property.event,handler,obj)){property.event.subscribe(handler,obj,overrideContext)}return true}else{return false}},unsubscribeFromConfigEvent:function(key,handler,obj){var property=this.config[key.toLowerCase()];if(property&&property.event){return property.event.unsubscribe(handler,obj)}else{return false}},toString:function(){var output="Config";if(this.owner){output+=" ["+this.owner.toString()+"]"}return output},outputEventQueue:function(){var output="",queueItem,q,nQueue=this.eventQueue.length;for(q=0;q<nQueue;q++){queueItem=this.eventQueue[q];if(queueItem){output+=queueItem[0]+"="+queueItem[1]+", "}}return output},destroy:function(){var oConfig=this.config,sProperty,oProperty;for(sProperty in oConfig){if(Lang.hasOwnProperty(oConfig,sProperty)){oProperty=oConfig[sProperty];oProperty.event.unsubscribeAll();oProperty.event=null}}this.configChangedEvent.unsubscribeAll();this.configChangedEvent=null;this.owner=null;this.config=null;this.initialConfig=null;this.eventQueue=null}};Config.alreadySubscribed=function(evt,fn,obj){var nSubscribers=evt.subscribers.length,subsc,i;if(nSubscribers>0){i=nSubscribers-1;do{subsc=evt.subscribers[i];if(subsc&&subsc.obj==obj&&subsc.fn==fn){return true}}while(i--)}return false};YAHOO.lang.augmentProto(Config,YAHOO.util.EventProvider)}());(function(){YAHOO.widget.Module=function(el,userConfig){if(el){this.init(el,userConfig)}else{}};var Dom=YAHOO.util.Dom,Config=YAHOO.util.Config,Event=YAHOO.util.Event,CustomEvent=YAHOO.util.CustomEvent,Module=YAHOO.widget.Module,UA=YAHOO.env.ua,m_oModuleTemplate,m_oHeaderTemplate,m_oBodyTemplate,m_oFooterTemplate,EVENT_TYPES={"BEFORE_INIT":"beforeInit","INIT":"init","APPEND":"append","BEFORE_RENDER":"beforeRender","RENDER":"render","CHANGE_HEADER":"changeHeader","CHANGE_BODY":"changeBody","CHANGE_FOOTER":"changeFooter","CHANGE_CONTENT":"changeContent","DESTROY":"destroy","BEFORE_SHOW":"beforeShow","SHOW":"show","BEFORE_HIDE":"beforeHide","HIDE":"hide"},DEFAULT_CONFIG={"VISIBLE":{key:"visible",value:true,validator:YAHOO.lang.isBoolean},"EFFECT":{key:"effect",suppressEvent:true,supercedes:["visible"]},"MONITOR_RESIZE":{key:"monitorresize",value:true},"APPEND_TO_DOCUMENT_BODY":{key:"appendtodocumentbody",value:false}};Module.IMG_ROOT=null;Module.IMG_ROOT_SSL=null;Module.CSS_MODULE="yui-module";Module.CSS_HEADER="hd";Module.CSS_BODY="bd";Module.CSS_FOOTER="ft";Module.RESIZE_MONITOR_SECURE_URL="javascript:false;";Module.RESIZE_MONITOR_BUFFER=1;Module.textResizeEvent=new CustomEvent("textResize");Module.forceDocumentRedraw=function(){var docEl=document.documentElement;if(docEl){docEl.className+=" ";docEl.className=YAHOO.lang.trim(docEl.className)}};function createModuleTemplate(){if(!m_oModuleTemplate){m_oModuleTemplate=document.createElement("div");m_oModuleTemplate.innerHTML=("<div class=\""+Module.CSS_HEADER+"\"></div>"+"<div class=\""+Module.CSS_BODY+"\"></div><div class=\""+Module.CSS_FOOTER+"\"></div>");m_oHeaderTemplate=m_oModuleTemplate.firstChild;m_oBodyTemplate=m_oHeaderTemplate.nextSibling;m_oFooterTemplate=m_oBodyTemplate.nextSibling}return m_oModuleTemplate}function createHeader(){if(!m_oHeaderTemplate){createModuleTemplate()}return(m_oHeaderTemplate.cloneNode(false))}function createBody(){if(!m_oBodyTemplate){createModuleTemplate()}return(m_oBodyTemplate.cloneNode(false))}function createFooter(){if(!m_oFooterTemplate){createModuleTemplate()}return(m_oFooterTemplate.cloneNode(false))}Module.prototype={constructor:Module,element:null,header:null,body:null,footer:null,id:null,imageRoot:Module.IMG_ROOT,initEvents:function(){var SIGNATURE=CustomEvent.LIST;this.beforeInitEvent=this.createEvent(EVENT_TYPES.BEFORE_INIT);this.beforeInitEvent.signature=SIGNATURE;this.initEvent=this.createEvent(EVENT_TYPES.INIT);this.initEvent.signature=SIGNATURE;this.appendEvent=this.createEvent(EVENT_TYPES.APPEND);this.appendEvent.signature=SIGNATURE;this.beforeRenderEvent=this.createEvent(EVENT_TYPES.BEFORE_RENDER);this.beforeRenderEvent.signature=SIGNATURE;this.renderEvent=this.createEvent(EVENT_TYPES.RENDER);this.renderEvent.signature=SIGNATURE;this.changeHeaderEvent=this.createEvent(EVENT_TYPES.CHANGE_HEADER);this.changeHeaderEvent.signature=SIGNATURE;this.changeBodyEvent=this.createEvent(EVENT_TYPES.CHANGE_BODY);this.changeBodyEvent.signature=SIGNATURE;this.changeFooterEvent=this.createEvent(EVENT_TYPES.CHANGE_FOOTER);this.changeFooterEvent.signature=SIGNATURE;this.changeContentEvent=this.createEvent(EVENT_TYPES.CHANGE_CONTENT);this.changeContentEvent.signature=SIGNATURE;this.destroyEvent=this.createEvent(EVENT_TYPES.DESTROY);this.destroyEvent.signature=SIGNATURE;this.beforeShowEvent=this.createEvent(EVENT_TYPES.BEFORE_SHOW);this.beforeShowEvent.signature=SIGNATURE;this.showEvent=this.createEvent(EVENT_TYPES.SHOW);this.showEvent.signature=SIGNATURE;this.beforeHideEvent=this.createEvent(EVENT_TYPES.BEFORE_HIDE);this.beforeHideEvent.signature=SIGNATURE;this.hideEvent=this.createEvent(EVENT_TYPES.HIDE);this.hideEvent.signature=SIGNATURE},platform:function(){var ua=navigator.userAgent.toLowerCase();if(ua.indexOf("windows")!=-1||ua.indexOf("win32")!=-1){return"windows"}else if(ua.indexOf("macintosh")!=-1){return"mac"}else{return false}}(),browser:function(){var ua=navigator.userAgent.toLowerCase();if(ua.indexOf('opera')!=-1){return'opera'}else if(ua.indexOf('msie 7')!=-1){return'ie7'}else if(ua.indexOf('msie')!=-1){return'ie'}else if(ua.indexOf('safari')!=-1){return'safari'}else if(ua.indexOf('gecko')!=-1){return'gecko'}else{return false}}(),isSecure:function(){if(window.location.href.toLowerCase().indexOf("https")===0){return true}else{return false}}(),initDefaultConfig:function(){this.cfg.addProperty(DEFAULT_CONFIG.VISIBLE.key,{handler:this.configVisible,value:DEFAULT_CONFIG.VISIBLE.value,validator:DEFAULT_CONFIG.VISIBLE.validator});this.cfg.addProperty(DEFAULT_CONFIG.EFFECT.key,{handler:this.configEffect,suppressEvent:DEFAULT_CONFIG.EFFECT.suppressEvent,supercedes:DEFAULT_CONFIG.EFFECT.supercedes});this.cfg.addProperty(DEFAULT_CONFIG.MONITOR_RESIZE.key,{handler:this.configMonitorResize,value:DEFAULT_CONFIG.MONITOR_RESIZE.value});this.cfg.addProperty(DEFAULT_CONFIG.APPEND_TO_DOCUMENT_BODY.key,{value:DEFAULT_CONFIG.APPEND_TO_DOCUMENT_BODY.value})},init:function(el,userConfig){var elId,child;this.initEvents();this.beforeInitEvent.fire(Module);this.cfg=new Config(this);if(this.isSecure){this.imageRoot=Module.IMG_ROOT_SSL}if(typeof el=="string"){elId=el;el=document.getElementById(el);if(!el){el=(createModuleTemplate()).cloneNode(false);el.id=elId}}this.id=Dom.generateId(el);this.element=el;child=this.element.firstChild;if(child){var fndHd=false,fndBd=false,fndFt=false;do{if(1==child.nodeType){if(!fndHd&&Dom.hasClass(child,Module.CSS_HEADER)){this.header=child;fndHd=true}else if(!fndBd&&Dom.hasClass(child,Module.CSS_BODY)){this.body=child;fndBd=true}else if(!fndFt&&Dom.hasClass(child,Module.CSS_FOOTER)){this.footer=child;fndFt=true}}}while((child=child.nextSibling))}this.initDefaultConfig();Dom.addClass(this.element,Module.CSS_MODULE);if(userConfig){this.cfg.applyConfig(userConfig,true)}if(!Config.alreadySubscribed(this.renderEvent,this.cfg.fireQueue,this.cfg)){this.renderEvent.subscribe(this.cfg.fireQueue,this.cfg,true)}this.initEvent.fire(Module)},initResizeMonitor:function(){var isGeckoWin=(UA.gecko&&this.platform=="windows");if(isGeckoWin){var self=this;setTimeout(function(){self._initResizeMonitor()},0)}else{this._initResizeMonitor()}},_initResizeMonitor:function(){var oDoc,oIFrame,sHTML;function fireTextResize(){Module.textResizeEvent.fire()}if(!UA.opera){oIFrame=Dom.get("_yuiResizeMonitor");var supportsCWResize=this._supportsCWResize();if(!oIFrame){oIFrame=document.createElement("iframe");if(this.isSecure&&Module.RESIZE_MONITOR_SECURE_URL&&UA.ie){oIFrame.src=Module.RESIZE_MONITOR_SECURE_URL}if(!supportsCWResize){sHTML=["<html><head><script ","type=\"text/javascript\">","window.onresize=function(){window.parent.","YAHOO.widget.Module.textResizeEvent.","fire();};<","\/script></head>","<body></body></html>"].join('');oIFrame.src="data:text/html;charset=utf-8,"+encodeURIComponent(sHTML)}oIFrame.id="_yuiResizeMonitor";oIFrame.title="Text Resize Monitor";oIFrame.tabIndex=-1;oIFrame.setAttribute("role","presentation");oIFrame.style.position="absolute";oIFrame.style.visibility="hidden";var db=document.body,fc=db.firstChild;if(fc){db.insertBefore(oIFrame,fc)}else{db.appendChild(oIFrame)}oIFrame.style.backgroundColor="transparent";oIFrame.style.borderWidth="0";oIFrame.style.width="2em";oIFrame.style.height="2em";oIFrame.style.left="0";oIFrame.style.top=(-1*(oIFrame.offsetHeight+Module.RESIZE_MONITOR_BUFFER))+"px";oIFrame.style.visibility="visible";if(UA.webkit){oDoc=oIFrame.contentWindow.document;oDoc.open();oDoc.close()}}if(oIFrame&&oIFrame.contentWindow){Module.textResizeEvent.subscribe(this.onDomResize,this,true);if(!Module.textResizeInitialized){if(supportsCWResize){if(!Event.on(oIFrame.contentWindow,"resize",fireTextResize)){Event.on(oIFrame,"resize",fireTextResize)}}Module.textResizeInitialized=true}this.resizeMonitor=oIFrame}}},_supportsCWResize:function(){var bSupported=true;if(UA.gecko&&UA.gecko<=1.8){bSupported=false}return bSupported},onDomResize:function(e,obj){var nTop=-1*(this.resizeMonitor.offsetHeight+Module.RESIZE_MONITOR_BUFFER);this.resizeMonitor.style.top=nTop+"px";this.resizeMonitor.style.left="0"},setHeader:function(headerContent){var oHeader=this.header||(this.header=createHeader());if(headerContent.nodeName){oHeader.innerHTML="";oHeader.appendChild(headerContent)}else{oHeader.innerHTML=headerContent}if(this._rendered){this._renderHeader()}this.changeHeaderEvent.fire(headerContent);this.changeContentEvent.fire()},appendToHeader:function(element){var oHeader=this.header||(this.header=createHeader());oHeader.appendChild(element);this.changeHeaderEvent.fire(element);this.changeContentEvent.fire()},setBody:function(bodyContent){var oBody=this.body||(this.body=createBody());if(bodyContent.nodeName){oBody.innerHTML="";oBody.appendChild(bodyContent)}else{oBody.innerHTML=bodyContent}if(this._rendered){this._renderBody()}this.changeBodyEvent.fire(bodyContent);this.changeContentEvent.fire()},appendToBody:function(element){var oBody=this.body||(this.body=createBody());oBody.appendChild(element);this.changeBodyEvent.fire(element);this.changeContentEvent.fire()},setFooter:function(footerContent){var oFooter=this.footer||(this.footer=createFooter());if(footerContent.nodeName){oFooter.innerHTML="";oFooter.appendChild(footerContent)}else{oFooter.innerHTML=footerContent}if(this._rendered){this._renderFooter()}this.changeFooterEvent.fire(footerContent);this.changeContentEvent.fire()},appendToFooter:function(element){var oFooter=this.footer||(this.footer=createFooter());oFooter.appendChild(element);this.changeFooterEvent.fire(element);this.changeContentEvent.fire()},render:function(appendToNode,moduleElement){var me=this;function appendTo(parentNode){if(typeof parentNode=="string"){parentNode=document.getElementById(parentNode)}if(parentNode){me._addToParent(parentNode,me.element);me.appendEvent.fire()}}this.beforeRenderEvent.fire();if(!moduleElement){moduleElement=this.element}if(appendToNode){appendTo(appendToNode)}else{if(!Dom.inDocument(this.element)){return false}}this._renderHeader(moduleElement);this._renderBody(moduleElement);this._renderFooter(moduleElement);this._rendered=true;this.renderEvent.fire();return true},_renderHeader:function(moduleElement){moduleElement=moduleElement||this.element;if(this.header&&!Dom.inDocument(this.header)){var firstChild=moduleElement.firstChild;if(firstChild){moduleElement.insertBefore(this.header,firstChild)}else{moduleElement.appendChild(this.header)}}},_renderBody:function(moduleElement){moduleElement=moduleElement||this.element;if(this.body&&!Dom.inDocument(this.body)){if(this.footer&&Dom.isAncestor(moduleElement,this.footer)){moduleElement.insertBefore(this.body,this.footer)}else{moduleElement.appendChild(this.body)}}},_renderFooter:function(moduleElement){moduleElement=moduleElement||this.element;if(this.footer&&!Dom.inDocument(this.footer)){moduleElement.appendChild(this.footer)}},destroy:function(shallowPurge){var parent,purgeChildren=!(shallowPurge);if(this.element){Event.purgeElement(this.element,purgeChildren);parent=this.element.parentNode}if(parent){parent.removeChild(this.element)}this.element=null;this.header=null;this.body=null;this.footer=null;Module.textResizeEvent.unsubscribe(this.onDomResize,this);this.cfg.destroy();this.cfg=null;this.destroyEvent.fire()},show:function(){this.cfg.setProperty("visible",true)},hide:function(){this.cfg.setProperty("visible",false)},configVisible:function(type,args,obj){var visible=args[0];if(visible){if(this.beforeShowEvent.fire()){Dom.setStyle(this.element,"display","block");this.showEvent.fire()}}else{if(this.beforeHideEvent.fire()){Dom.setStyle(this.element,"display","none");this.hideEvent.fire()}}},configEffect:function(type,args,obj){this._cachedEffects=(this.cacheEffects)?this._createEffects(args[0]):null},cacheEffects:true,_createEffects:function(effectCfg){var effectInstances=null,n,i,eff;if(effectCfg){if(effectCfg instanceof Array){effectInstances=[];n=effectCfg.length;for(i=0;i<n;i++){eff=effectCfg[i];if(eff.effect){effectInstances[effectInstances.length]=eff.effect(this,eff.duration)}}}else if(effectCfg.effect){effectInstances=[effectCfg.effect(this,effectCfg.duration)]}}return effectInstances},configMonitorResize:function(type,args,obj){var monitor=args[0];if(monitor){this.initResizeMonitor()}else{Module.textResizeEvent.unsubscribe(this.onDomResize,this,true);this.resizeMonitor=null}},_addToParent:function(parentNode,element){if(!this.cfg.getProperty("appendtodocumentbody")&&parentNode===document.body&&parentNode.firstChild){parentNode.insertBefore(element,parentNode.firstChild)}else{parentNode.appendChild(element)}},toString:function(){return"Module "+this.id}};YAHOO.lang.augmentProto(Module,YAHOO.util.EventProvider)}());(function(){YAHOO.widget.Overlay=function(el,userConfig){YAHOO.widget.Overlay.superclass.constructor.call(this,el,userConfig)};var Lang=YAHOO.lang,CustomEvent=YAHOO.util.CustomEvent,Module=YAHOO.widget.Module,Event=YAHOO.util.Event,Dom=YAHOO.util.Dom,Config=YAHOO.util.Config,UA=YAHOO.env.ua,Overlay=YAHOO.widget.Overlay,_SUBSCRIBE="subscribe",_UNSUBSCRIBE="unsubscribe",_CONTAINED="contained",m_oIFrameTemplate,EVENT_TYPES={"BEFORE_MOVE":"beforeMove","MOVE":"move"},DEFAULT_CONFIG={"X":{key:"x",validator:Lang.isNumber,suppressEvent:true,supercedes:["iframe"]},"Y":{key:"y",validator:Lang.isNumber,suppressEvent:true,supercedes:["iframe"]},"XY":{key:"xy",suppressEvent:true,supercedes:["iframe"]},"CONTEXT":{key:"context",suppressEvent:true,supercedes:["iframe"]},"FIXED_CENTER":{key:"fixedcenter",value:false,supercedes:["iframe","visible"]},"WIDTH":{key:"width",suppressEvent:true,supercedes:["context","fixedcenter","iframe"]},"HEIGHT":{key:"height",suppressEvent:true,supercedes:["context","fixedcenter","iframe"]},"AUTO_FILL_HEIGHT":{key:"autofillheight",supercedes:["height"],value:"body"},"ZINDEX":{key:"zindex",value:null},"CONSTRAIN_TO_VIEWPORT":{key:"constraintoviewport",value:false,validator:Lang.isBoolean,supercedes:["iframe","x","y","xy"]},"IFRAME":{key:"iframe",value:(UA.ie==6?true:false),validator:Lang.isBoolean,supercedes:["zindex"]},"PREVENT_CONTEXT_OVERLAP":{key:"preventcontextoverlap",value:false,validator:Lang.isBoolean,supercedes:["constraintoviewport"]}};Overlay.IFRAME_SRC="javascript:false;";Overlay.IFRAME_OFFSET=3;Overlay.VIEWPORT_OFFSET=10;Overlay.TOP_LEFT="tl";Overlay.TOP_RIGHT="tr";Overlay.BOTTOM_LEFT="bl";Overlay.BOTTOM_RIGHT="br";Overlay.PREVENT_OVERLAP_X={"tltr":true,"blbr":true,"brbl":true,"trtl":true};Overlay.PREVENT_OVERLAP_Y={"trbr":true,"tlbl":true,"bltl":true,"brtr":true};Overlay.CSS_OVERLAY="yui-overlay";Overlay.CSS_HIDDEN="yui-overlay-hidden";Overlay.CSS_IFRAME="yui-overlay-iframe";Overlay.STD_MOD_RE=/^\s*?(body|footer|header)\s*?$/i;Overlay.windowScrollEvent=new CustomEvent("windowScroll");Overlay.windowResizeEvent=new CustomEvent("windowResize");Overlay.windowScrollHandler=function(e){var t=Event.getTarget(e);if(!t||t===window||t===window.document){if(UA.ie){if(!window.scrollEnd){window.scrollEnd=-1}clearTimeout(window.scrollEnd);window.scrollEnd=setTimeout(function(){Overlay.windowScrollEvent.fire()},1)}else{Overlay.windowScrollEvent.fire()}}};Overlay.windowResizeHandler=function(e){if(UA.ie){if(!window.resizeEnd){window.resizeEnd=-1}clearTimeout(window.resizeEnd);window.resizeEnd=setTimeout(function(){Overlay.windowResizeEvent.fire()},100)}else{Overlay.windowResizeEvent.fire()}};Overlay._initialized=null;if(Overlay._initialized===null){Event.on(window,"scroll",Overlay.windowScrollHandler);Event.on(window,"resize",Overlay.windowResizeHandler);Overlay._initialized=true}Overlay._TRIGGER_MAP={"windowScroll":Overlay.windowScrollEvent,"windowResize":Overlay.windowResizeEvent,"textResize":Module.textResizeEvent};YAHOO.extend(Overlay,Module,{CONTEXT_TRIGGERS:[],init:function(el,userConfig){Overlay.superclass.init.call(this,el);this.beforeInitEvent.fire(Overlay);Dom.addClass(this.element,Overlay.CSS_OVERLAY);if(userConfig){this.cfg.applyConfig(userConfig,true)}if(this.platform=="mac"&&UA.gecko){if(!Config.alreadySubscribed(this.showEvent,this.showMacGeckoScrollbars,this)){this.showEvent.subscribe(this.showMacGeckoScrollbars,this,true)}if(!Config.alreadySubscribed(this.hideEvent,this.hideMacGeckoScrollbars,this)){this.hideEvent.subscribe(this.hideMacGeckoScrollbars,this,true)}}this.initEvent.fire(Overlay)},initEvents:function(){Overlay.superclass.initEvents.call(this);var SIGNATURE=CustomEvent.LIST;this.beforeMoveEvent=this.createEvent(EVENT_TYPES.BEFORE_MOVE);this.beforeMoveEvent.signature=SIGNATURE;this.moveEvent=this.createEvent(EVENT_TYPES.MOVE);this.moveEvent.signature=SIGNATURE},initDefaultConfig:function(){Overlay.superclass.initDefaultConfig.call(this);var cfg=this.cfg;cfg.addProperty(DEFAULT_CONFIG.X.key,{handler:this.configX,validator:DEFAULT_CONFIG.X.validator,suppressEvent:DEFAULT_CONFIG.X.suppressEvent,supercedes:DEFAULT_CONFIG.X.supercedes});cfg.addProperty(DEFAULT_CONFIG.Y.key,{handler:this.configY,validator:DEFAULT_CONFIG.Y.validator,suppressEvent:DEFAULT_CONFIG.Y.suppressEvent,supercedes:DEFAULT_CONFIG.Y.supercedes});cfg.addProperty(DEFAULT_CONFIG.XY.key,{handler:this.configXY,suppressEvent:DEFAULT_CONFIG.XY.suppressEvent,supercedes:DEFAULT_CONFIG.XY.supercedes});cfg.addProperty(DEFAULT_CONFIG.CONTEXT.key,{handler:this.configContext,suppressEvent:DEFAULT_CONFIG.CONTEXT.suppressEvent,supercedes:DEFAULT_CONFIG.CONTEXT.supercedes});cfg.addProperty(DEFAULT_CONFIG.FIXED_CENTER.key,{handler:this.configFixedCenter,value:DEFAULT_CONFIG.FIXED_CENTER.value,validator:DEFAULT_CONFIG.FIXED_CENTER.validator,supercedes:DEFAULT_CONFIG.FIXED_CENTER.supercedes});cfg.addProperty(DEFAULT_CONFIG.WIDTH.key,{handler:this.configWidth,suppressEvent:DEFAULT_CONFIG.WIDTH.suppressEvent,supercedes:DEFAULT_CONFIG.WIDTH.supercedes});cfg.addProperty(DEFAULT_CONFIG.HEIGHT.key,{handler:this.configHeight,suppressEvent:DEFAULT_CONFIG.HEIGHT.suppressEvent,supercedes:DEFAULT_CONFIG.HEIGHT.supercedes});cfg.addProperty(DEFAULT_CONFIG.AUTO_FILL_HEIGHT.key,{handler:this.configAutoFillHeight,value:DEFAULT_CONFIG.AUTO_FILL_HEIGHT.value,validator:this._validateAutoFill,supercedes:DEFAULT_CONFIG.AUTO_FILL_HEIGHT.supercedes});cfg.addProperty(DEFAULT_CONFIG.ZINDEX.key,{handler:this.configzIndex,value:DEFAULT_CONFIG.ZINDEX.value});cfg.addProperty(DEFAULT_CONFIG.CONSTRAIN_TO_VIEWPORT.key,{handler:this.configConstrainToViewport,value:DEFAULT_CONFIG.CONSTRAIN_TO_VIEWPORT.value,validator:DEFAULT_CONFIG.CONSTRAIN_TO_VIEWPORT.validator,supercedes:DEFAULT_CONFIG.CONSTRAIN_TO_VIEWPORT.supercedes});cfg.addProperty(DEFAULT_CONFIG.IFRAME.key,{handler:this.configIframe,value:DEFAULT_CONFIG.IFRAME.value,validator:DEFAULT_CONFIG.IFRAME.validator,supercedes:DEFAULT_CONFIG.IFRAME.supercedes});cfg.addProperty(DEFAULT_CONFIG.PREVENT_CONTEXT_OVERLAP.key,{value:DEFAULT_CONFIG.PREVENT_CONTEXT_OVERLAP.value,validator:DEFAULT_CONFIG.PREVENT_CONTEXT_OVERLAP.validator,supercedes:DEFAULT_CONFIG.PREVENT_CONTEXT_OVERLAP.supercedes})},moveTo:function(x,y){this.cfg.setProperty("xy",[x,y])},hideMacGeckoScrollbars:function(){Dom.replaceClass(this.element,"show-scrollbars","hide-scrollbars")},showMacGeckoScrollbars:function(){Dom.replaceClass(this.element,"hide-scrollbars","show-scrollbars")},_setDomVisibility:function(show){Dom.setStyle(this.element,"visibility",(show)?"visible":"hidden");var hiddenClass=Overlay.CSS_HIDDEN;if(show){Dom.removeClass(this.element,hiddenClass)}else{Dom.addClass(this.element,hiddenClass)}},configVisible:function(type,args,obj){var visible=args[0],currentVis=Dom.getStyle(this.element,"visibility"),effects=this._cachedEffects||this._createEffects(this.cfg.getProperty("effect")),isMacGecko=(this.platform=="mac"&&UA.gecko),alreadySubscribed=Config.alreadySubscribed,ei,e,j,k,h,nEffectInstances;if(currentVis=="inherit"){e=this.element.parentNode;while(e.nodeType!=9&&e.nodeType!=11){currentVis=Dom.getStyle(e,"visibility");if(currentVis!="inherit"){break}e=e.parentNode}if(currentVis=="inherit"){currentVis="visible"}}if(visible){if(isMacGecko){this.showMacGeckoScrollbars()}if(effects){if(visible){if(currentVis!="visible"||currentVis===""||this._fadingOut){if(this.beforeShowEvent.fire()){nEffectInstances=effects.length;for(j=0;j<nEffectInstances;j++){ei=effects[j];if(j===0&&!alreadySubscribed(ei.animateInCompleteEvent,this.showEvent.fire,this.showEvent)){ei.animateInCompleteEvent.subscribe(this.showEvent.fire,this.showEvent,true)}ei.animateIn()}}}}}else{if(currentVis!="visible"||currentVis===""){if(this.beforeShowEvent.fire()){this._setDomVisibility(true);this.cfg.refireEvent("iframe");this.showEvent.fire()}}else{this._setDomVisibility(true)}}}else{if(isMacGecko){this.hideMacGeckoScrollbars()}if(effects){if(currentVis=="visible"||this._fadingIn){if(this.beforeHideEvent.fire()){nEffectInstances=effects.length;for(k=0;k<nEffectInstances;k++){h=effects[k];if(k===0&&!alreadySubscribed(h.animateOutCompleteEvent,this.hideEvent.fire,this.hideEvent)){h.animateOutCompleteEvent.subscribe(this.hideEvent.fire,this.hideEvent,true)}h.animateOut()}}}else if(currentVis===""){this._setDomVisibility(false)}}else{if(currentVis=="visible"||currentVis===""){if(this.beforeHideEvent.fire()){this._setDomVisibility(false);this.hideEvent.fire()}}else{this._setDomVisibility(false)}}}},doCenterOnDOMEvent:function(){var cfg=this.cfg,fc=cfg.getProperty("fixedcenter");if(cfg.getProperty("visible")){if(fc&&(fc!==_CONTAINED||this.fitsInViewport())){this.center()}}},fitsInViewport:function(){var nViewportOffset=Overlay.VIEWPORT_OFFSET,element=this.element,elementWidth=element.offsetWidth,elementHeight=element.offsetHeight,viewportWidth=Dom.getViewportWidth(),viewportHeight=Dom.getViewportHeight();return((elementWidth+nViewportOffset<viewportWidth)&&(elementHeight+nViewportOffset<viewportHeight))},configFixedCenter:function(type,args,obj){var val=args[0],alreadySubscribed=Config.alreadySubscribed,windowResizeEvent=Overlay.windowResizeEvent,windowScrollEvent=Overlay.windowScrollEvent;if(val){this.center();if(!alreadySubscribed(this.beforeShowEvent,this.center)){this.beforeShowEvent.subscribe(this.center)}if(!alreadySubscribed(windowResizeEvent,this.doCenterOnDOMEvent,this)){windowResizeEvent.subscribe(this.doCenterOnDOMEvent,this,true)}if(!alreadySubscribed(windowScrollEvent,this.doCenterOnDOMEvent,this)){windowScrollEvent.subscribe(this.doCenterOnDOMEvent,this,true)}}else{this.beforeShowEvent.unsubscribe(this.center);windowResizeEvent.unsubscribe(this.doCenterOnDOMEvent,this);windowScrollEvent.unsubscribe(this.doCenterOnDOMEvent,this)}},configHeight:function(type,args,obj){var height=args[0],el=this.element;Dom.setStyle(el,"height",height);this.cfg.refireEvent("iframe")},configAutoFillHeight:function(type,args,obj){var fillEl=args[0],cfg=this.cfg,autoFillHeight="autofillheight",height="height",currEl=cfg.getProperty(autoFillHeight),autoFill=this._autoFillOnHeightChange;cfg.unsubscribeFromConfigEvent(height,autoFill);Module.textResizeEvent.unsubscribe(autoFill);this.changeContentEvent.unsubscribe(autoFill);if(currEl&&fillEl!==currEl&&this[currEl]){Dom.setStyle(this[currEl],height,"")}if(fillEl){fillEl=Lang.trim(fillEl.toLowerCase());cfg.subscribeToConfigEvent(height,autoFill,this[fillEl],this);Module.textResizeEvent.subscribe(autoFill,this[fillEl],this);this.changeContentEvent.subscribe(autoFill,this[fillEl],this);cfg.setProperty(autoFillHeight,fillEl,true)}},configWidth:function(type,args,obj){var width=args[0],el=this.element;Dom.setStyle(el,"width",width);this.cfg.refireEvent("iframe")},configzIndex:function(type,args,obj){var zIndex=args[0],el=this.element;if(!zIndex){zIndex=Dom.getStyle(el,"zIndex");if(!zIndex||isNaN(zIndex)){zIndex=0}}if(this.iframe||this.cfg.getProperty("iframe")===true){if(zIndex<=0){zIndex=1}}Dom.setStyle(el,"zIndex",zIndex);this.cfg.setProperty("zIndex",zIndex,true);if(this.iframe){this.stackIframe()}},configXY:function(type,args,obj){var pos=args[0],x=pos[0],y=pos[1];this.cfg.setProperty("x",x);this.cfg.setProperty("y",y);this.beforeMoveEvent.fire([x,y]);x=this.cfg.getProperty("x");y=this.cfg.getProperty("y");this.cfg.refireEvent("iframe");this.moveEvent.fire([x,y])},configX:function(type,args,obj){var x=args[0],y=this.cfg.getProperty("y");this.cfg.setProperty("x",x,true);this.cfg.setProperty("y",y,true);this.beforeMoveEvent.fire([x,y]);x=this.cfg.getProperty("x");y=this.cfg.getProperty("y");Dom.setX(this.element,x,true);this.cfg.setProperty("xy",[x,y],true);this.cfg.refireEvent("iframe");this.moveEvent.fire([x,y])},configY:function(type,args,obj){var x=this.cfg.getProperty("x"),y=args[0];this.cfg.setProperty("x",x,true);this.cfg.setProperty("y",y,true);this.beforeMoveEvent.fire([x,y]);x=this.cfg.getProperty("x");y=this.cfg.getProperty("y");Dom.setY(this.element,y,true);this.cfg.setProperty("xy",[x,y],true);this.cfg.refireEvent("iframe");this.moveEvent.fire([x,y])},showIframe:function(){var oIFrame=this.iframe,oParentNode;if(oIFrame){oParentNode=this.element.parentNode;if(oParentNode!=oIFrame.parentNode){this._addToParent(oParentNode,oIFrame)}oIFrame.style.display="block"}},hideIframe:function(){if(this.iframe){this.iframe.style.display="none"}},syncIframe:function(){var oIFrame=this.iframe,oElement=this.element,nOffset=Overlay.IFRAME_OFFSET,nDimensionOffset=(nOffset*2),aXY;if(oIFrame){oIFrame.style.width=(oElement.offsetWidth+nDimensionOffset+"px");oIFrame.style.height=(oElement.offsetHeight+nDimensionOffset+"px");aXY=this.cfg.getProperty("xy");if(!Lang.isArray(aXY)||(isNaN(aXY[0])||isNaN(aXY[1]))){this.syncPosition();aXY=this.cfg.getProperty("xy")}Dom.setXY(oIFrame,[(aXY[0]-nOffset),(aXY[1]-nOffset)])}},stackIframe:function(){if(this.iframe){var overlayZ=Dom.getStyle(this.element,"zIndex");if(!YAHOO.lang.isUndefined(overlayZ)&&!isNaN(overlayZ)){Dom.setStyle(this.iframe,"zIndex",(overlayZ-1))}}},configIframe:function(type,args,obj){var bIFrame=args[0];function createIFrame(){var oIFrame=this.iframe,oElement=this.element,oParent;if(!oIFrame){if(!m_oIFrameTemplate){m_oIFrameTemplate=document.createElement("iframe");if(this.isSecure){m_oIFrameTemplate.src=Overlay.IFRAME_SRC}if(UA.ie){m_oIFrameTemplate.style.filter="alpha(opacity=0)";m_oIFrameTemplate.frameBorder=0}else{m_oIFrameTemplate.style.opacity="0"}m_oIFrameTemplate.style.position="absolute";m_oIFrameTemplate.style.border="none";m_oIFrameTemplate.style.margin="0";m_oIFrameTemplate.style.padding="0";m_oIFrameTemplate.style.display="none";m_oIFrameTemplate.tabIndex=-1;m_oIFrameTemplate.className=Overlay.CSS_IFRAME}oIFrame=m_oIFrameTemplate.cloneNode(false);oIFrame.id=this.id+"_f";oParent=oElement.parentNode;var parentNode=oParent||document.body;this._addToParent(parentNode,oIFrame);this.iframe=oIFrame}this.showIframe();this.syncIframe();this.stackIframe();if(!this._hasIframeEventListeners){this.showEvent.subscribe(this.showIframe);this.hideEvent.subscribe(this.hideIframe);this.changeContentEvent.subscribe(this.syncIframe);this._hasIframeEventListeners=true}}function onBeforeShow(){createIFrame.call(this);this.beforeShowEvent.unsubscribe(onBeforeShow);this._iframeDeferred=false}if(bIFrame){if(this.cfg.getProperty("visible")){createIFrame.call(this)}else{if(!this._iframeDeferred){this.beforeShowEvent.subscribe(onBeforeShow);this._iframeDeferred=true}}}else{this.hideIframe();if(this._hasIframeEventListeners){this.showEvent.unsubscribe(this.showIframe);this.hideEvent.unsubscribe(this.hideIframe);this.changeContentEvent.unsubscribe(this.syncIframe);this._hasIframeEventListeners=false}}},_primeXYFromDOM:function(){if(YAHOO.lang.isUndefined(this.cfg.getProperty("xy"))){this.syncPosition();this.cfg.refireEvent("xy");this.beforeShowEvent.unsubscribe(this._primeXYFromDOM)}},configConstrainToViewport:function(type,args,obj){var val=args[0];if(val){if(!Config.alreadySubscribed(this.beforeMoveEvent,this.enforceConstraints,this)){this.beforeMoveEvent.subscribe(this.enforceConstraints,this,true)}if(!Config.alreadySubscribed(this.beforeShowEvent,this._primeXYFromDOM)){this.beforeShowEvent.subscribe(this._primeXYFromDOM)}}else{this.beforeShowEvent.unsubscribe(this._primeXYFromDOM);this.beforeMoveEvent.unsubscribe(this.enforceConstraints,this)}},configContext:function(type,args,obj){var contextArgs=args[0],contextEl,elementMagnetCorner,contextMagnetCorner,triggers,offset,defTriggers=this.CONTEXT_TRIGGERS;if(contextArgs){contextEl=contextArgs[0];elementMagnetCorner=contextArgs[1];contextMagnetCorner=contextArgs[2];triggers=contextArgs[3];offset=contextArgs[4];if(defTriggers&&defTriggers.length>0){triggers=(triggers||[]).concat(defTriggers)}if(contextEl){if(typeof contextEl=="string"){this.cfg.setProperty("context",[document.getElementById(contextEl),elementMagnetCorner,contextMagnetCorner,triggers,offset],true)}if(elementMagnetCorner&&contextMagnetCorner){this.align(elementMagnetCorner,contextMagnetCorner,offset)}if(this._contextTriggers){this._processTriggers(this._contextTriggers,_UNSUBSCRIBE,this._alignOnTrigger)}if(triggers){this._processTriggers(triggers,_SUBSCRIBE,this._alignOnTrigger);this._contextTriggers=triggers}}}},_alignOnTrigger:function(type,args){this.align()},_findTriggerCE:function(t){var tce=null;if(t instanceof CustomEvent){tce=t}else if(Overlay._TRIGGER_MAP[t]){tce=Overlay._TRIGGER_MAP[t]}return tce},_processTriggers:function(triggers,mode,fn){var t,tce;for(var i=0,l=triggers.length;i<l;++i){t=triggers[i];tce=this._findTriggerCE(t);if(tce){tce[mode](fn,this,true)}else{this[mode](t,fn)}}},align:function(elementAlign,contextAlign,xyOffset){var contextArgs=this.cfg.getProperty("context"),me=this,context,element,contextRegion;function doAlign(v,h){var alignX=null,alignY=null;switch(elementAlign){case Overlay.TOP_LEFT:alignX=h;alignY=v;break;case Overlay.TOP_RIGHT:alignX=h-element.offsetWidth;alignY=v;break;case Overlay.BOTTOM_LEFT:alignX=h;alignY=v-element.offsetHeight;break;case Overlay.BOTTOM_RIGHT:alignX=h-element.offsetWidth;alignY=v-element.offsetHeight;break}if(alignX!==null&&alignY!==null){if(xyOffset){alignX+=xyOffset[0];alignY+=xyOffset[1]}me.moveTo(alignX,alignY)}}if(contextArgs){context=contextArgs[0];element=this.element;me=this;if(!elementAlign){elementAlign=contextArgs[1]}if(!contextAlign){contextAlign=contextArgs[2]}if(!xyOffset&&contextArgs[4]){xyOffset=contextArgs[4]}if(element&&context){contextRegion=Dom.getRegion(context);switch(contextAlign){case Overlay.TOP_LEFT:doAlign(contextRegion.top,contextRegion.left);break;case Overlay.TOP_RIGHT:doAlign(contextRegion.top,contextRegion.right);break;case Overlay.BOTTOM_LEFT:doAlign(contextRegion.bottom,contextRegion.left);break;case Overlay.BOTTOM_RIGHT:doAlign(contextRegion.bottom,contextRegion.right);break}}}},enforceConstraints:function(type,args,obj){var pos=args[0];var cXY=this.getConstrainedXY(pos[0],pos[1]);this.cfg.setProperty("x",cXY[0],true);this.cfg.setProperty("y",cXY[1],true);this.cfg.setProperty("xy",cXY,true)},_getConstrainedPos:function(pos,val){var overlayEl=this.element,buffer=Overlay.VIEWPORT_OFFSET,x=(pos=="x"),overlaySize=(x)?overlayEl.offsetWidth:overlayEl.offsetHeight,viewportSize=(x)?Dom.getViewportWidth():Dom.getViewportHeight(),docScroll=(x)?Dom.getDocumentScrollLeft():Dom.getDocumentScrollTop(),overlapPositions=(x)?Overlay.PREVENT_OVERLAP_X:Overlay.PREVENT_OVERLAP_Y,context=this.cfg.getProperty("context"),bOverlayFitsInViewport=(overlaySize+buffer<viewportSize),bPreventContextOverlap=this.cfg.getProperty("preventcontextoverlap")&&context&&overlapPositions[(context[1]+context[2])],minConstraint=docScroll+buffer,maxConstraint=docScroll+viewportSize-overlaySize-buffer,constrainedVal=val;if(val<minConstraint||val>maxConstraint){if(bPreventContextOverlap){constrainedVal=this._preventOverlap(pos,context[0],overlaySize,viewportSize,docScroll)}else{if(bOverlayFitsInViewport){if(val<minConstraint){constrainedVal=minConstraint}else if(val>maxConstraint){constrainedVal=maxConstraint}}else{constrainedVal=minConstraint}}}return constrainedVal},_preventOverlap:function(pos,contextEl,overlaySize,viewportSize,docScroll){var x=(pos=="x"),buffer=Overlay.VIEWPORT_OFFSET,overlay=this,contextElPos=((x)?Dom.getX(contextEl):Dom.getY(contextEl))-docScroll,contextElSize=(x)?contextEl.offsetWidth:contextEl.offsetHeight,minRegionSize=contextElPos-buffer,maxRegionSize=(viewportSize-(contextElPos+contextElSize))-buffer,bFlipped=false,flip=function(){var flippedVal;if((overlay.cfg.getProperty(pos)-docScroll)>contextElPos){flippedVal=(contextElPos-overlaySize)}else{flippedVal=(contextElPos+contextElSize)}overlay.cfg.setProperty(pos,(flippedVal+docScroll),true);return flippedVal},setPosition=function(){var displayRegionSize=((overlay.cfg.getProperty(pos)-docScroll)>contextElPos)?maxRegionSize:minRegionSize,position;if(overlaySize>displayRegionSize){if(bFlipped){flip()}else{flip();bFlipped=true;position=setPosition()}}return position};setPosition();return this.cfg.getProperty(pos)},getConstrainedX:function(x){return this._getConstrainedPos("x",x)},getConstrainedY:function(y){return this._getConstrainedPos("y",y)},getConstrainedXY:function(x,y){return[this.getConstrainedX(x),this.getConstrainedY(y)]},center:function(){var nViewportOffset=Overlay.VIEWPORT_OFFSET,elementWidth=this.element.offsetWidth,elementHeight=this.element.offsetHeight,viewPortWidth=Dom.getViewportWidth(),viewPortHeight=Dom.getViewportHeight(),x,y;if(elementWidth<viewPortWidth){x=(viewPortWidth/2)-(elementWidth/2)+Dom.getDocumentScrollLeft()}else{x=nViewportOffset+Dom.getDocumentScrollLeft()}if(elementHeight<viewPortHeight){y=(viewPortHeight/2)-(elementHeight/2)+Dom.getDocumentScrollTop()}else{y=nViewportOffset+Dom.getDocumentScrollTop()}this.cfg.setProperty("xy",[parseInt(x,10),parseInt(y,10)]);this.cfg.refireEvent("iframe");if(UA.webkit){this.forceContainerRedraw()}},syncPosition:function(){var pos=Dom.getXY(this.element);this.cfg.setProperty("x",pos[0],true);this.cfg.setProperty("y",pos[1],true);this.cfg.setProperty("xy",pos,true)},onDomResize:function(e,obj){var me=this;Overlay.superclass.onDomResize.call(this,e,obj);setTimeout(function(){me.syncPosition();me.cfg.refireEvent("iframe");me.cfg.refireEvent("context")},0)},_getComputedHeight:(function(){if(document.defaultView&&document.defaultView.getComputedStyle){return function(el){var height=null;if(el.ownerDocument&&el.ownerDocument.defaultView){var computed=el.ownerDocument.defaultView.getComputedStyle(el,'');if(computed){height=parseInt(computed.height,10)}}return(Lang.isNumber(height))?height:null}}else{return function(el){var height=null;if(el.style.pixelHeight){height=el.style.pixelHeight}return(Lang.isNumber(height))?height:null}}})(),_validateAutoFillHeight:function(val){return(!val)||(Lang.isString(val)&&Overlay.STD_MOD_RE.test(val))},_autoFillOnHeightChange:function(type,args,el){var height=this.cfg.getProperty("height");if((height&&height!=="auto")||(height===0)){this.fillHeight(el)}},_getPreciseHeight:function(el){var height=el.offsetHeight;if(el.getBoundingClientRect){var rect=el.getBoundingClientRect();height=rect.bottom-rect.top}return height},fillHeight:function(el){if(el){var container=this.innerElement||this.element,containerEls=[this.header,this.body,this.footer],containerEl,total=0,filled=0,remaining=0,validEl=false;for(var i=0,l=containerEls.length;i<l;i++){containerEl=containerEls[i];if(containerEl){if(el!==containerEl){filled+=this._getPreciseHeight(containerEl)}else{validEl=true}}}if(validEl){if(UA.ie||UA.opera){Dom.setStyle(el,'height',0+'px')}total=this._getComputedHeight(container);if(total===null){Dom.addClass(container,"yui-override-padding");total=container.clientHeight;Dom.removeClass(container,"yui-override-padding")}remaining=Math.max(total-filled,0);Dom.setStyle(el,"height",remaining+"px");if(el.offsetHeight!=remaining){remaining=Math.max(remaining-(el.offsetHeight-remaining),0)}Dom.setStyle(el,"height",remaining+"px")}}},bringToTop:function(){var aOverlays=[],oElement=this.element;function compareZIndexDesc(p_oOverlay1,p_oOverlay2){var sZIndex1=Dom.getStyle(p_oOverlay1,"zIndex"),sZIndex2=Dom.getStyle(p_oOverlay2,"zIndex"),nZIndex1=(!sZIndex1||isNaN(sZIndex1))?0:parseInt(sZIndex1,10),nZIndex2=(!sZIndex2||isNaN(sZIndex2))?0:parseInt(sZIndex2,10);if(nZIndex1>nZIndex2){return-1}else if(nZIndex1<nZIndex2){return 1}else{return 0}}function isOverlayElement(p_oElement){var isOverlay=Dom.hasClass(p_oElement,Overlay.CSS_OVERLAY),Panel=YAHOO.widget.Panel;if(isOverlay&&!Dom.isAncestor(oElement,p_oElement)){if(Panel&&Dom.hasClass(p_oElement,Panel.CSS_PANEL)){aOverlays[aOverlays.length]=p_oElement.parentNode}else{aOverlays[aOverlays.length]=p_oElement}}}Dom.getElementsBy(isOverlayElement,"div",document.body);aOverlays.sort(compareZIndexDesc);var oTopOverlay=aOverlays[0],nTopZIndex;if(oTopOverlay){nTopZIndex=Dom.getStyle(oTopOverlay,"zIndex");if(!isNaN(nTopZIndex)){var bRequiresBump=false;if(oTopOverlay!=oElement){bRequiresBump=true}else if(aOverlays.length>1){var nNextZIndex=Dom.getStyle(aOverlays[1],"zIndex");if(!isNaN(nNextZIndex)&&(nTopZIndex==nNextZIndex)){bRequiresBump=true}}if(bRequiresBump){this.cfg.setProperty("zindex",(parseInt(nTopZIndex,10)+2))}}}},destroy:function(shallowPurge){if(this.iframe){this.iframe.parentNode.removeChild(this.iframe)}this.iframe=null;Overlay.windowResizeEvent.unsubscribe(this.doCenterOnDOMEvent,this);Overlay.windowScrollEvent.unsubscribe(this.doCenterOnDOMEvent,this);Module.textResizeEvent.unsubscribe(this._autoFillOnHeightChange);if(this._contextTriggers){this._processTriggers(this._contextTriggers,_UNSUBSCRIBE,this._alignOnTrigger)}Overlay.superclass.destroy.call(this,shallowPurge)},forceContainerRedraw:function(){var c=this;Dom.addClass(c.element,"yui-force-redraw");setTimeout(function(){Dom.removeClass(c.element,"yui-force-redraw")},0)},toString:function(){return"Overlay "+this.id}})}());(function(){YAHOO.widget.OverlayManager=function(userConfig){this.init(userConfig)};var Overlay=YAHOO.widget.Overlay,Event=YAHOO.util.Event,Dom=YAHOO.util.Dom,Config=YAHOO.util.Config,CustomEvent=YAHOO.util.CustomEvent,OverlayManager=YAHOO.widget.OverlayManager;OverlayManager.CSS_FOCUSED="focused";OverlayManager.prototype={constructor:OverlayManager,overlays:null,initDefaultConfig:function(){this.cfg.addProperty("overlays",{suppressEvent:true});this.cfg.addProperty("focusevent",{value:"mousedown"})},init:function(userConfig){this.cfg=new Config(this);this.initDefaultConfig();if(userConfig){this.cfg.applyConfig(userConfig,true)}this.cfg.fireQueue();var activeOverlay=null;this.getActive=function(){return activeOverlay};this.focus=function(overlay){var o=this.find(overlay);if(o){o.focus()}};this.remove=function(overlay){var o=this.find(overlay),originalZ;if(o){if(activeOverlay==o){activeOverlay=null}var bDestroyed=(o.element===null&&o.cfg===null)?true:false;if(!bDestroyed){originalZ=Dom.getStyle(o.element,"zIndex");o.cfg.setProperty("zIndex",-1000,true)}this.overlays.sort(this.compareZIndexDesc);this.overlays=this.overlays.slice(0,(this.overlays.length-1));o.hideEvent.unsubscribe(o.blur);o.destroyEvent.unsubscribe(this._onOverlayDestroy,o);o.focusEvent.unsubscribe(this._onOverlayFocusHandler,o);o.blurEvent.unsubscribe(this._onOverlayBlurHandler,o);if(!bDestroyed){Event.removeListener(o.element,this.cfg.getProperty("focusevent"),this._onOverlayElementFocus);o.cfg.setProperty("zIndex",originalZ,true);o.cfg.setProperty("manager",null)}if(o.focusEvent._managed){o.focusEvent=null}if(o.blurEvent._managed){o.blurEvent=null}if(o.focus._managed){o.focus=null}if(o.blur._managed){o.blur=null}}};this.blurAll=function(){var nOverlays=this.overlays.length,i;if(nOverlays>0){i=nOverlays-1;do{this.overlays[i].blur()}while(i--)}};this._manageBlur=function(overlay){var changed=false;if(activeOverlay==overlay){Dom.removeClass(activeOverlay.element,OverlayManager.CSS_FOCUSED);activeOverlay=null;changed=true}return changed};this._manageFocus=function(overlay){var changed=false;if(activeOverlay!=overlay){if(activeOverlay){activeOverlay.blur()}activeOverlay=overlay;this.bringToTop(activeOverlay);Dom.addClass(activeOverlay.element,OverlayManager.CSS_FOCUSED);changed=true}return changed};var overlays=this.cfg.getProperty("overlays");if(!this.overlays){this.overlays=[]}if(overlays){this.register(overlays);this.overlays.sort(this.compareZIndexDesc)}},_onOverlayElementFocus:function(p_oEvent){var oTarget=Event.getTarget(p_oEvent),oClose=this.close;if(oClose&&(oTarget==oClose||Dom.isAncestor(oClose,oTarget))){this.blur()}else{this.focus()}},_onOverlayDestroy:function(p_sType,p_aArgs,p_oOverlay){this.remove(p_oOverlay)},_onOverlayFocusHandler:function(p_sType,p_aArgs,p_oOverlay){this._manageFocus(p_oOverlay)},_onOverlayBlurHandler:function(p_sType,p_aArgs,p_oOverlay){this._manageBlur(p_oOverlay)},_bindFocus:function(overlay){var mgr=this;if(!overlay.focusEvent){overlay.focusEvent=overlay.createEvent("focus");overlay.focusEvent.signature=CustomEvent.LIST;overlay.focusEvent._managed=true}else{overlay.focusEvent.subscribe(mgr._onOverlayFocusHandler,overlay,mgr)}if(!overlay.focus){Event.on(overlay.element,mgr.cfg.getProperty("focusevent"),mgr._onOverlayElementFocus,null,overlay);overlay.focus=function(){if(mgr._manageFocus(this)){if(this.cfg.getProperty("visible")&&this.focusFirst){this.focusFirst()}this.focusEvent.fire()}};overlay.focus._managed=true}},_bindBlur:function(overlay){var mgr=this;if(!overlay.blurEvent){overlay.blurEvent=overlay.createEvent("blur");overlay.blurEvent.signature=CustomEvent.LIST;overlay.focusEvent._managed=true}else{overlay.blurEvent.subscribe(mgr._onOverlayBlurHandler,overlay,mgr)}if(!overlay.blur){overlay.blur=function(){if(mgr._manageBlur(this)){this.blurEvent.fire()}};overlay.blur._managed=true}overlay.hideEvent.subscribe(overlay.blur)},_bindDestroy:function(overlay){var mgr=this;overlay.destroyEvent.subscribe(mgr._onOverlayDestroy,overlay,mgr)},_syncZIndex:function(overlay){var zIndex=Dom.getStyle(overlay.element,"zIndex");if(!isNaN(zIndex)){overlay.cfg.setProperty("zIndex",parseInt(zIndex,10))}else{overlay.cfg.setProperty("zIndex",0)}},register:function(overlay){var registered=false,i,n;if(overlay instanceof Overlay){overlay.cfg.addProperty("manager",{value:this});this._bindFocus(overlay);this._bindBlur(overlay);this._bindDestroy(overlay);this._syncZIndex(overlay);this.overlays.push(overlay);this.bringToTop(overlay);registered=true}else if(overlay instanceof Array){for(i=0,n=overlay.length;i<n;i++){registered=this.register(overlay[i])||registered}}return registered},bringToTop:function(p_oOverlay){var oOverlay=this.find(p_oOverlay),nTopZIndex,oTopOverlay,aOverlays;if(oOverlay){aOverlays=this.overlays;aOverlays.sort(this.compareZIndexDesc);oTopOverlay=aOverlays[0];if(oTopOverlay){nTopZIndex=Dom.getStyle(oTopOverlay.element,"zIndex");if(!isNaN(nTopZIndex)){var bRequiresBump=false;if(oTopOverlay!==oOverlay){bRequiresBump=true}else if(aOverlays.length>1){var nNextZIndex=Dom.getStyle(aOverlays[1].element,"zIndex");if(!isNaN(nNextZIndex)&&(nTopZIndex==nNextZIndex)){bRequiresBump=true}}if(bRequiresBump){oOverlay.cfg.setProperty("zindex",(parseInt(nTopZIndex,10)+2))}}aOverlays.sort(this.compareZIndexDesc)}}},find:function(overlay){var isInstance=overlay instanceof Overlay,overlays=this.overlays,n=overlays.length,found=null,o,i;if(isInstance||typeof overlay=="string"){for(i=n-1;i>=0;i--){o=overlays[i];if((isInstance&&(o===overlay))||(o.id==overlay)){found=o;break}}}return found},compareZIndexDesc:function(o1,o2){var zIndex1=(o1.cfg)?o1.cfg.getProperty("zIndex"):null,zIndex2=(o2.cfg)?o2.cfg.getProperty("zIndex"):null;if(zIndex1===null&&zIndex2===null){return 0}else if(zIndex1===null){return 1}else if(zIndex2===null){return-1}else if(zIndex1>zIndex2){return-1}else if(zIndex1<zIndex2){return 1}else{return 0}},showAll:function(){var overlays=this.overlays,n=overlays.length,i;for(i=n-1;i>=0;i--){overlays[i].show()}},hideAll:function(){var overlays=this.overlays,n=overlays.length,i;for(i=n-1;i>=0;i--){overlays[i].hide()}},toString:function(){return"OverlayManager"}}}());(function(){YAHOO.widget.Tooltip=function(el,userConfig){YAHOO.widget.Tooltip.superclass.constructor.call(this,el,userConfig)};var Lang=YAHOO.lang,Event=YAHOO.util.Event,CustomEvent=YAHOO.util.CustomEvent,Dom=YAHOO.util.Dom,Tooltip=YAHOO.widget.Tooltip,UA=YAHOO.env.ua,bIEQuirks=(UA.ie&&(UA.ie<=6||document.compatMode=="BackCompat")),m_oShadowTemplate,DEFAULT_CONFIG={"PREVENT_OVERLAP":{key:"preventoverlap",value:true,validator:Lang.isBoolean,supercedes:["x","y","xy"]},"SHOW_DELAY":{key:"showdelay",value:200,validator:Lang.isNumber},"AUTO_DISMISS_DELAY":{key:"autodismissdelay",value:5000,validator:Lang.isNumber},"HIDE_DELAY":{key:"hidedelay",value:250,validator:Lang.isNumber},"TEXT":{key:"text",suppressEvent:true},"CONTAINER":{key:"container"},"DISABLED":{key:"disabled",value:false,suppressEvent:true},"XY_OFFSET":{key:"xyoffset",value:[0,25],suppressEvent:true}},EVENT_TYPES={"CONTEXT_MOUSE_OVER":"contextMouseOver","CONTEXT_MOUSE_OUT":"contextMouseOut","CONTEXT_TRIGGER":"contextTrigger"};Tooltip.CSS_TOOLTIP="yui-tt";function restoreOriginalWidth(sOriginalWidth,sForcedWidth){var oConfig=this.cfg,sCurrentWidth=oConfig.getProperty("width");if(sCurrentWidth==sForcedWidth){oConfig.setProperty("width",sOriginalWidth)}}function setWidthToOffsetWidth(p_sType,p_aArgs){if("_originalWidth"in this){restoreOriginalWidth.call(this,this._originalWidth,this._forcedWidth)}var oBody=document.body,oConfig=this.cfg,sOriginalWidth=oConfig.getProperty("width"),sNewWidth,oClone;if((!sOriginalWidth||sOriginalWidth=="auto")&&(oConfig.getProperty("container")!=oBody||oConfig.getProperty("x")>=Dom.getViewportWidth()||oConfig.getProperty("y")>=Dom.getViewportHeight())){oClone=this.element.cloneNode(true);oClone.style.visibility="hidden";oClone.style.top="0px";oClone.style.left="0px";oBody.appendChild(oClone);sNewWidth=(oClone.offsetWidth+"px");oBody.removeChild(oClone);oClone=null;oConfig.setProperty("width",sNewWidth);oConfig.refireEvent("xy");this._originalWidth=sOriginalWidth||"";this._forcedWidth=sNewWidth}}function onDOMReady(p_sType,p_aArgs,p_oObject){this.render(p_oObject)}function onInit(){Event.onDOMReady(onDOMReady,this.cfg.getProperty("container"),this)}YAHOO.extend(Tooltip,YAHOO.widget.Overlay,{init:function(el,userConfig){Tooltip.superclass.init.call(this,el);this.beforeInitEvent.fire(Tooltip);Dom.addClass(this.element,Tooltip.CSS_TOOLTIP);if(userConfig){this.cfg.applyConfig(userConfig,true)}this.cfg.queueProperty("visible",false);this.cfg.queueProperty("constraintoviewport",true);this.setBody("");this.subscribe("changeContent",setWidthToOffsetWidth);this.subscribe("init",onInit);this.subscribe("render",this.onRender);this.initEvent.fire(Tooltip)},initEvents:function(){Tooltip.superclass.initEvents.call(this);var SIGNATURE=CustomEvent.LIST;this.contextMouseOverEvent=this.createEvent(EVENT_TYPES.CONTEXT_MOUSE_OVER);this.contextMouseOverEvent.signature=SIGNATURE;this.contextMouseOutEvent=this.createEvent(EVENT_TYPES.CONTEXT_MOUSE_OUT);this.contextMouseOutEvent.signature=SIGNATURE;this.contextTriggerEvent=this.createEvent(EVENT_TYPES.CONTEXT_TRIGGER);this.contextTriggerEvent.signature=SIGNATURE},initDefaultConfig:function(){Tooltip.superclass.initDefaultConfig.call(this);this.cfg.addProperty(DEFAULT_CONFIG.PREVENT_OVERLAP.key,{value:DEFAULT_CONFIG.PREVENT_OVERLAP.value,validator:DEFAULT_CONFIG.PREVENT_OVERLAP.validator,supercedes:DEFAULT_CONFIG.PREVENT_OVERLAP.supercedes});this.cfg.addProperty(DEFAULT_CONFIG.SHOW_DELAY.key,{handler:this.configShowDelay,value:200,validator:DEFAULT_CONFIG.SHOW_DELAY.validator});this.cfg.addProperty(DEFAULT_CONFIG.AUTO_DISMISS_DELAY.key,{handler:this.configAutoDismissDelay,value:DEFAULT_CONFIG.AUTO_DISMISS_DELAY.value,validator:DEFAULT_CONFIG.AUTO_DISMISS_DELAY.validator});this.cfg.addProperty(DEFAULT_CONFIG.HIDE_DELAY.key,{handler:this.configHideDelay,value:DEFAULT_CONFIG.HIDE_DELAY.value,validator:DEFAULT_CONFIG.HIDE_DELAY.validator});this.cfg.addProperty(DEFAULT_CONFIG.TEXT.key,{handler:this.configText,suppressEvent:DEFAULT_CONFIG.TEXT.suppressEvent});this.cfg.addProperty(DEFAULT_CONFIG.CONTAINER.key,{handler:this.configContainer,value:document.body});this.cfg.addProperty(DEFAULT_CONFIG.DISABLED.key,{handler:this.configContainer,value:DEFAULT_CONFIG.DISABLED.value,supressEvent:DEFAULT_CONFIG.DISABLED.suppressEvent});this.cfg.addProperty(DEFAULT_CONFIG.XY_OFFSET.key,{value:DEFAULT_CONFIG.XY_OFFSET.value.concat(),supressEvent:DEFAULT_CONFIG.XY_OFFSET.suppressEvent})},configText:function(type,args,obj){var text=args[0];if(text){this.setBody(text)}},configContainer:function(type,args,obj){var container=args[0];if(typeof container=='string'){this.cfg.setProperty("container",document.getElementById(container),true)}},_removeEventListeners:function(){var aElements=this._context,nElements,oElement,i;if(aElements){nElements=aElements.length;if(nElements>0){i=nElements-1;do{oElement=aElements[i];Event.removeListener(oElement,"mouseover",this.onContextMouseOver);Event.removeListener(oElement,"mousemove",this.onContextMouseMove);Event.removeListener(oElement,"mouseout",this.onContextMouseOut)}while(i--)}}},configContext:function(type,args,obj){var context=args[0],aElements,nElements,oElement,i;if(context){if(!(context instanceof Array)){if(typeof context=="string"){this.cfg.setProperty("context",[document.getElementById(context)],true)}else{this.cfg.setProperty("context",[context],true)}context=this.cfg.getProperty("context")}this._removeEventListeners();this._context=context;aElements=this._context;if(aElements){nElements=aElements.length;if(nElements>0){i=nElements-1;do{oElement=aElements[i];Event.on(oElement,"mouseover",this.onContextMouseOver,this);Event.on(oElement,"mousemove",this.onContextMouseMove,this);Event.on(oElement,"mouseout",this.onContextMouseOut,this)}while(i--)}}}},onContextMouseMove:function(e,obj){obj.pageX=Event.getPageX(e);obj.pageY=Event.getPageY(e)},onContextMouseOver:function(e,obj){var context=this;if(context.title){obj._tempTitle=context.title;context.title=""}if(obj.fireEvent("contextMouseOver",context,e)!==false&&!obj.cfg.getProperty("disabled")){if(obj.hideProcId){clearTimeout(obj.hideProcId);obj.hideProcId=null}Event.on(context,"mousemove",obj.onContextMouseMove,obj);obj.showProcId=obj.doShow(e,context)}},onContextMouseOut:function(e,obj){var el=this;if(obj._tempTitle){el.title=obj._tempTitle;obj._tempTitle=null}if(obj.showProcId){clearTimeout(obj.showProcId);obj.showProcId=null}if(obj.hideProcId){clearTimeout(obj.hideProcId);obj.hideProcId=null}obj.fireEvent("contextMouseOut",el,e);obj.hideProcId=setTimeout(function(){obj.hide()},obj.cfg.getProperty("hidedelay"))},doShow:function(e,context){var offset=this.cfg.getProperty("xyoffset"),xOffset=offset[0],yOffset=offset[1],me=this;if(UA.opera&&context.tagName&&context.tagName.toUpperCase()=="A"){yOffset+=12}return setTimeout(function(){var txt=me.cfg.getProperty("text");if(me._tempTitle&&(txt===""||YAHOO.lang.isUndefined(txt)||YAHOO.lang.isNull(txt))){me.setBody(me._tempTitle)}else{me.cfg.refireEvent("text")}me.moveTo(me.pageX+xOffset,me.pageY+yOffset);if(me.cfg.getProperty("preventoverlap")){me.preventOverlap(me.pageX,me.pageY)}Event.removeListener(context,"mousemove",me.onContextMouseMove);me.contextTriggerEvent.fire(context);me.show();me.hideProcId=me.doHide()},this.cfg.getProperty("showdelay"))},doHide:function(){var me=this;return setTimeout(function(){me.hide()},this.cfg.getProperty("autodismissdelay"))},preventOverlap:function(pageX,pageY){var height=this.element.offsetHeight,mousePoint=new YAHOO.util.Point(pageX,pageY),elementRegion=Dom.getRegion(this.element);elementRegion.top-=5;elementRegion.left-=5;elementRegion.right+=5;elementRegion.bottom+=5;if(elementRegion.contains(mousePoint)){this.cfg.setProperty("y",(pageY-height-5))}},onRender:function(p_sType,p_aArgs){function sizeShadow(){var oElement=this.element,oShadow=this.underlay;if(oShadow){oShadow.style.width=(oElement.offsetWidth+6)+"px";oShadow.style.height=(oElement.offsetHeight+1)+"px"}}function addShadowVisibleClass(){Dom.addClass(this.underlay,"yui-tt-shadow-visible");if(UA.ie){this.forceUnderlayRedraw()}}function removeShadowVisibleClass(){Dom.removeClass(this.underlay,"yui-tt-shadow-visible")}function createShadow(){var oShadow=this.underlay,oElement,Module,nIE,me;if(!oShadow){oElement=this.element;Module=YAHOO.widget.Module;nIE=UA.ie;me=this;if(!m_oShadowTemplate){m_oShadowTemplate=document.createElement("div");m_oShadowTemplate.className="yui-tt-shadow"}oShadow=m_oShadowTemplate.cloneNode(false);oElement.appendChild(oShadow);this.underlay=oShadow;this._shadow=this.underlay;addShadowVisibleClass.call(this);this.subscribe("beforeShow",addShadowVisibleClass);this.subscribe("hide",removeShadowVisibleClass);if(bIEQuirks){window.setTimeout(function(){sizeShadow.call(me)},0);this.cfg.subscribeToConfigEvent("width",sizeShadow);this.cfg.subscribeToConfigEvent("height",sizeShadow);this.subscribe("changeContent",sizeShadow);Module.textResizeEvent.subscribe(sizeShadow,this,true);this.subscribe("destroy",function(){Module.textResizeEvent.unsubscribe(sizeShadow,this)})}}}function onBeforeShow(){createShadow.call(this);this.unsubscribe("beforeShow",onBeforeShow)}if(this.cfg.getProperty("visible")){createShadow.call(this)}else{this.subscribe("beforeShow",onBeforeShow)}},forceUnderlayRedraw:function(){var tt=this;Dom.addClass(tt.underlay,"yui-force-redraw");setTimeout(function(){Dom.removeClass(tt.underlay,"yui-force-redraw")},0)},destroy:function(){this._removeEventListeners();Tooltip.superclass.destroy.call(this)},toString:function(){return"Tooltip "+this.id}})}());(function(){YAHOO.widget.Panel=function(el,userConfig){YAHOO.widget.Panel.superclass.constructor.call(this,el,userConfig)};var _currentModal=null;var Lang=YAHOO.lang,Util=YAHOO.util,Dom=Util.Dom,Event=Util.Event,CustomEvent=Util.CustomEvent,KeyListener=YAHOO.util.KeyListener,Config=Util.Config,Overlay=YAHOO.widget.Overlay,Panel=YAHOO.widget.Panel,UA=YAHOO.env.ua,bIEQuirks=(UA.ie&&(UA.ie<=6||document.compatMode=="BackCompat")),m_oMaskTemplate,m_oUnderlayTemplate,m_oCloseIconTemplate,EVENT_TYPES={"BEFORE_SHOW_MASK":"beforeShowMask","BEFORE_HIDE_MASK":"beforeHideMask","SHOW_MASK":"showMask","HIDE_MASK":"hideMask","DRAG":"drag"},DEFAULT_CONFIG={"CLOSE":{key:"close",value:true,validator:Lang.isBoolean,supercedes:["visible"]},"DRAGGABLE":{key:"draggable",value:(Util.DD?true:false),validator:Lang.isBoolean,supercedes:["visible"]},"DRAG_ONLY":{key:"dragonly",value:false,validator:Lang.isBoolean,supercedes:["draggable"]},"UNDERLAY":{key:"underlay",value:"shadow",supercedes:["visible"]},"MODAL":{key:"modal",value:false,validator:Lang.isBoolean,supercedes:["visible","zindex"]},"KEY_LISTENERS":{key:"keylisteners",suppressEvent:true,supercedes:["visible"]},"STRINGS":{key:"strings",supercedes:["close"],validator:Lang.isObject,value:{close:"Close"}}};Panel.CSS_PANEL="yui-panel";Panel.CSS_PANEL_CONTAINER="yui-panel-container";Panel.FOCUSABLE=["a","button","select","textarea","input","iframe"];function createHeader(p_sType,p_aArgs){if(!this.header&&this.cfg.getProperty("draggable")){this.setHeader("&#160;")}}function restoreOriginalWidth(p_sType,p_aArgs,p_oObject){var sOriginalWidth=p_oObject[0],sNewWidth=p_oObject[1],oConfig=this.cfg,sCurrentWidth=oConfig.getProperty("width");if(sCurrentWidth==sNewWidth){oConfig.setProperty("width",sOriginalWidth)}this.unsubscribe("hide",restoreOriginalWidth,p_oObject)}function setWidthToOffsetWidth(p_sType,p_aArgs){var oConfig,sOriginalWidth,sNewWidth;if(bIEQuirks){oConfig=this.cfg;sOriginalWidth=oConfig.getProperty("width");if(!sOriginalWidth||sOriginalWidth=="auto"){sNewWidth=(this.element.offsetWidth+"px");oConfig.setProperty("width",sNewWidth);this.subscribe("hide",restoreOriginalWidth,[(sOriginalWidth||""),sNewWidth])}}}YAHOO.extend(Panel,Overlay,{init:function(el,userConfig){Panel.superclass.init.call(this,el);this.beforeInitEvent.fire(Panel);Dom.addClass(this.element,Panel.CSS_PANEL);this.buildWrapper();if(userConfig){this.cfg.applyConfig(userConfig,true)}this.subscribe("showMask",this._addFocusHandlers);this.subscribe("hideMask",this._removeFocusHandlers);this.subscribe("beforeRender",createHeader);this.subscribe("render",function(){this.setFirstLastFocusable();this.subscribe("changeContent",this.setFirstLastFocusable)});this.subscribe("show",this._focusOnShow);this.initEvent.fire(Panel)},_onElementFocus:function(e){if(_currentModal===this){var target=Event.getTarget(e),doc=document.documentElement,insideDoc=(target!==doc&&target!==window);if(insideDoc&&target!==this.element&&target!==this.mask&&!Dom.isAncestor(this.element,target)){try{this._focusFirstModal()}catch(err){try{if(insideDoc&&target!==document.body){target.blur()}}catch(err2){}}}}},_focusFirstModal:function(){var el=this.firstElement;if(el){el.focus()}else{if(this._modalFocus){this._modalFocus.focus()}else{this.innerElement.focus()}}},_addFocusHandlers:function(p_sType,p_aArgs){if(!this.firstElement){if(UA.webkit||UA.opera){if(!this._modalFocus){this._createHiddenFocusElement()}}else{this.innerElement.tabIndex=0}}this._setTabLoop(this.firstElement,this.lastElement);Event.onFocus(document.documentElement,this._onElementFocus,this,true);_currentModal=this},_createHiddenFocusElement:function(){var e=document.createElement("button");e.style.height="1px";e.style.width="1px";e.style.position="absolute";e.style.left="-10000em";e.style.opacity=0;e.tabIndex=-1;this.innerElement.appendChild(e);this._modalFocus=e},_removeFocusHandlers:function(p_sType,p_aArgs){Event.removeFocusListener(document.documentElement,this._onElementFocus,this);if(_currentModal==this){_currentModal=null}},_focusOnShow:function(type,args,obj){if(args&&args[1]){Event.stopEvent(args[1])}if(!this.focusFirst(type,args,obj)){if(this.cfg.getProperty("modal")){this._focusFirstModal()}}},focusFirst:function(type,args,obj){var el=this.firstElement,focused=false;if(args&&args[1]){Event.stopEvent(args[1])}if(el){try{el.focus();focused=true}catch(err){}}return focused},focusLast:function(type,args,obj){var el=this.lastElement,focused=false;if(args&&args[1]){Event.stopEvent(args[1])}if(el){try{el.focus();focused=true}catch(err){}}return focused},_setTabLoop:function(firstElement,lastElement){this.setTabLoop(firstElement,lastElement)},setTabLoop:function(firstElement,lastElement){var backTab=this.preventBackTab,tab=this.preventTabOut,showEvent=this.showEvent,hideEvent=this.hideEvent;if(backTab){backTab.disable();showEvent.unsubscribe(backTab.enable,backTab);hideEvent.unsubscribe(backTab.disable,backTab);backTab=this.preventBackTab=null}if(tab){tab.disable();showEvent.unsubscribe(tab.enable,tab);hideEvent.unsubscribe(tab.disable,tab);tab=this.preventTabOut=null}if(firstElement){this.preventBackTab=new KeyListener(firstElement,{shift:true,keys:9},{fn:this.focusLast,scope:this,correctScope:true});backTab=this.preventBackTab;showEvent.subscribe(backTab.enable,backTab,true);hideEvent.subscribe(backTab.disable,backTab,true)}if(lastElement){this.preventTabOut=new KeyListener(lastElement,{shift:false,keys:9},{fn:this.focusFirst,scope:this,correctScope:true});tab=this.preventTabOut;showEvent.subscribe(tab.enable,tab,true);hideEvent.subscribe(tab.disable,tab,true)}},getFocusableElements:function(root){root=root||this.innerElement;var focusable={},panel=this;for(var i=0;i<Panel.FOCUSABLE.length;i++){focusable[Panel.FOCUSABLE[i]]=true}return Dom.getElementsBy(function(el){return panel._testIfFocusable(el,focusable)},null,root)},_testIfFocusable:function(el,focusable){if(el.focus&&el.type!=="hidden"&&!el.disabled&&focusable[el.tagName.toLowerCase()]){return true}return false},setFirstLastFocusable:function(){this.firstElement=null;this.lastElement=null;var elements=this.getFocusableElements();this.focusableElements=elements;if(elements.length>0){this.firstElement=elements[0];this.lastElement=elements[elements.length-1]}if(this.cfg.getProperty("modal")){this._setTabLoop(this.firstElement,this.lastElement)}},initEvents:function(){Panel.superclass.initEvents.call(this);var SIGNATURE=CustomEvent.LIST;this.showMaskEvent=this.createEvent(EVENT_TYPES.SHOW_MASK);this.showMaskEvent.signature=SIGNATURE;this.beforeShowMaskEvent=this.createEvent(EVENT_TYPES.BEFORE_SHOW_MASK);this.beforeShowMaskEvent.signature=SIGNATURE;this.hideMaskEvent=this.createEvent(EVENT_TYPES.HIDE_MASK);this.hideMaskEvent.signature=SIGNATURE;this.beforeHideMaskEvent=this.createEvent(EVENT_TYPES.BEFORE_HIDE_MASK);this.beforeHideMaskEvent.signature=SIGNATURE;this.dragEvent=this.createEvent(EVENT_TYPES.DRAG);this.dragEvent.signature=SIGNATURE},initDefaultConfig:function(){Panel.superclass.initDefaultConfig.call(this);this.cfg.addProperty(DEFAULT_CONFIG.CLOSE.key,{handler:this.configClose,value:DEFAULT_CONFIG.CLOSE.value,validator:DEFAULT_CONFIG.CLOSE.validator,supercedes:DEFAULT_CONFIG.CLOSE.supercedes});this.cfg.addProperty(DEFAULT_CONFIG.DRAGGABLE.key,{handler:this.configDraggable,value:(Util.DD)?true:false,validator:DEFAULT_CONFIG.DRAGGABLE.validator,supercedes:DEFAULT_CONFIG.DRAGGABLE.supercedes});this.cfg.addProperty(DEFAULT_CONFIG.DRAG_ONLY.key,{value:DEFAULT_CONFIG.DRAG_ONLY.value,validator:DEFAULT_CONFIG.DRAG_ONLY.validator,supercedes:DEFAULT_CONFIG.DRAG_ONLY.supercedes});this.cfg.addProperty(DEFAULT_CONFIG.UNDERLAY.key,{handler:this.configUnderlay,value:DEFAULT_CONFIG.UNDERLAY.value,supercedes:DEFAULT_CONFIG.UNDERLAY.supercedes});this.cfg.addProperty(DEFAULT_CONFIG.MODAL.key,{handler:this.configModal,value:DEFAULT_CONFIG.MODAL.value,validator:DEFAULT_CONFIG.MODAL.validator,supercedes:DEFAULT_CONFIG.MODAL.supercedes});this.cfg.addProperty(DEFAULT_CONFIG.KEY_LISTENERS.key,{handler:this.configKeyListeners,suppressEvent:DEFAULT_CONFIG.KEY_LISTENERS.suppressEvent,supercedes:DEFAULT_CONFIG.KEY_LISTENERS.supercedes});this.cfg.addProperty(DEFAULT_CONFIG.STRINGS.key,{value:DEFAULT_CONFIG.STRINGS.value,handler:this.configStrings,validator:DEFAULT_CONFIG.STRINGS.validator,supercedes:DEFAULT_CONFIG.STRINGS.supercedes})},configClose:function(type,args,obj){var val=args[0],oClose=this.close,strings=this.cfg.getProperty("strings"),fc;if(val){if(!oClose){if(!m_oCloseIconTemplate){m_oCloseIconTemplate=document.createElement("a");m_oCloseIconTemplate.className="container-close";m_oCloseIconTemplate.href="#"}oClose=m_oCloseIconTemplate.cloneNode(true);fc=this.innerElement.firstChild;if(fc){this.innerElement.insertBefore(oClose,fc)}else{this.innerElement.appendChild(oClose)}oClose.innerHTML=(strings&&strings.close)?strings.close:"&#160;";Event.on(oClose,"click",this._doClose,this,true);this.close=oClose}else{oClose.style.display="block"}}else{if(oClose){oClose.style.display="none"}}},_doClose:function(e){Event.preventDefault(e);this.hide()},configDraggable:function(type,args,obj){var val=args[0];if(val){if(!Util.DD){this.cfg.setProperty("draggable",false);return}if(this.header){Dom.setStyle(this.header,"cursor","move");this.registerDragDrop()}this.subscribe("beforeShow",setWidthToOffsetWidth)}else{if(this.dd){this.dd.unreg()}if(this.header){Dom.setStyle(this.header,"cursor","auto")}this.unsubscribe("beforeShow",setWidthToOffsetWidth)}},configUnderlay:function(type,args,obj){var bMacGecko=(this.platform=="mac"&&UA.gecko),sUnderlay=args[0].toLowerCase(),oUnderlay=this.underlay,oElement=this.element;function createUnderlay(){var bNew=false;if(!oUnderlay){if(!m_oUnderlayTemplate){m_oUnderlayTemplate=document.createElement("div");m_oUnderlayTemplate.className="underlay"}oUnderlay=m_oUnderlayTemplate.cloneNode(false);this.element.appendChild(oUnderlay);this.underlay=oUnderlay;if(bIEQuirks){this.sizeUnderlay();this.cfg.subscribeToConfigEvent("width",this.sizeUnderlay);this.cfg.subscribeToConfigEvent("height",this.sizeUnderlay);this.changeContentEvent.subscribe(this.sizeUnderlay);YAHOO.widget.Module.textResizeEvent.subscribe(this.sizeUnderlay,this,true)}if(UA.webkit&&UA.webkit<420){this.changeContentEvent.subscribe(this.forceUnderlayRedraw)}bNew=true}}function onBeforeShow(){var bNew=createUnderlay.call(this);if(!bNew&&bIEQuirks){this.sizeUnderlay()}this._underlayDeferred=false;this.beforeShowEvent.unsubscribe(onBeforeShow)}function destroyUnderlay(){if(this._underlayDeferred){this.beforeShowEvent.unsubscribe(onBeforeShow);this._underlayDeferred=false}if(oUnderlay){this.cfg.unsubscribeFromConfigEvent("width",this.sizeUnderlay);this.cfg.unsubscribeFromConfigEvent("height",this.sizeUnderlay);this.changeContentEvent.unsubscribe(this.sizeUnderlay);this.changeContentEvent.unsubscribe(this.forceUnderlayRedraw);YAHOO.widget.Module.textResizeEvent.unsubscribe(this.sizeUnderlay,this,true);this.element.removeChild(oUnderlay);this.underlay=null}}switch(sUnderlay){case"shadow":Dom.removeClass(oElement,"matte");Dom.addClass(oElement,"shadow");break;case"matte":if(!bMacGecko){destroyUnderlay.call(this)}Dom.removeClass(oElement,"shadow");Dom.addClass(oElement,"matte");break;default:if(!bMacGecko){destroyUnderlay.call(this)}Dom.removeClass(oElement,"shadow");Dom.removeClass(oElement,"matte");break}if((sUnderlay=="shadow")||(bMacGecko&&!oUnderlay)){if(this.cfg.getProperty("visible")){var bNew=createUnderlay.call(this);if(!bNew&&bIEQuirks){this.sizeUnderlay()}}else{if(!this._underlayDeferred){this.beforeShowEvent.subscribe(onBeforeShow);this._underlayDeferred=true}}}},configModal:function(type,args,obj){var modal=args[0];if(modal){if(!this._hasModalityEventListeners){this.subscribe("beforeShow",this.buildMask);this.subscribe("beforeShow",this.bringToTop);this.subscribe("beforeShow",this.showMask);this.subscribe("hide",this.hideMask);Overlay.windowResizeEvent.subscribe(this.sizeMask,this,true);this._hasModalityEventListeners=true}}else{if(this._hasModalityEventListeners){if(this.cfg.getProperty("visible")){this.hideMask();this.removeMask()}this.unsubscribe("beforeShow",this.buildMask);this.unsubscribe("beforeShow",this.bringToTop);this.unsubscribe("beforeShow",this.showMask);this.unsubscribe("hide",this.hideMask);Overlay.windowResizeEvent.unsubscribe(this.sizeMask,this);this._hasModalityEventListeners=false}}},removeMask:function(){var oMask=this.mask,oParentNode;if(oMask){this.hideMask();oParentNode=oMask.parentNode;if(oParentNode){oParentNode.removeChild(oMask)}this.mask=null}},configKeyListeners:function(type,args,obj){var listeners=args[0],listener,nListeners,i;if(listeners){if(listeners instanceof Array){nListeners=listeners.length;for(i=0;i<nListeners;i++){listener=listeners[i];if(!Config.alreadySubscribed(this.showEvent,listener.enable,listener)){this.showEvent.subscribe(listener.enable,listener,true)}if(!Config.alreadySubscribed(this.hideEvent,listener.disable,listener)){this.hideEvent.subscribe(listener.disable,listener,true);this.destroyEvent.subscribe(listener.disable,listener,true)}}}else{if(!Config.alreadySubscribed(this.showEvent,listeners.enable,listeners)){this.showEvent.subscribe(listeners.enable,listeners,true)}if(!Config.alreadySubscribed(this.hideEvent,listeners.disable,listeners)){this.hideEvent.subscribe(listeners.disable,listeners,true);this.destroyEvent.subscribe(listeners.disable,listeners,true)}}}},configStrings:function(type,args,obj){var val=Lang.merge(DEFAULT_CONFIG.STRINGS.value,args[0]);this.cfg.setProperty(DEFAULT_CONFIG.STRINGS.key,val,true)},configHeight:function(type,args,obj){var height=args[0],el=this.innerElement;Dom.setStyle(el,"height",height);this.cfg.refireEvent("iframe")},_autoFillOnHeightChange:function(type,args,el){Panel.superclass._autoFillOnHeightChange.apply(this,arguments);if(bIEQuirks){var panel=this;setTimeout(function(){panel.sizeUnderlay()},0)}},configWidth:function(type,args,obj){var width=args[0],el=this.innerElement;Dom.setStyle(el,"width",width);this.cfg.refireEvent("iframe")},configzIndex:function(type,args,obj){Panel.superclass.configzIndex.call(this,type,args,obj);if(this.mask||this.cfg.getProperty("modal")===true){var panelZ=Dom.getStyle(this.element,"zIndex");if(!panelZ||isNaN(panelZ)){panelZ=0}if(panelZ===0){this.cfg.setProperty("zIndex",1)}else{this.stackMask()}}},buildWrapper:function(){var elementParent=this.element.parentNode,originalElement=this.element,wrapper=document.createElement("div");wrapper.className=Panel.CSS_PANEL_CONTAINER;wrapper.id=originalElement.id+"_c";if(elementParent){elementParent.insertBefore(wrapper,originalElement)}wrapper.appendChild(originalElement);this.element=wrapper;this.innerElement=originalElement;Dom.setStyle(this.innerElement,"visibility","inherit")},sizeUnderlay:function(){var oUnderlay=this.underlay,oElement;if(oUnderlay){oElement=this.element;oUnderlay.style.width=oElement.offsetWidth+"px";oUnderlay.style.height=oElement.offsetHeight+"px"}},registerDragDrop:function(){var me=this;if(this.header){if(!Util.DD){return}var bDragOnly=(this.cfg.getProperty("dragonly")===true);this.dd=new Util.DD(this.element.id,this.id,{dragOnly:bDragOnly});if(!this.header.id){this.header.id=this.id+"_h"}this.dd.startDrag=function(){var offsetHeight,offsetWidth,viewPortWidth,viewPortHeight,scrollX,scrollY;if(YAHOO.env.ua.ie==6){Dom.addClass(me.element,"drag")}if(me.cfg.getProperty("constraintoviewport")){var nViewportOffset=Overlay.VIEWPORT_OFFSET;offsetHeight=me.element.offsetHeight;offsetWidth=me.element.offsetWidth;viewPortWidth=Dom.getViewportWidth();viewPortHeight=Dom.getViewportHeight();scrollX=Dom.getDocumentScrollLeft();scrollY=Dom.getDocumentScrollTop();if(offsetHeight+nViewportOffset<viewPortHeight){this.minY=scrollY+nViewportOffset;this.maxY=scrollY+viewPortHeight-offsetHeight-nViewportOffset}else{this.minY=scrollY+nViewportOffset;this.maxY=scrollY+nViewportOffset}if(offsetWidth+nViewportOffset<viewPortWidth){this.minX=scrollX+nViewportOffset;this.maxX=scrollX+viewPortWidth-offsetWidth-nViewportOffset}else{this.minX=scrollX+nViewportOffset;this.maxX=scrollX+nViewportOffset}this.constrainX=true;this.constrainY=true}else{this.constrainX=false;this.constrainY=false}me.dragEvent.fire("startDrag",arguments)};this.dd.onDrag=function(){me.syncPosition();me.cfg.refireEvent("iframe");if(this.platform=="mac"&&YAHOO.env.ua.gecko){this.showMacGeckoScrollbars()}me.dragEvent.fire("onDrag",arguments)};this.dd.endDrag=function(){if(YAHOO.env.ua.ie==6){Dom.removeClass(me.element,"drag")}me.dragEvent.fire("endDrag",arguments);me.moveEvent.fire(me.cfg.getProperty("xy"))};this.dd.setHandleElId(this.header.id);this.dd.addInvalidHandleType("INPUT");this.dd.addInvalidHandleType("SELECT");this.dd.addInvalidHandleType("TEXTAREA")}},buildMask:function(){var oMask=this.mask;if(!oMask){if(!m_oMaskTemplate){m_oMaskTemplate=document.createElement("div");m_oMaskTemplate.className="mask";m_oMaskTemplate.innerHTML="&#160;"}oMask=m_oMaskTemplate.cloneNode(true);oMask.id=this.id+"_mask";document.body.insertBefore(oMask,document.body.firstChild);this.mask=oMask;if(YAHOO.env.ua.gecko&&this.platform=="mac"){Dom.addClass(this.mask,"block-scrollbars")}this.stackMask()}},hideMask:function(){if(this.cfg.getProperty("modal")&&this.mask&&this.beforeHideMaskEvent.fire()){this.mask.style.display="none";Dom.removeClass(document.body,"masked");this.hideMaskEvent.fire()}},showMask:function(){if(this.cfg.getProperty("modal")&&this.mask&&this.beforeShowMaskEvent.fire()){Dom.addClass(document.body,"masked");this.sizeMask();this.mask.style.display="block";this.showMaskEvent.fire()}},sizeMask:function(){if(this.mask){var mask=this.mask,viewWidth=Dom.getViewportWidth(),viewHeight=Dom.getViewportHeight();if(mask.offsetHeight>viewHeight){mask.style.height=viewHeight+"px"}if(mask.offsetWidth>viewWidth){mask.style.width=viewWidth+"px"}mask.style.height=Dom.getDocumentHeight()+"px";mask.style.width=Dom.getDocumentWidth()+"px"}},stackMask:function(){if(this.mask){var panelZ=Dom.getStyle(this.element,"zIndex");if(!YAHOO.lang.isUndefined(panelZ)&&!isNaN(panelZ)){Dom.setStyle(this.mask,"zIndex",panelZ-1)}}},render:function(appendToNode){return Panel.superclass.render.call(this,appendToNode,this.innerElement)},_renderHeader:function(moduleElement){moduleElement=moduleElement||this.innerElement;Panel.superclass._renderHeader.call(this,moduleElement)},_renderBody:function(moduleElement){moduleElement=moduleElement||this.innerElement;Panel.superclass._renderBody.call(this,moduleElement)},_renderFooter:function(moduleElement){moduleElement=moduleElement||this.innerElement;Panel.superclass._renderFooter.call(this,moduleElement)},destroy:function(shallowPurge){Overlay.windowResizeEvent.unsubscribe(this.sizeMask,this);this.removeMask();if(this.close){Event.purgeElement(this.close)}Panel.superclass.destroy.call(this,shallowPurge)},forceUnderlayRedraw:function(){var u=this.underlay;Dom.addClass(u,"yui-force-redraw");setTimeout(function(){Dom.removeClass(u,"yui-force-redraw")},0)},toString:function(){return"Panel "+this.id}})}());(function(){YAHOO.widget.Dialog=function(el,userConfig){YAHOO.widget.Dialog.superclass.constructor.call(this,el,userConfig)};var Event=YAHOO.util.Event,CustomEvent=YAHOO.util.CustomEvent,Dom=YAHOO.util.Dom,Dialog=YAHOO.widget.Dialog,Lang=YAHOO.lang,EVENT_TYPES={"BEFORE_SUBMIT":"beforeSubmit","SUBMIT":"submit","MANUAL_SUBMIT":"manualSubmit","ASYNC_SUBMIT":"asyncSubmit","FORM_SUBMIT":"formSubmit","CANCEL":"cancel"},DEFAULT_CONFIG={"POST_METHOD":{key:"postmethod",value:"async"},"POST_DATA":{key:"postdata",value:null},"BUTTONS":{key:"buttons",value:"none",supercedes:["visible"]},"HIDEAFTERSUBMIT":{key:"hideaftersubmit",value:true}};Dialog.CSS_DIALOG="yui-dialog";function removeButtonEventHandlers(){var aButtons=this._aButtons,nButtons,oButton,i;if(Lang.isArray(aButtons)){nButtons=aButtons.length;if(nButtons>0){i=nButtons-1;do{oButton=aButtons[i];if(YAHOO.widget.Button&&oButton instanceof YAHOO.widget.Button){oButton.destroy()}else if(oButton.tagName.toUpperCase()=="BUTTON"){Event.purgeElement(oButton);Event.purgeElement(oButton,false)}}while(i--)}}}YAHOO.extend(Dialog,YAHOO.widget.Panel,{form:null,initDefaultConfig:function(){Dialog.superclass.initDefaultConfig.call(this);this.callback={success:null,failure:null,argument:null};this.cfg.addProperty(DEFAULT_CONFIG.POST_METHOD.key,{handler:this.configPostMethod,value:DEFAULT_CONFIG.POST_METHOD.value,validator:function(val){if(val!="form"&&val!="async"&&val!="none"&&val!="manual"){return false}else{return true}}});this.cfg.addProperty(DEFAULT_CONFIG.POST_DATA.key,{value:DEFAULT_CONFIG.POST_DATA.value});this.cfg.addProperty(DEFAULT_CONFIG.HIDEAFTERSUBMIT.key,{value:DEFAULT_CONFIG.HIDEAFTERSUBMIT.value});this.cfg.addProperty(DEFAULT_CONFIG.BUTTONS.key,{handler:this.configButtons,value:DEFAULT_CONFIG.BUTTONS.value,supercedes:DEFAULT_CONFIG.BUTTONS.supercedes})},initEvents:function(){Dialog.superclass.initEvents.call(this);var SIGNATURE=CustomEvent.LIST;this.beforeSubmitEvent=this.createEvent(EVENT_TYPES.BEFORE_SUBMIT);this.beforeSubmitEvent.signature=SIGNATURE;this.submitEvent=this.createEvent(EVENT_TYPES.SUBMIT);this.submitEvent.signature=SIGNATURE;this.manualSubmitEvent=this.createEvent(EVENT_TYPES.MANUAL_SUBMIT);this.manualSubmitEvent.signature=SIGNATURE;this.asyncSubmitEvent=this.createEvent(EVENT_TYPES.ASYNC_SUBMIT);this.asyncSubmitEvent.signature=SIGNATURE;this.formSubmitEvent=this.createEvent(EVENT_TYPES.FORM_SUBMIT);this.formSubmitEvent.signature=SIGNATURE;this.cancelEvent=this.createEvent(EVENT_TYPES.CANCEL);this.cancelEvent.signature=SIGNATURE},init:function(el,userConfig){Dialog.superclass.init.call(this,el);this.beforeInitEvent.fire(Dialog);Dom.addClass(this.element,Dialog.CSS_DIALOG);this.cfg.setProperty("visible",false);if(userConfig){this.cfg.applyConfig(userConfig,true)}this.beforeHideEvent.subscribe(this.blurButtons,this,true);this.subscribe("changeBody",this.registerForm);this.initEvent.fire(Dialog)},doSubmit:function(){var Connect=YAHOO.util.Connect,oForm=this.form,bUseFileUpload=false,bUseSecureFileUpload=false,aElements,nElements,i,formAttrs;switch(this.cfg.getProperty("postmethod")){case"async":aElements=oForm.elements;nElements=aElements.length;if(nElements>0){i=nElements-1;do{if(aElements[i].type=="file"){bUseFileUpload=true;break}}while(i--)}if(bUseFileUpload&&YAHOO.env.ua.ie&&this.isSecure){bUseSecureFileUpload=true}formAttrs=this._getFormAttributes(oForm);Connect.setForm(oForm,bUseFileUpload,bUseSecureFileUpload);var postData=this.cfg.getProperty("postdata");var c=Connect.asyncRequest(formAttrs.method,formAttrs.action,this.callback,postData);this.asyncSubmitEvent.fire(c);break;case"form":oForm.submit();this.formSubmitEvent.fire();break;case"none":case"manual":this.manualSubmitEvent.fire();break}},_getFormAttributes:function(oForm){var attrs={method:null,action:null};if(oForm){if(oForm.getAttributeNode){var action=oForm.getAttributeNode("action");var method=oForm.getAttributeNode("method");if(action){attrs.action=action.value}if(method){attrs.method=method.value}}else{attrs.action=oForm.getAttribute("action");attrs.method=oForm.getAttribute("method")}}attrs.method=(Lang.isString(attrs.method)?attrs.method:"POST").toUpperCase();attrs.action=Lang.isString(attrs.action)?attrs.action:"";return attrs},registerForm:function(){var form=this.element.getElementsByTagName("form")[0];if(this.form){if(this.form==form&&Dom.isAncestor(this.element,this.form)){return}else{Event.purgeElement(this.form);this.form=null}}if(!form){form=document.createElement("form");form.name="frm_"+this.id;this.body.appendChild(form)}if(form){this.form=form;Event.on(form,"submit",this._submitHandler,this,true)}},_submitHandler:function(e){Event.stopEvent(e);this.submit();this.form.blur()},setTabLoop:function(firstElement,lastElement){firstElement=firstElement||this.firstButton;lastElement=lastElement||this.lastButton;Dialog.superclass.setTabLoop.call(this,firstElement,lastElement)},_setTabLoop:function(firstElement,lastElement){firstElement=firstElement||this.firstButton;lastElement=this.lastButton||lastElement;this.setTabLoop(firstElement,lastElement)},setFirstLastFocusable:function(){Dialog.superclass.setFirstLastFocusable.call(this);var i,l,el,elements=this.focusableElements;this.firstFormElement=null;this.lastFormElement=null;if(this.form&&elements&&elements.length>0){l=elements.length;for(i=0;i<l;++i){el=elements[i];if(this.form===el.form){this.firstFormElement=el;break}}for(i=l-1;i>=0;--i){el=elements[i];if(this.form===el.form){this.lastFormElement=el;break}}}},configClose:function(type,args,obj){Dialog.superclass.configClose.apply(this,arguments)},_doClose:function(e){Event.preventDefault(e);this.cancel()},configButtons:function(type,args,obj){var Button=YAHOO.widget.Button,aButtons=args[0],oInnerElement=this.innerElement,oButton,oButtonEl,oYUIButton,nButtons,oSpan,oFooter,i;removeButtonEventHandlers.call(this);this._aButtons=null;if(Lang.isArray(aButtons)){oSpan=document.createElement("span");oSpan.className="button-group";nButtons=aButtons.length;this._aButtons=[];this.defaultHtmlButton=null;for(i=0;i<nButtons;i++){oButton=aButtons[i];if(Button){oYUIButton=new Button({label:oButton.text,type:oButton.type});oYUIButton.appendTo(oSpan);oButtonEl=oYUIButton.get("element");if(oButton.isDefault){oYUIButton.addClass("default");this.defaultHtmlButton=oButtonEl}if(Lang.isFunction(oButton.handler)){oYUIButton.set("onclick",{fn:oButton.handler,obj:this,scope:this})}else if(Lang.isObject(oButton.handler)&&Lang.isFunction(oButton.handler.fn)){oYUIButton.set("onclick",{fn:oButton.handler.fn,obj:((!Lang.isUndefined(oButton.handler.obj))?oButton.handler.obj:this),scope:(oButton.handler.scope||this)})}this._aButtons[this._aButtons.length]=oYUIButton}else{oButtonEl=document.createElement("button");oButtonEl.setAttribute("type","button");if(oButton.isDefault){oButtonEl.className="default";this.defaultHtmlButton=oButtonEl}oButtonEl.innerHTML=oButton.text;if(Lang.isFunction(oButton.handler)){Event.on(oButtonEl,"click",oButton.handler,this,true)}else if(Lang.isObject(oButton.handler)&&Lang.isFunction(oButton.handler.fn)){Event.on(oButtonEl,"click",oButton.handler.fn,((!Lang.isUndefined(oButton.handler.obj))?oButton.handler.obj:this),(oButton.handler.scope||this))}oSpan.appendChild(oButtonEl);this._aButtons[this._aButtons.length]=oButtonEl}oButton.htmlButton=oButtonEl;if(i===0){this.firstButton=oButtonEl}if(i==(nButtons-1)){this.lastButton=oButtonEl}}this.setFooter(oSpan);oFooter=this.footer;if(Dom.inDocument(this.element)&&!Dom.isAncestor(oInnerElement,oFooter)){oInnerElement.appendChild(oFooter)}this.buttonSpan=oSpan}else{oSpan=this.buttonSpan;oFooter=this.footer;if(oSpan&&oFooter){oFooter.removeChild(oSpan);this.buttonSpan=null;this.firstButton=null;this.lastButton=null;this.defaultHtmlButton=null}}this.changeContentEvent.fire()},getButtons:function(){return this._aButtons||null},focusFirst:function(type,args,obj){var el=this.firstFormElement,focused=false;if(args&&args[1]){Event.stopEvent(args[1]);if(args[0]===9&&this.firstElement){el=this.firstElement}}if(el){try{el.focus();focused=true}catch(oException){}}else{if(this.defaultHtmlButton){focused=this.focusDefaultButton()}else{focused=this.focusFirstButton()}}return focused},focusLast:function(type,args,obj){var aButtons=this.cfg.getProperty("buttons"),el=this.lastFormElement,focused=false;if(args&&args[1]){Event.stopEvent(args[1]);if(args[0]===9&&this.lastElement){el=this.lastElement}}if(aButtons&&Lang.isArray(aButtons)){focused=this.focusLastButton()}else{if(el){try{el.focus();focused=true}catch(oException){}}}return focused},_getButton:function(button){var Button=YAHOO.widget.Button;if(Button&&button&&button.nodeName&&button.id){button=Button.getButton(button.id)||button}return button},focusDefaultButton:function(){var button=this._getButton(this.defaultHtmlButton),focused=false;if(button){try{button.focus();focused=true}catch(oException){}}return focused},blurButtons:function(){var aButtons=this.cfg.getProperty("buttons"),nButtons,oButton,oElement,i;if(aButtons&&Lang.isArray(aButtons)){nButtons=aButtons.length;if(nButtons>0){i=(nButtons-1);do{oButton=aButtons[i];if(oButton){oElement=this._getButton(oButton.htmlButton);if(oElement){try{oElement.blur()}catch(oException){}}}}while(i--)}}},focusFirstButton:function(){var aButtons=this.cfg.getProperty("buttons"),oButton,oElement,focused=false;if(aButtons&&Lang.isArray(aButtons)){oButton=aButtons[0];if(oButton){oElement=this._getButton(oButton.htmlButton);if(oElement){try{oElement.focus();focused=true}catch(oException){}}}}return focused},focusLastButton:function(){var aButtons=this.cfg.getProperty("buttons"),nButtons,oButton,oElement,focused=false;if(aButtons&&Lang.isArray(aButtons)){nButtons=aButtons.length;if(nButtons>0){oButton=aButtons[(nButtons-1)];if(oButton){oElement=this._getButton(oButton.htmlButton);if(oElement){try{oElement.focus();focused=true}catch(oException){}}}}}return focused},configPostMethod:function(type,args,obj){this.registerForm()},validate:function(){return true},submit:function(){if(this.validate()){if(this.beforeSubmitEvent.fire()){this.doSubmit();this.submitEvent.fire();if(this.cfg.getProperty("hideaftersubmit")){this.hide()}return true}else{return false}}else{return false}},cancel:function(){this.cancelEvent.fire();this.hide()},getData:function(){var oForm=this.form,aElements,nTotalElements,oData,sName,oElement,nElements,sType,sTagName,aOptions,nOptions,aValues,oOption,oRadio,oCheckbox,valueAttr,i,n;function isFormElement(p_oElement){var sTag=p_oElement.tagName.toUpperCase();return((sTag=="INPUT"||sTag=="TEXTAREA"||sTag=="SELECT")&&p_oElement.name==sName)}if(oForm){aElements=oForm.elements;nTotalElements=aElements.length;oData={};for(i=0;i<nTotalElements;i++){sName=aElements[i].name;oElement=Dom.getElementsBy(isFormElement,"*",oForm);nElements=oElement.length;if(nElements>0){if(nElements==1){oElement=oElement[0];sType=oElement.type;sTagName=oElement.tagName.toUpperCase();switch(sTagName){case"INPUT":if(sType=="checkbox"){oData[sName]=oElement.checked}else if(sType!="radio"){oData[sName]=oElement.value}break;case"TEXTAREA":oData[sName]=oElement.value;break;case"SELECT":aOptions=oElement.options;nOptions=aOptions.length;aValues=[];for(n=0;n<nOptions;n++){oOption=aOptions[n];if(oOption.selected){valueAttr=oOption.attributes.value;aValues[aValues.length]=(valueAttr&&valueAttr.specified)?oOption.value:oOption.text}}oData[sName]=aValues;break}}else{sType=oElement[0].type;switch(sType){case"radio":for(n=0;n<nElements;n++){oRadio=oElement[n];if(oRadio.checked){oData[sName]=oRadio.value;break}}break;case"checkbox":aValues=[];for(n=0;n<nElements;n++){oCheckbox=oElement[n];if(oCheckbox.checked){aValues[aValues.length]=oCheckbox.value}}oData[sName]=aValues;break}}}}}return oData},destroy:function(shallowPurge){removeButtonEventHandlers.call(this);this._aButtons=null;var aForms=this.element.getElementsByTagName("form"),oForm;if(aForms.length>0){oForm=aForms[0];if(oForm){Event.purgeElement(oForm);if(oForm.parentNode){oForm.parentNode.removeChild(oForm)}this.form=null}}Dialog.superclass.destroy.call(this,shallowPurge)},toString:function(){return"Dialog "+this.id}})}());(function(){YAHOO.widget.SimpleDialog=function(el,userConfig){YAHOO.widget.SimpleDialog.superclass.constructor.call(this,el,userConfig)};var Dom=YAHOO.util.Dom,SimpleDialog=YAHOO.widget.SimpleDialog,DEFAULT_CONFIG={"ICON":{key:"icon",value:"none",suppressEvent:true},"TEXT":{key:"text",value:"",suppressEvent:true,supercedes:["icon"]}};SimpleDialog.ICON_BLOCK="blckicon";SimpleDialog.ICON_ALARM="alrticon";SimpleDialog.ICON_HELP="hlpicon";SimpleDialog.ICON_INFO="infoicon";SimpleDialog.ICON_WARN="warnicon";SimpleDialog.ICON_TIP="tipicon";SimpleDialog.ICON_CSS_CLASSNAME="yui-icon";SimpleDialog.CSS_SIMPLEDIALOG="yui-simple-dialog";YAHOO.extend(SimpleDialog,YAHOO.widget.Dialog,{initDefaultConfig:function(){SimpleDialog.superclass.initDefaultConfig.call(this);this.cfg.addProperty(DEFAULT_CONFIG.ICON.key,{handler:this.configIcon,value:DEFAULT_CONFIG.ICON.value,suppressEvent:DEFAULT_CONFIG.ICON.suppressEvent});this.cfg.addProperty(DEFAULT_CONFIG.TEXT.key,{handler:this.configText,value:DEFAULT_CONFIG.TEXT.value,suppressEvent:DEFAULT_CONFIG.TEXT.suppressEvent,supercedes:DEFAULT_CONFIG.TEXT.supercedes})},init:function(el,userConfig){SimpleDialog.superclass.init.call(this,el);this.beforeInitEvent.fire(SimpleDialog);Dom.addClass(this.element,SimpleDialog.CSS_SIMPLEDIALOG);this.cfg.queueProperty("postmethod","manual");if(userConfig){this.cfg.applyConfig(userConfig,true)}this.beforeRenderEvent.subscribe(function(){if(!this.body){this.setBody("")}},this,true);this.initEvent.fire(SimpleDialog)},registerForm:function(){SimpleDialog.superclass.registerForm.call(this);var doc=this.form.ownerDocument,input=doc.createElement("input");input.type="hidden";input.name=this.id;input.value="";this.form.appendChild(input)},configIcon:function(type,args,obj){var sIcon=args[0],oBody=this.body,sCSSClass=SimpleDialog.ICON_CSS_CLASSNAME,aElements,oIcon,oIconParent;if(sIcon&&sIcon!="none"){aElements=Dom.getElementsByClassName(sCSSClass,"*",oBody);if(aElements.length===1){oIcon=aElements[0];oIconParent=oIcon.parentNode;if(oIconParent){oIconParent.removeChild(oIcon);oIcon=null}}if(sIcon.indexOf(".")==-1){oIcon=document.createElement("span");oIcon.className=(sCSSClass+" "+sIcon);oIcon.innerHTML="&#160;"}else{oIcon=document.createElement("img");oIcon.src=(this.imageRoot+sIcon);oIcon.className=sCSSClass}if(oIcon){oBody.insertBefore(oIcon,oBody.firstChild)}}},configText:function(type,args,obj){var text=args[0];if(text){this.setBody(text);this.cfg.refireEvent("icon")}},toString:function(){return"SimpleDialog "+this.id}})}());(function(){YAHOO.widget.ContainerEffect=function(overlay,attrIn,attrOut,targetElement,animClass){if(!animClass){animClass=YAHOO.util.Anim}this.overlay=overlay;this.attrIn=attrIn;this.attrOut=attrOut;this.targetElement=targetElement||overlay.element;this.animClass=animClass};var Dom=YAHOO.util.Dom,CustomEvent=YAHOO.util.CustomEvent,ContainerEffect=YAHOO.widget.ContainerEffect;ContainerEffect.FADE=function(overlay,dur){var Easing=YAHOO.util.Easing,fin={attributes:{opacity:{from:0,to:1}},duration:dur,method:Easing.easeIn},fout={attributes:{opacity:{to:0}},duration:dur,method:Easing.easeOut},fade=new ContainerEffect(overlay,fin,fout,overlay.element);fade.handleUnderlayStart=function(){var underlay=this.overlay.underlay;if(underlay&&YAHOO.env.ua.ie){var hasFilters=(underlay.filters&&underlay.filters.length>0);if(hasFilters){Dom.addClass(overlay.element,"yui-effect-fade")}}};fade.handleUnderlayComplete=function(){var underlay=this.overlay.underlay;if(underlay&&YAHOO.env.ua.ie){Dom.removeClass(overlay.element,"yui-effect-fade")}};fade.handleStartAnimateIn=function(type,args,obj){obj.overlay._fadingIn=true;Dom.addClass(obj.overlay.element,"hide-select");if(!obj.overlay.underlay){obj.overlay.cfg.refireEvent("underlay")}obj.handleUnderlayStart();obj.overlay._setDomVisibility(true);Dom.setStyle(obj.overlay.element,"opacity",0)};fade.handleCompleteAnimateIn=function(type,args,obj){obj.overlay._fadingIn=false;Dom.removeClass(obj.overlay.element,"hide-select");if(obj.overlay.element.style.filter){obj.overlay.element.style.filter=null}obj.handleUnderlayComplete();obj.overlay.cfg.refireEvent("iframe");obj.animateInCompleteEvent.fire()};fade.handleStartAnimateOut=function(type,args,obj){obj.overlay._fadingOut=true;Dom.addClass(obj.overlay.element,"hide-select");obj.handleUnderlayStart()};fade.handleCompleteAnimateOut=function(type,args,obj){obj.overlay._fadingOut=false;Dom.removeClass(obj.overlay.element,"hide-select");if(obj.overlay.element.style.filter){obj.overlay.element.style.filter=null}obj.overlay._setDomVisibility(false);Dom.setStyle(obj.overlay.element,"opacity",1);obj.handleUnderlayComplete();obj.overlay.cfg.refireEvent("iframe");obj.animateOutCompleteEvent.fire()};fade.init();return fade};ContainerEffect.SLIDE=function(overlay,dur){var Easing=YAHOO.util.Easing,x=overlay.cfg.getProperty("x")||Dom.getX(overlay.element),y=overlay.cfg.getProperty("y")||Dom.getY(overlay.element),clientWidth=Dom.getClientWidth(),offsetWidth=overlay.element.offsetWidth,sin={attributes:{points:{to:[x,y]}},duration:dur,method:Easing.easeIn},sout={attributes:{points:{to:[(clientWidth+25),y]}},duration:dur,method:Easing.easeOut},slide=new ContainerEffect(overlay,sin,sout,overlay.element,YAHOO.util.Motion);slide.handleStartAnimateIn=function(type,args,obj){obj.overlay.element.style.left=((-25)-offsetWidth)+"px";obj.overlay.element.style.top=y+"px"};slide.handleTweenAnimateIn=function(type,args,obj){var pos=Dom.getXY(obj.overlay.element),currentX=pos[0],currentY=pos[1];if(Dom.getStyle(obj.overlay.element,"visibility")=="hidden"&&currentX<x){obj.overlay._setDomVisibility(true)}obj.overlay.cfg.setProperty("xy",[currentX,currentY],true);obj.overlay.cfg.refireEvent("iframe")};slide.handleCompleteAnimateIn=function(type,args,obj){obj.overlay.cfg.setProperty("xy",[x,y],true);obj.startX=x;obj.startY=y;obj.overlay.cfg.refireEvent("iframe");obj.animateInCompleteEvent.fire()};slide.handleStartAnimateOut=function(type,args,obj){var vw=Dom.getViewportWidth(),pos=Dom.getXY(obj.overlay.element),yso=pos[1];obj.animOut.attributes.points.to=[(vw+25),yso]};slide.handleTweenAnimateOut=function(type,args,obj){var pos=Dom.getXY(obj.overlay.element),xto=pos[0],yto=pos[1];obj.overlay.cfg.setProperty("xy",[xto,yto],true);obj.overlay.cfg.refireEvent("iframe")};slide.handleCompleteAnimateOut=function(type,args,obj){obj.overlay._setDomVisibility(false);obj.overlay.cfg.setProperty("xy",[x,y]);obj.animateOutCompleteEvent.fire()};slide.init();return slide};ContainerEffect.prototype={init:function(){this.beforeAnimateInEvent=this.createEvent("beforeAnimateIn");this.beforeAnimateInEvent.signature=CustomEvent.LIST;this.beforeAnimateOutEvent=this.createEvent("beforeAnimateOut");this.beforeAnimateOutEvent.signature=CustomEvent.LIST;this.animateInCompleteEvent=this.createEvent("animateInComplete");this.animateInCompleteEvent.signature=CustomEvent.LIST;this.animateOutCompleteEvent=this.createEvent("animateOutComplete");this.animateOutCompleteEvent.signature=CustomEvent.LIST;this.animIn=new this.animClass(this.targetElement,this.attrIn.attributes,this.attrIn.duration,this.attrIn.method);this.animIn.onStart.subscribe(this.handleStartAnimateIn,this);this.animIn.onTween.subscribe(this.handleTweenAnimateIn,this);this.animIn.onComplete.subscribe(this.handleCompleteAnimateIn,this);this.animOut=new this.animClass(this.targetElement,this.attrOut.attributes,this.attrOut.duration,this.attrOut.method);this.animOut.onStart.subscribe(this.handleStartAnimateOut,this);this.animOut.onTween.subscribe(this.handleTweenAnimateOut,this);this.animOut.onComplete.subscribe(this.handleCompleteAnimateOut,this)},animateIn:function(){this._stopAnims(this.lastFrameOnStop);this.beforeAnimateInEvent.fire();this.animIn.animate()},animateOut:function(){this._stopAnims(this.lastFrameOnStop);this.beforeAnimateOutEvent.fire();this.animOut.animate()},lastFrameOnStop:true,_stopAnims:function(finish){if(this.animOut&&this.animOut.isAnimated()){this.animOut.stop(finish)}if(this.animIn&&this.animIn.isAnimated()){this.animIn.stop(finish)}},handleStartAnimateIn:function(type,args,obj){},handleTweenAnimateIn:function(type,args,obj){},handleCompleteAnimateIn:function(type,args,obj){},handleStartAnimateOut:function(type,args,obj){},handleTweenAnimateOut:function(type,args,obj){},handleCompleteAnimateOut:function(type,args,obj){},toString:function(){var output="ContainerEffect";if(this.overlay){output+=" ["+this.overlay.toString()+"]"}return output}};YAHOO.lang.augmentProto(ContainerEffect,YAHOO.util.EventProvider)})();YAHOO.register("container",YAHOO.widget.Module,{version:"2.9.0",build:"2800"});
//
//../pacotes/yui290/build/element/element-min.js
/*
Copyright (c) 2011, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 2.9.0
*/
YAHOO.util.Attribute=function(b,a){if(a){this.owner=a;this.configure(b,true);}};YAHOO.util.Attribute.INVALID_VALUE={};YAHOO.util.Attribute.prototype={name:undefined,value:null,owner:null,readOnly:false,writeOnce:false,_initialConfig:null,_written:false,method:null,setter:null,getter:null,validator:null,getValue:function(){var a=this.value;if(this.getter){a=this.getter.call(this.owner,this.name,a);}return a;},setValue:function(f,b){var e,a=this.owner,c=this.name,g=YAHOO.util.Attribute.INVALID_VALUE,d={type:c,prevValue:this.getValue(),newValue:f};if(this.readOnly||(this.writeOnce&&this._written)){return false;}if(this.validator&&!this.validator.call(a,f)){return false;}if(!b){e=a.fireBeforeChangeEvent(d);if(e===false){return false;}}if(this.setter){f=this.setter.call(a,f,this.name);if(f===undefined){}if(f===g){return false;}}if(this.method){if(this.method.call(a,f,this.name)===g){return false;}}this.value=f;this._written=true;d.type=c;if(!b){this.owner.fireChangeEvent(d);}return true;},configure:function(b,c){b=b||{};if(c){this._written=false;}this._initialConfig=this._initialConfig||{};for(var a in b){if(b.hasOwnProperty(a)){this[a]=b[a];if(c){this._initialConfig[a]=b[a];}}}},resetValue:function(){return this.setValue(this._initialConfig.value);},resetConfig:function(){this.configure(this._initialConfig,true);},refresh:function(a){this.setValue(this.value,a);}};(function(){var a=YAHOO.util.Lang;YAHOO.util.AttributeProvider=function(){};YAHOO.util.AttributeProvider.prototype={_configs:null,get:function(c){this._configs=this._configs||{};var b=this._configs[c];if(!b||!this._configs.hasOwnProperty(c)){return null;}return b.getValue();},set:function(d,e,b){this._configs=this._configs||{};var c=this._configs[d];if(!c){return false;}return c.setValue(e,b);},getAttributeKeys:function(){this._configs=this._configs;var c=[],b;for(b in this._configs){if(a.hasOwnProperty(this._configs,b)&&!a.isUndefined(this._configs[b])){c[c.length]=b;}}return c;},setAttributes:function(d,b){for(var c in d){if(a.hasOwnProperty(d,c)){this.set(c,d[c],b);}}},resetValue:function(c,b){this._configs=this._configs||{};if(this._configs[c]){this.set(c,this._configs[c]._initialConfig.value,b);return true;}return false;},refresh:function(e,c){this._configs=this._configs||{};var f=this._configs;e=((a.isString(e))?[e]:e)||this.getAttributeKeys();for(var d=0,b=e.length;d<b;++d){if(f.hasOwnProperty(e[d])){this._configs[e[d]].refresh(c);}}},register:function(b,c){this.setAttributeConfig(b,c);},getAttributeConfig:function(c){this._configs=this._configs||{};var b=this._configs[c]||{};var d={};for(c in b){if(a.hasOwnProperty(b,c)){d[c]=b[c];}}return d;},setAttributeConfig:function(b,c,d){this._configs=this._configs||{};c=c||{};if(!this._configs[b]){c.name=b;this._configs[b]=this.createAttribute(c);}else{this._configs[b].configure(c,d);}},configureAttribute:function(b,c,d){this.setAttributeConfig(b,c,d);},resetAttributeConfig:function(b){this._configs=this._configs||{};this._configs[b].resetConfig();},subscribe:function(b,c){this._events=this._events||{};if(!(b in this._events)){this._events[b]=this.createEvent(b);}YAHOO.util.EventProvider.prototype.subscribe.apply(this,arguments);},on:function(){this.subscribe.apply(this,arguments);},addListener:function(){this.subscribe.apply(this,arguments);},fireBeforeChangeEvent:function(c){var b="before";b+=c.type.charAt(0).toUpperCase()+c.type.substr(1)+"Change";c.type=b;return this.fireEvent(c.type,c);},fireChangeEvent:function(b){b.type+="Change";return this.fireEvent(b.type,b);},createAttribute:function(b){return new YAHOO.util.Attribute(b,this);}};YAHOO.augment(YAHOO.util.AttributeProvider,YAHOO.util.EventProvider);})();(function(){var b=YAHOO.util.Dom,d=YAHOO.util.AttributeProvider,c={mouseenter:true,mouseleave:true};var a=function(e,f){this.init.apply(this,arguments);};a.DOM_EVENTS={"click":true,"dblclick":true,"keydown":true,"keypress":true,"keyup":true,"mousedown":true,"mousemove":true,"mouseout":true,"mouseover":true,"mouseup":true,"mouseenter":true,"mouseleave":true,"focus":true,"blur":true,"submit":true,"change":true};a.prototype={DOM_EVENTS:null,DEFAULT_HTML_SETTER:function(g,e){var f=this.get("element");if(f){f[e]=g;}return g;},DEFAULT_HTML_GETTER:function(e){var f=this.get("element"),g;if(f){g=f[e];}return g;},appendChild:function(e){e=e.get?e.get("element"):e;return this.get("element").appendChild(e);},getElementsByTagName:function(e){return this.get("element").getElementsByTagName(e);},hasChildNodes:function(){return this.get("element").hasChildNodes();},insertBefore:function(e,f){e=e.get?e.get("element"):e;f=(f&&f.get)?f.get("element"):f;return this.get("element").insertBefore(e,f);},removeChild:function(e){e=e.get?e.get("element"):e;return this.get("element").removeChild(e);},replaceChild:function(e,f){e=e.get?e.get("element"):e;f=f.get?f.get("element"):f;return this.get("element").replaceChild(e,f);},initAttributes:function(e){},addListener:function(j,i,k,h){h=h||this;var e=YAHOO.util.Event,g=this.get("element")||this.get("id"),f=this;if(c[j]&&!e._createMouseDelegate){return false;}if(!this._events[j]){if(g&&this.DOM_EVENTS[j]){e.on(g,j,function(m,l){if(m.srcElement&&!m.target){m.target=m.srcElement;}if((m.toElement&&!m.relatedTarget)||(m.fromElement&&!m.relatedTarget)){m.relatedTarget=e.getRelatedTarget(m);}if(!m.currentTarget){m.currentTarget=g;}f.fireEvent(j,m,l);},k,h);}this.createEvent(j,{scope:this});}return YAHOO.util.EventProvider.prototype.subscribe.apply(this,arguments);},on:function(){return this.addListener.apply(this,arguments);},subscribe:function(){return this.addListener.apply(this,arguments);},removeListener:function(f,e){return this.unsubscribe.apply(this,arguments);},addClass:function(e){b.addClass(this.get("element"),e);},getElementsByClassName:function(f,e){return b.getElementsByClassName(f,e,this.get("element"));},hasClass:function(e){return b.hasClass(this.get("element"),e);},removeClass:function(e){return b.removeClass(this.get("element"),e);},replaceClass:function(f,e){return b.replaceClass(this.get("element"),f,e);
},setStyle:function(f,e){return b.setStyle(this.get("element"),f,e);},getStyle:function(e){return b.getStyle(this.get("element"),e);},fireQueue:function(){var f=this._queue;for(var g=0,e=f.length;g<e;++g){this[f[g][0]].apply(this,f[g][1]);}},appendTo:function(f,g){f=(f.get)?f.get("element"):b.get(f);this.fireEvent("beforeAppendTo",{type:"beforeAppendTo",target:f});g=(g&&g.get)?g.get("element"):b.get(g);var e=this.get("element");if(!e){return false;}if(!f){return false;}if(e.parent!=f){if(g){f.insertBefore(e,g);}else{f.appendChild(e);}}this.fireEvent("appendTo",{type:"appendTo",target:f});return e;},get:function(e){var g=this._configs||{},f=g.element;if(f&&!g[e]&&!YAHOO.lang.isUndefined(f.value[e])){this._setHTMLAttrConfig(e);}return d.prototype.get.call(this,e);},setAttributes:function(l,h){var f={},j=this._configOrder;for(var k=0,e=j.length;k<e;++k){if(l[j[k]]!==undefined){f[j[k]]=true;this.set(j[k],l[j[k]],h);}}for(var g in l){if(l.hasOwnProperty(g)&&!f[g]){this.set(g,l[g],h);}}},set:function(f,h,e){var g=this.get("element");if(!g){this._queue[this._queue.length]=["set",arguments];if(this._configs[f]){this._configs[f].value=h;}return;}if(!this._configs[f]&&!YAHOO.lang.isUndefined(g[f])){this._setHTMLAttrConfig(f);}return d.prototype.set.apply(this,arguments);},setAttributeConfig:function(e,f,g){this._configOrder.push(e);d.prototype.setAttributeConfig.apply(this,arguments);},createEvent:function(f,e){this._events[f]=true;return d.prototype.createEvent.apply(this,arguments);},init:function(f,e){this._initElement(f,e);},destroy:function(){var e=this.get("element");YAHOO.util.Event.purgeElement(e,true);this.unsubscribeAll();if(e&&e.parentNode){e.parentNode.removeChild(e);}this._queue=[];this._events={};this._configs={};this._configOrder=[];},_initElement:function(g,f){this._queue=this._queue||[];this._events=this._events||{};this._configs=this._configs||{};this._configOrder=[];f=f||{};f.element=f.element||g||null;var i=false;var e=a.DOM_EVENTS;this.DOM_EVENTS=this.DOM_EVENTS||{};for(var h in e){if(e.hasOwnProperty(h)){this.DOM_EVENTS[h]=e[h];}}if(typeof f.element==="string"){this._setHTMLAttrConfig("id",{value:f.element});}if(b.get(f.element)){i=true;this._initHTMLElement(f);this._initContent(f);}YAHOO.util.Event.onAvailable(f.element,function(){if(!i){this._initHTMLElement(f);}this.fireEvent("available",{type:"available",target:b.get(f.element)});},this,true);YAHOO.util.Event.onContentReady(f.element,function(){if(!i){this._initContent(f);}this.fireEvent("contentReady",{type:"contentReady",target:b.get(f.element)});},this,true);},_initHTMLElement:function(e){this.setAttributeConfig("element",{value:b.get(e.element),readOnly:true});},_initContent:function(e){this.initAttributes(e);this.setAttributes(e,true);this.fireQueue();},_setHTMLAttrConfig:function(e,g){var f=this.get("element");g=g||{};g.name=e;g.setter=g.setter||this.DEFAULT_HTML_SETTER;g.getter=g.getter||this.DEFAULT_HTML_GETTER;g.value=g.value||f[e];this._configs[e]=new YAHOO.util.Attribute(g,this);}};YAHOO.augment(a,d);YAHOO.util.Element=a;})();YAHOO.register("element",YAHOO.util.Element,{version:"2.9.0",build:"2800"});
//
//../pacotes/yui290/build/tabview/tabview-min.js
/*
Copyright (c) 2011, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 2.9.0
*/
(function(){var b=YAHOO.util,c=b.Dom,i=b.Event,g=window.document,k="active",d="activeIndex",f="activeTab",e="disabled",a="contentEl",h="element",j=function(m,l){l=l||{};if(arguments.length==1&&!YAHOO.lang.isString(m)&&!m.nodeName){l=m;m=l.element||null;}if(!m&&!l.element){m=this._createTabViewElement(l);}j.superclass.constructor.call(this,m,l);};YAHOO.extend(j,b.Element,{CLASSNAME:"yui-navset",TAB_PARENT_CLASSNAME:"yui-nav",CONTENT_PARENT_CLASSNAME:"yui-content",_tabParent:null,_contentParent:null,addTab:function(n,o){var p=this.get("tabs"),s=this._tabParent,q=this._contentParent,l=n.get(h),m=n.get(a),t=this.get(d),r;if(!p){this._queue[this._queue.length]=["addTab",arguments];return false;}r=this.getTab(o);o=(o===undefined)?p.length:o;p.splice(o,0,n);if(r){s.insertBefore(l,r.get(h));if(m){q.appendChild(m);}}else{s.appendChild(l);if(m){q.appendChild(m);}}if(!n.get(k)){n.set("contentVisible",false,true);if(o<=t){this.set(d,t+1,true);}}else{this.set(f,n,true);this.set("activeIndex",o,true);}this._initTabEvents(n);},_initTabEvents:function(l){l.addListener(l.get("activationEvent"),l._onActivate,this,l);l.addListener("activationEventChange",l._onActivationEventChange,this,l);},_removeTabEvents:function(l){l.removeListener(l.get("activationEvent"),l._onActivate,this,l);l.removeListener("activationEventChange",l._onActivationEventChange,this,l);},DOMEventHandler:function(q){var r=i.getTarget(q),t=this._tabParent,s=this.get("tabs"),n,m,l;if(c.isAncestor(t,r)){for(var o=0,p=s.length;o<p;o++){m=s[o].get(h);l=s[o].get(a);if(r==m||c.isAncestor(m,r)){n=s[o];break;}}if(n){n.fireEvent(q.type,q);}}},getTab:function(l){return this.get("tabs")[l];},getTabIndex:function(p){var m=null,o=this.get("tabs");for(var n=0,l=o.length;n<l;++n){if(p==o[n]){m=n;break;}}return m;},removeTab:function(o){var n=this.get("tabs").length,l=this.get(d),m=this.getTabIndex(o);if(o===this.get(f)){if(n>1){if(m+1===n){this.set(d,m-1);}else{this.set(d,m+1);}}else{this.set(f,null);}}else{if(m<l){this.set(d,l-1,true);}}this._removeTabEvents(o);this._tabParent.removeChild(o.get(h));this._contentParent.removeChild(o.get(a));this._configs.tabs.value.splice(m,1);o.fireEvent("remove",{type:"remove",tabview:this});},toString:function(){var l=this.get("id")||this.get("tagName");return"TabView "+l;},contentTransition:function(m,l){if(m){m.set("contentVisible",true);}if(l){l.set("contentVisible",false);}},initAttributes:function(l){j.superclass.initAttributes.call(this,l);if(!l.orientation){l.orientation="top";}var n=this.get(h);if(!this.hasClass(this.CLASSNAME)){this.addClass(this.CLASSNAME);}this.setAttributeConfig("tabs",{value:[],readOnly:true});this._tabParent=this.getElementsByClassName(this.TAB_PARENT_CLASSNAME,"ul")[0]||this._createTabParent();this._contentParent=this.getElementsByClassName(this.CONTENT_PARENT_CLASSNAME,"div")[0]||this._createContentParent();this.setAttributeConfig("orientation",{value:l.orientation,method:function(o){var p=this.get("orientation");this.addClass("yui-navset-"+o);if(p!=o){this.removeClass("yui-navset-"+p);}if(o==="bottom"){this.appendChild(this._tabParent);}}});this.setAttributeConfig(d,{value:l.activeIndex,validator:function(q){var o=true,p;if(q){p=this.getTab(q);if(p&&p.get(e)){o=false;}}return o;}});this.setAttributeConfig(f,{value:l[f],method:function(p){var o=this.get(f);if(p){p.set(k,true);}if(o&&o!==p){o.set(k,false);}if(o&&p!==o){this.contentTransition(p,o);}else{if(p){p.set("contentVisible",true);}}},validator:function(p){var o=true;if(p&&p.get(e)){o=false;}return o;}});this.on("activeTabChange",this._onActiveTabChange);this.on("activeIndexChange",this._onActiveIndexChange);if(this._tabParent){this._initTabs();}this.DOM_EVENTS.submit=false;this.DOM_EVENTS.focus=false;this.DOM_EVENTS.blur=false;this.DOM_EVENTS.change=false;for(var m in this.DOM_EVENTS){if(YAHOO.lang.hasOwnProperty(this.DOM_EVENTS,m)){this.addListener.call(this,m,this.DOMEventHandler);}}},deselectTab:function(l){if(this.getTab(l)===this.get(f)){this.set(f,null);}},selectTab:function(l){this.set(f,this.getTab(l));},_onActiveTabChange:function(n){var l=this.get(d),m=this.getTabIndex(n.newValue);if(l!==m){if(!(this.set(d,m))){this.set(f,n.prevValue);}}},_onActiveIndexChange:function(l){if(l.newValue!==this.getTabIndex(this.get(f))){if(!(this.set(f,this.getTab(l.newValue)))){this.set(d,l.prevValue);}}},_initTabs:function(){var q=c.getChildren(this._tabParent),o=c.getChildren(this._contentParent),n=this.get(d),r,m,s;for(var p=0,l=q.length;p<l;++p){m={};if(o[p]){m.contentEl=o[p];}r=new YAHOO.widget.Tab(q[p],m);this.addTab(r);if(r.hasClass(r.ACTIVE_CLASSNAME)){s=r;}}if(n!=undefined){this.set(f,this.getTab(n));}else{this._configs[f].value=s;this._configs[d].value=this.getTabIndex(s);}},_createTabViewElement:function(l){var m=g.createElement("div");if(this.CLASSNAME){m.className=this.CLASSNAME;}return m;},_createTabParent:function(l){var m=g.createElement("ul");if(this.TAB_PARENT_CLASSNAME){m.className=this.TAB_PARENT_CLASSNAME;}this.get(h).appendChild(m);return m;},_createContentParent:function(l){var m=g.createElement("div");if(this.CONTENT_PARENT_CLASSNAME){m.className=this.CONTENT_PARENT_CLASSNAME;}this.get(h).appendChild(m);return m;}});YAHOO.widget.TabView=j;})();(function(){var d=YAHOO.util,i=d.Dom,l=YAHOO.lang,m="activeTab",j="label",g="labelEl",q="content",c="contentEl",o="element",p="cacheData",b="dataSrc",h="dataLoaded",a="dataTimeout",n="loadMethod",f="postData",k="disabled",e=function(s,r){r=r||{};if(arguments.length==1&&!l.isString(s)&&!s.nodeName){r=s;s=r.element;}if(!s&&!r.element){s=this._createTabElement(r);}this.loadHandler={success:function(t){this.set(q,t.responseText);},failure:function(t){}};e.superclass.constructor.call(this,s,r);this.DOM_EVENTS={};};YAHOO.extend(e,YAHOO.util.Element,{LABEL_TAGNAME:"em",ACTIVE_CLASSNAME:"selected",HIDDEN_CLASSNAME:"yui-hidden",ACTIVE_TITLE:"active",DISABLED_CLASSNAME:k,LOADING_CLASSNAME:"loading",dataConnection:null,loadHandler:null,_loading:false,toString:function(){var r=this.get(o),s=r.id||r.tagName;
return"Tab "+s;},initAttributes:function(r){r=r||{};e.superclass.initAttributes.call(this,r);this.setAttributeConfig("activationEvent",{value:r.activationEvent||"click"});this.setAttributeConfig(g,{value:r[g]||this._getLabelEl(),method:function(s){s=i.get(s);var t=this.get(g);if(t){if(t==s){return false;}t.parentNode.replaceChild(s,t);this.set(j,s.innerHTML);}}});this.setAttributeConfig(j,{value:r.label||this._getLabel(),method:function(t){var s=this.get(g);if(!s){this.set(g,this._createLabelEl());}s.innerHTML=t;}});this.setAttributeConfig(c,{value:r[c]||document.createElement("div"),method:function(s){s=i.get(s);var t=this.get(c);if(t){if(t===s){return false;}if(!this.get("selected")){i.addClass(s,this.HIDDEN_CLASSNAME);}t.parentNode.replaceChild(s,t);this.set(q,s.innerHTML);}}});this.setAttributeConfig(q,{value:r[q]||this.get(c).innerHTML,method:function(s){this.get(c).innerHTML=s;}});this.setAttributeConfig(b,{value:r.dataSrc});this.setAttributeConfig(p,{value:r.cacheData||false,validator:l.isBoolean});this.setAttributeConfig(n,{value:r.loadMethod||"GET",validator:l.isString});this.setAttributeConfig(h,{value:false,validator:l.isBoolean,writeOnce:true});this.setAttributeConfig(a,{value:r.dataTimeout||null,validator:l.isNumber});this.setAttributeConfig(f,{value:r.postData||null});this.setAttributeConfig("active",{value:r.active||this.hasClass(this.ACTIVE_CLASSNAME),method:function(s){if(s===true){this.addClass(this.ACTIVE_CLASSNAME);this.set("title",this.ACTIVE_TITLE);}else{this.removeClass(this.ACTIVE_CLASSNAME);this.set("title","");}},validator:function(s){return l.isBoolean(s)&&!this.get(k);}});this.setAttributeConfig(k,{value:r.disabled||this.hasClass(this.DISABLED_CLASSNAME),method:function(s){if(s===true){this.addClass(this.DISABLED_CLASSNAME);}else{this.removeClass(this.DISABLED_CLASSNAME);}},validator:l.isBoolean});this.setAttributeConfig("href",{value:r.href||this.getElementsByTagName("a")[0].getAttribute("href",2)||"#",method:function(s){this.getElementsByTagName("a")[0].href=s;},validator:l.isString});this.setAttributeConfig("contentVisible",{value:r.contentVisible,method:function(s){if(s){i.removeClass(this.get(c),this.HIDDEN_CLASSNAME);if(this.get(b)){if(!this._loading&&!(this.get(h)&&this.get(p))){this._dataConnect();}}}else{i.addClass(this.get(c),this.HIDDEN_CLASSNAME);}},validator:l.isBoolean});},_dataConnect:function(){if(!d.Connect){return false;}i.addClass(this.get(c).parentNode,this.LOADING_CLASSNAME);this._loading=true;this.dataConnection=d.Connect.asyncRequest(this.get(n),this.get(b),{success:function(r){this.loadHandler.success.call(this,r);this.set(h,true);this.dataConnection=null;i.removeClass(this.get(c).parentNode,this.LOADING_CLASSNAME);this._loading=false;},failure:function(r){this.loadHandler.failure.call(this,r);this.dataConnection=null;i.removeClass(this.get(c).parentNode,this.LOADING_CLASSNAME);this._loading=false;},scope:this,timeout:this.get(a)},this.get(f));},_createTabElement:function(r){var v=document.createElement("li"),s=document.createElement("a"),u=r.label||null,t=r.labelEl||null;s.href=r.href||"#";v.appendChild(s);if(t){if(!u){u=this._getLabel();}}else{t=this._createLabelEl();}s.appendChild(t);return v;},_getLabelEl:function(){return this.getElementsByTagName(this.LABEL_TAGNAME)[0];},_createLabelEl:function(){var r=document.createElement(this.LABEL_TAGNAME);return r;},_getLabel:function(){var r=this.get(g);if(!r){return undefined;}return r.innerHTML;},_onActivate:function(u,t){var s=this,r=false;d.Event.preventDefault(u);if(s===t.get(m)){r=true;}t.set(m,s,r);},_onActivationEventChange:function(s){var r=this;if(s.prevValue!=s.newValue){r.removeListener(s.prevValue,r._onActivate);r.addListener(s.newValue,r._onActivate,this,r);}}});YAHOO.widget.Tab=e;})();YAHOO.register("tabview",YAHOO.widget.TabView,{version:"2.9.0",build:"2800"});
//
//../pacotes/yui290/build/json/json-min.js
/*
Copyright (c) 2011, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 2.9.0
*/
(function(){var l=YAHOO.lang,isFunction=l.isFunction,isObject=l.isObject,isArray=l.isArray,_toStr=Object.prototype.toString,Native=(YAHOO.env.ua.caja?window:this).JSON,_UNICODE_EXCEPTIONS=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,_ESCAPES=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,_VALUES=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,_BRACKETS=/(?:^|:|,)(?:\s*\[)+/g,_UNSAFE=/[^\],:{}\s]/,_SPECIAL_CHARS=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,_CHARS={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},UNDEFINED="undefined",OBJECT="object",NULL="null",STRING="string",NUMBER="number",BOOLEAN="boolean",DATE="date",_allowable={"undefined":UNDEFINED,"string":STRING,"[object String]":STRING,"number":NUMBER,"[object Number]":NUMBER,"boolean":BOOLEAN,"[object Boolean]":BOOLEAN,"[object Date]":DATE,"[object RegExp]":OBJECT},EMPTY="",OPEN_O="{",CLOSE_O="}",OPEN_A="[",CLOSE_A="]",COMMA=",",COMMA_CR=",\n",CR="\n",COLON=":",COLON_SP=": ",QUOTE='"';Native=_toStr.call(Native)==="[object JSON]"&&Native;function _char(c){if(!_CHARS[c]){_CHARS[c]="\\u"+("0000"+(+(c.charCodeAt(0))).toString(16)).slice(-4);}return _CHARS[c];}function _revive(data,reviver){var walk=function(o,key){var k,v,value=o[key];if(value&&typeof value==="object"){for(k in value){if(l.hasOwnProperty(value,k)){v=walk(value,k);if(v===undefined){delete value[k];}else{value[k]=v;}}}}return reviver.call(o,key,value);};return typeof reviver==="function"?walk({"":data},""):data;}function _prepare(s){return s.replace(_UNICODE_EXCEPTIONS,_char);}function _isSafe(str){return l.isString(str)&&!_UNSAFE.test(str.replace(_ESCAPES,"@").replace(_VALUES,"]").replace(_BRACKETS,""));}function _parse(s,reviver){s=_prepare(s);if(_isSafe(s)){return _revive(eval("("+s+")"),reviver);}throw new SyntaxError("JSON.parse");}function _type(o){var t=typeof o;return _allowable[t]||_allowable[_toStr.call(o)]||(t===OBJECT?(o?OBJECT:NULL):UNDEFINED);}function _string(s){return QUOTE+s.replace(_SPECIAL_CHARS,_char)+QUOTE;}function _indent(s,space){return s.replace(/^/gm,space);}function _stringify(o,w,space){if(o===undefined){return undefined;}var replacer=isFunction(w)?w:null,format=_toStr.call(space).match(/String|Number/)||[],_date=YAHOO.lang.JSON.dateToString,stack=[],tmp,i,len;if(replacer||!isArray(w)){w=undefined;}if(w){tmp={};for(i=0,len=w.length;i<len;++i){tmp[w[i]]=true;}w=tmp;}space=format[0]==="Number"?new Array(Math.min(Math.max(0,space),10)+1).join(" "):(space||EMPTY).slice(0,10);function _serialize(h,key){var value=h[key],t=_type(value),a=[],colon=space?COLON_SP:COLON,arr,i,keys,k,v;if(isObject(value)&&isFunction(value.toJSON)){value=value.toJSON(key);}else{if(t===DATE){value=_date(value);}}if(isFunction(replacer)){value=replacer.call(h,key,value);}if(value!==h[key]){t=_type(value);}switch(t){case DATE:case OBJECT:break;case STRING:return _string(value);case NUMBER:return isFinite(value)?value+EMPTY:NULL;case BOOLEAN:return value+EMPTY;case NULL:return NULL;default:return undefined;}for(i=stack.length-1;i>=0;--i){if(stack[i]===value){throw new Error("JSON.stringify. Cyclical reference");}}arr=isArray(value);stack.push(value);if(arr){for(i=value.length-1;i>=0;--i){a[i]=_serialize(value,i)||NULL;}}else{keys=w||value;i=0;for(k in keys){if(l.hasOwnProperty(keys,k)){v=_serialize(value,k);if(v){a[i++]=_string(k)+colon+v;}}}}stack.pop();if(space&&a.length){return arr?OPEN_A+CR+_indent(a.join(COMMA_CR),space)+CR+CLOSE_A:OPEN_O+CR+_indent(a.join(COMMA_CR),space)+CR+CLOSE_O;}else{return arr?OPEN_A+a.join(COMMA)+CLOSE_A:OPEN_O+a.join(COMMA)+CLOSE_O;}}return _serialize({"":o},"");}YAHOO.lang.JSON={useNativeParse:!!Native,useNativeStringify:!!Native,isSafe:function(s){return _isSafe(_prepare(s));},parse:function(s,reviver){if(typeof s!=="string"){s+="";}return Native&&YAHOO.lang.JSON.useNativeParse?Native.parse(s,reviver):_parse(s,reviver);},stringify:function(o,w,space){return Native&&YAHOO.lang.JSON.useNativeStringify?Native.stringify(o,w,space):_stringify(o,w,space);},dateToString:function(d){function _zeroPad(v){return v<10?"0"+v:v;}return d.getUTCFullYear()+"-"+_zeroPad(d.getUTCMonth()+1)+"-"+_zeroPad(d.getUTCDate())+"T"+_zeroPad(d.getUTCHours())+COLON+_zeroPad(d.getUTCMinutes())+COLON+_zeroPad(d.getUTCSeconds())+"Z";},stringToDate:function(str){var m=str.match(/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d{3}))?Z$/);if(m){var d=new Date();d.setUTCFullYear(m[1],m[2]-1,m[3]);d.setUTCHours(m[4],m[5],m[6],(m[7]||0));return d;}return str;}};YAHOO.lang.JSON.isValid=YAHOO.lang.JSON.isSafe;})();YAHOO.register("json",YAHOO.lang.JSON,{version:"2.9.0",build:"2800"});
//
//../pacotes/yui290/build/storage/storage-min.js
/*
Copyright (c) 2011, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 2.9.0
*/
(function(){var g=YAHOO,f=g.util,e=g.lang,c,d,b=/^type=(\w+)/i,a=/&value=(.*)/i;if(!f.Storage){c=function(h){g.log("Exception in YAHOO.util.Storage.?? - must be extended by a storage engine".replace("??",h).replace("??",this.getName?this.getName():"Unknown"),"error");};d=function(h,k,j){var i=this;g.env._id_counter+=1;i._cfg=e.isObject(j)?j:{};i._location=h;i._name=k;i.isReady=false;i.createEvent(d.CE_READY,{scope:i,fireOnce:true});i.createEvent(d.CE_CHANGE,{scope:i});i.subscribe(d.CE_READY,function(){i.isReady=true;});};d.CE_READY="YUIStorageReady";d.CE_CHANGE="YUIStorageChange";d.prototype={CE_READY:d.CE_READY,CE_CHANGE:d.CE_CHANGE,_cfg:"",_name:"",_location:"",length:0,isReady:false,clear:function(){this._clear();this.length=0;},getItem:function(h){g.log("Fetching item at  "+h);var i=this._getItem(h);return e.isValue(i)?this._getValue(i):null;},getName:function(){return this._name;},hasKey:function(h){return e.isString(h)&&this._hasKey(h);},key:function(h){g.log("Fetching key at "+h);if(e.isNumber(h)&&-1<h&&this.length>h){var i=this._key(h);if(i){return i;}}throw ("INDEX_SIZE_ERR - Storage.setItem - The provided index ("+h+") is not available");},removeItem:function(j){g.log("removing "+j);var i=this,h;if(i.hasKey(j)){h=i._getItem(j);if(!h){h=null;}i._removeItem(j);i.fireEvent(d.CE_CHANGE,new f.StorageEvent(i,j,h,null,f.StorageEvent.TYPE_REMOVE_ITEM));}else{}},setItem:function(j,k){g.log("SETTING "+k+" to "+j);if(e.isString(j)){var i=this,h=i._getItem(j);if(!h){h=null;}if(i._setItem(j,i._createValue(k))){i.fireEvent(d.CE_CHANGE,new f.StorageEvent(i,j,h,k,i.hasKey(j)?f.StorageEvent.TYPE_UPDATE_ITEM:f.StorageEvent.TYPE_ADD_ITEM));}else{throw ("QUOTA_EXCEEDED_ERROR - Storage.setItem - The choosen storage method ("+i.getName()+") has exceeded capacity");}}else{}},_clear:function(){c("_clear");return"";},_createValue:function(h){var i=(e.isNull(h)||e.isUndefined(h))?(""+h):typeof h;return"type="+i+"&value="+encodeURIComponent(""+h);},_getItem:function(h){c("_getItem");return"";},_getValue:function(h){var j=h.match(b)[1],i=h.match(a)[1];switch(j){case"boolean":return"true"==i;case"number":return parseFloat(i);case"null":return null;default:return decodeURIComponent(i);}},_key:function(h){c("_key");return"";},_hasKey:function(h){return null!==this._getItem(h);},_removeItem:function(h){c("_removeItem");return"";},_setItem:function(h,i){c("_setItem");return"";}};e.augmentProto(d,f.EventProvider);f.Storage=d;}}());(function(){var h=YAHOO.util,e=YAHOO.lang,d={},g=[],f={},b=function(i){return(i&&i.isAvailable())?i:null;},a=function(i,l,k){var j=d[i+l.ENGINE_NAME];if(!j){j=new l(i,k);d[i+l.ENGINE_NAME]=j;}return j;},c=function(i){switch(i){case h.StorageManager.LOCATION_LOCAL:case h.StorageManager.LOCATION_SESSION:return i;default:return h.StorageManager.LOCATION_SESSION;}};h.StorageManager={LOCATION_SESSION:"sessionStorage",LOCATION_LOCAL:"localStorage",get:function(q,k,p){var n=e.isObject(p)?p:{},o=b(f[q]),m,l;if(!o&&!n.force){if(n.order){l=n.order.length;for(m=0;m<l&&!o;m+=1){o=b(n.order[m]);}}if(!o){l=g.length;for(m=0;m<l&&!o;m+=1){o=b(g[m]);}}}if(o){return a(c(k),o,n.engine);}throw ("YAHOO.util.StorageManager.get - No engine available, please include an engine before calling this function.");},getByteSize:function(i){return encodeURIComponent(""+i).length;},register:function(i){if(e.isFunction(i)&&e.isFunction(i.isAvailable)&&e.isString(i.ENGINE_NAME)){f[i.ENGINE_NAME]=i;g.push(i);return true;}return false;}};YAHOO.register("StorageManager",h.SWFStore,{version:"2.9.0",build:"2800"});}());(function(){function a(e,d,c,b,f){this.key=d;this.oldValue=c;this.newValue=b;this.url=window.location.href;this.window=window;this.storageArea=e;this.type=f;}YAHOO.lang.augmentObject(a,{TYPE_ADD_ITEM:"addItem",TYPE_REMOVE_ITEM:"removeItem",TYPE_UPDATE_ITEM:"updateItem"});a.prototype={key:null,newValue:null,oldValue:null,source:null,storageArea:null,type:null,url:null};YAHOO.util.StorageEvent=a;}());(function(){var a=YAHOO.util;a.StorageEngineKeyed=function(){a.StorageEngineKeyed.superclass.constructor.apply(this,arguments);this._keys=[];this._keyMap={};};YAHOO.lang.extend(a.StorageEngineKeyed,a.Storage,{_keys:null,_keyMap:null,_addKey:function(b){if(!this._keyMap.hasOwnProperty(b)){this._keys.push(b);this._keyMap[b]=this.length;this.length=this._keys.length;}},_clear:function(){this._keys=[];this.length=0;},_indexOfKey:function(c){var b=this._keyMap[c];return undefined===b?-1:b;},_key:function(b){return this._keys[b];},_removeItem:function(f){var e=this,c=e._indexOfKey(f),d=e._keys.slice(c+1),b;delete e._keyMap[f];for(b in e._keyMap){if(c<e._keyMap[b]){e._keyMap[b]-=1;}}e._keys.length=c;e._keys=e._keys.concat(d);e.length=e._keys.length;}});}());(function(){var e=YAHOO.util,c=YAHOO.lang,a=function(f){f.begin();},b=function(f){f.commit();},d=function(f,h){var g=this,i=window[f];d.superclass.constructor.call(g,f,d.ENGINE_NAME,h);if(!i.begin){a=function(){};}if(!i.commit){b=function(){};}g.length=i.length;g._driver=i;g.fireEvent(e.Storage.CE_READY);};c.extend(d,e.Storage,{_driver:null,_clear:function(){var g=this,f,h;if(g._driver.clear){g._driver.clear();}else{for(f=g.length;0<=f;f-=1){h=g._key(f);g._removeItem(h);}}},_getItem:function(f){var g=this._driver.getItem(f);return c.isObject(g)?g.value:g;},_key:function(f){return this._driver.key(f);},_removeItem:function(f){var g=this._driver;a(g);g.removeItem(f);b(g);this.length=g.length;},_setItem:function(g,f){var i=this._driver;try{a(i);i.setItem(g,f);b(i);this.length=i.length;return true;}catch(h){return false;}}},true);d.ENGINE_NAME="html5";d.isAvailable=function(){try{return("localStorage" in window)&&window["localStorage"]!==null&&("sessionStorage" in window)&&window["sessionStorage"]!==null;}catch(f){return false;}};e.StorageManager.register(d);e.StorageEngineHTML5=d;}());(function(){var h=YAHOO.util,d=YAHOO.lang,e=9948,g="YUIStorageEngine",b=null,f=encodeURIComponent,a=decodeURIComponent,c=function(l,o){var n=this,p={},k,i,j;c.superclass.constructor.call(n,l,c.ENGINE_NAME,o);
if(!b){b=google.gears.factory.create(c.GEARS);b.open(window.location.host.replace(/[\/\:\*\?"\<\>\|;,]/g,"")+"-"+c.DATABASE);b.execute("CREATE TABLE IF NOT EXISTS "+g+" (key TEXT, location TEXT, value TEXT)");}k=h.StorageManager.LOCATION_SESSION===n._location;i=h.Cookie.get("sessionKey"+c.ENGINE_NAME);if(!i){b.execute("BEGIN");b.execute("DELETE FROM "+g+' WHERE location="'+f(h.StorageManager.LOCATION_SESSION)+'"');b.execute("COMMIT");}j=b.execute("SELECT key FROM "+g+' WHERE location="'+f(n._location)+'"');p={};try{while(j.isValidRow()){var m=a(j.field(0));if(!p[m]){p[m]=true;n._addKey(m);}j.next();}}finally{j.close();}if(k){h.Cookie.set("sessionKey"+c.ENGINE_NAME,true);}n.fireEvent(h.Storage.CE_READY);};d.extend(c,h.StorageEngineKeyed,{_clear:function(){c.superclass._clear.call(this);b.execute("BEGIN");b.execute("DELETE FROM "+g+' WHERE location="'+f(this._location)+'"');b.execute("COMMIT");},_getItem:function(k){var i=b.execute("SELECT value FROM "+g+' WHERE key="'+f(k)+'" AND location="'+f(this._location)+'"'),j="";try{while(i.isValidRow()){j+=i.field(0);i.next();}}finally{i.close();}return j?a(j):null;},_removeItem:function(i){c.superclass._removeItem.call(this,i);b.execute("BEGIN");b.execute("DELETE FROM "+g+' WHERE key="'+f(i)+'" AND location="'+f(this._location)+'"');b.execute("COMMIT");},_setItem:function(r,k){this._addKey(r);var l=f(r),m=f(this._location),p=f(k),q=[],s=e-(l+m).length,o=0,n;if(s<p.length){for(n=p.length;o<n;o+=s){q.push(p.substr(o,s));}}else{q.push(p);}b.execute("BEGIN");b.execute("DELETE FROM "+g+' WHERE key="'+l+'" AND location="'+m+'"');for(o=0,n=q.length;o<n;o+=1){b.execute("INSERT INTO "+g+' VALUES ("'+l+'", "'+m+'", "'+q[o]+'")');}b.execute("COMMIT");return true;}});h.Event.on("unload",function(){if(b){b.close();}});c.ENGINE_NAME="gears";c.GEARS="beta.database";c.DATABASE="yui.database";c.isAvailable=function(){if(("google" in window)&&("gears" in window.google)){try{google.gears.factory.create(c.GEARS);return true;}catch(i){}}return false;};h.StorageManager.register(c);h.StorageEngineGears=c;}());(function(){var b=YAHOO,i=b.util,g=b.lang,f=i.Dom,j=i.StorageManager,c=215,h=138,d=new RegExp("^("+j.LOCATION_SESSION+"|"+j.LOCATION_LOCAL+")"),e=null,k=function(m,n){return m._location+n;},a=function(n){if(!e){if(!g.isString(n.swfURL)){n.swfURL=l.SWFURL;}if(!n.containerID){var o=document.getElementsByTagName("body")[0],m=o.appendChild(document.createElement("div"));n.containerID=f.generateId(m);}if(!n.attributes){n.attributes={};}if(!n.attributes.flashVars){n.attributes.flashVars={};}n.attributes.flashVars.allowedDomain=document.location.hostname;n.attributes.flashVars.useCompression="true";n.attributes.version=9.115;e=new b.widget.SWF(n.containerID,n.swfURL,n.attributes);e.subscribe("save",function(p){b.log(p.message,"info");});e.subscribe("quotaExceededError",function(p){b.log(p.message,"error");});e.subscribe("inadequateDimensions",function(p){b.log(p.message,"error");});e.subscribe("error",function(p){b.log(p.message,"error");});e.subscribe("securityError",function(p){b.log(p.message,"error");});}},l=function(m,p){var o=this;l.superclass.constructor.call(o,m,l.ENGINE_NAME,p);a(o._cfg);var n=function(){o._swf=e._swf;e.initialized=true;var s=j.LOCATION_SESSION===o._location,r=i.Cookie.get("sessionKey"+l.ENGINE_NAME),u,t,q;for(u=e.callSWF("getLength",[])-1;0<=u;u-=1){t=e.callSWF("getNameAt",[u]);q=s&&(-1<t.indexOf(j.LOCATION_SESSION));if(q&&!r){e.callSWF("removeItem",[t]);}else{if(s===q){o._addKey(t);}}}if(s){i.Cookie.set("sessionKey"+l.ENGINE_NAME,true);}o.fireEvent(i.Storage.CE_READY);};if(e.initialized){n();}else{e.addListener("contentReady",n);}};g.extend(l,i.StorageEngineKeyed,{_swf:null,_clear:function(){for(var m=this._keys.length-1,n;0<=m;m-=1){n=this._keys[m];e.callSWF("removeItem",[n]);}l.superclass._clear.call(this);},_getItem:function(m){var n=k(this,m);return e.callSWF("getValueOf",[n]);},_key:function(m){return l.superclass._key.call(this,m).replace(d,"");},_removeItem:function(m){b.log("removing SWF key: "+m);var n=k(this,m);l.superclass._removeItem.call(this,n);e.callSWF("removeItem",[n]);},_setItem:function(m,p){var n=k(this,m),o;if(e.callSWF("setItem",[n,p])){this._addKey(n);return true;}else{o=f.get(e._id);if(c>f.getStyle(o,"width").replace(/\D+/g,"")){f.setStyle(o,"width",c+"px");}if(h>f.getStyle(o,"height").replace(/\D+/g,"")){f.setStyle(o,"height",h+"px");}b.log("attempting to show settings. are dimensions adequate? "+e.callSWF("hasAdequateDimensions"));return e.callSWF("displaySettings",[]);}}});l.SWFURL="swfstore.swf";l.ENGINE_NAME="swf";l.isAvailable=function(){return(6<=b.env.ua.flash&&b.widget.SWF);};j.register(l);i.StorageEngineSWF=l;}());YAHOO.register("storage",YAHOO.util.Storage,{version:"2.9.0",build:"2800"});
//
//../pacotes/yui290/build/resize/resize_compacto.js
(function(){var E=YAHOO.util.Dom,A=YAHOO.util.Event,C=YAHOO.lang;var B=function(F,D){var G={element:F,attributes:D||{}};B.superclass.constructor.call(this,G.element,G.attributes)};B._instances={};B.getResizeById=function(D){if(B._instances[D]){return B._instances[D]}return false};YAHOO.extend(B,YAHOO.util.Element,{CSS_RESIZE:"yui-resize",CSS_DRAG:"yui-draggable",CSS_HOVER:"yui-resize-hover",CSS_PROXY:"yui-resize-proxy",CSS_WRAP:"yui-resize-wrap",CSS_KNOB:"yui-resize-knob",CSS_HIDDEN:"yui-resize-hidden",CSS_HANDLE:"yui-resize-handle",CSS_STATUS:"yui-resize-status",CSS_GHOST:"yui-resize-ghost",CSS_RESIZING:"yui-resize-resizing",_resizeEvent:null,dd:null,browser:YAHOO.env.ua,_locked:null,_positioned:null,_dds:null,_wrap:null,_proxy:null,_handles:null,_currentHandle:null,_currentDD:null,_cache:null,_active:null,_createProxy:function(){if(this.get("proxy")){this._proxy=document.createElement("div");this._proxy.className=this.CSS_PROXY;this._proxy.style.height=this.get("element").clientHeight+"px";this._proxy.style.width=this.get("element").clientWidth+"px";this._wrap.parentNode.appendChild(this._proxy)}else{this.set("animate",false)}},_createWrap:function(){this._positioned=false;if(this.get("wrap")===false){switch(this.get("element").tagName.toLowerCase()){case"img":case"textarea":case"input":case"iframe":case"select":this.set("wrap",true);break}}if(this.get("wrap")===true){this._wrap=document.createElement("div");this._wrap.id=this.get("element").id+"_wrap";this._wrap.className=this.CSS_WRAP;if(this.get("element").tagName.toLowerCase()=="textarea"){E.addClass(this._wrap,"yui-resize-textarea")}E.setStyle(this._wrap,"width",this.get("width")+"px");E.setStyle(this._wrap,"height",this.get("height")+"px");E.setStyle(this._wrap,"z-index",this.getStyle("z-index"));this.setStyle("z-index",0);var F=E.getStyle(this.get("element"),"position");E.setStyle(this._wrap,"position",((F=="static")?"relative":F));E.setStyle(this._wrap,"top",E.getStyle(this.get("element"),"top"));E.setStyle(this._wrap,"left",E.getStyle(this.get("element"),"left"));if(E.getStyle(this.get("element"),"position")=="absolute"){this._positioned=true;E.setStyle(this.get("element"),"position","relative");E.setStyle(this.get("element"),"top","0");E.setStyle(this.get("element"),"left","0")}var D=this.get("element").parentNode;D.replaceChild(this._wrap,this.get("element"));this._wrap.appendChild(this.get("element"))}else{this._wrap=this.get("element");if(E.getStyle(this._wrap,"position")=="absolute"){this._positioned=true}}if(this.get("draggable")){this._setupDragDrop()}if(this.get("hover")){E.addClass(this._wrap,this.CSS_HOVER)}if(this.get("knobHandles")){E.addClass(this._wrap,this.CSS_KNOB)}if(this.get("hiddenHandles")){E.addClass(this._wrap,this.CSS_HIDDEN)}E.addClass(this._wrap,this.CSS_RESIZE)},_setupDragDrop:function(){E.addClass(this._wrap,this.CSS_DRAG);this.dd=new YAHOO.util.DD(this._wrap,this.get("id")+"-resize",{dragOnly:true,useShim:this.get("useShim")});this.dd.on("dragEvent",function(){this.fireEvent("dragEvent",arguments)},this,true)},_createHandles:function(){this._handles={};this._dds={};var G=this.get("handles");for(var F=0;F<G.length;F++){this._handles[G[F]]=document.createElement("div");this._handles[G[F]].id=E.generateId(this._handles[G[F]]);this._handles[G[F]].className=this.CSS_HANDLE+" "+this.CSS_HANDLE+"-"+G[F];var D=document.createElement("div");D.className=this.CSS_HANDLE+"-inner-"+G[F];this._handles[G[F]].appendChild(D);this._wrap.appendChild(this._handles[G[F]]);A.on(this._handles[G[F]],"mouseover",this._handleMouseOver,this,true);A.on(this._handles[G[F]],"mouseout",this._handleMouseOut,this,true);this._dds[G[F]]=new YAHOO.util.DragDrop(this._handles[G[F]],this.get("id")+"-handle-"+G,{useShim:this.get("useShim")});this._dds[G[F]].setPadding(15,15,15,15);this._dds[G[F]].on("startDragEvent",this._handleStartDrag,this._dds[G[F]],this);this._dds[G[F]].on("mouseDownEvent",this._handleMouseDown,this._dds[G[F]],this)}this._status=document.createElement("span");this._status.className=this.CSS_STATUS;document.body.insertBefore(this._status,document.body.firstChild)},_ieSelectFix:function(){return false},_ieSelectBack:null,_setAutoRatio:function(D){if(this.get("autoRatio")){if(D&&D.shiftKey){this.set("ratio",true)}else{this.set("ratio",this._configs.ratio._initialConfig.value)}}},_handleMouseDown:function(D){if(this._locked){return false}if(E.getStyle(this._wrap,"position")=="absolute"){this._positioned=true}if(D){this._setAutoRatio(D)}if(this.browser.ie){this._ieSelectBack=document.body.onselectstart;document.body.onselectstart=this._ieSelectFix}},_handleMouseOver:function(G){if(this._locked){return false}E.removeClass(this._wrap,this.CSS_RESIZE);if(this.get("hover")){E.removeClass(this._wrap,this.CSS_HOVER)}var D=A.getTarget(G);if(!E.hasClass(D,this.CSS_HANDLE)){D=D.parentNode}if(E.hasClass(D,this.CSS_HANDLE)&&!this._active){E.addClass(D,this.CSS_HANDLE+"-active");for(var F in this._handles){if(C.hasOwnProperty(this._handles,F)){if(this._handles[F]==D){E.addClass(D,this.CSS_HANDLE+"-"+F+"-active");break}}}}E.addClass(this._wrap,this.CSS_RESIZE)},_handleMouseOut:function(G){E.removeClass(this._wrap,this.CSS_RESIZE);if(this.get("hover")&&!this._active){E.addClass(this._wrap,this.CSS_HOVER)}var D=A.getTarget(G);if(!E.hasClass(D,this.CSS_HANDLE)){D=D.parentNode}if(E.hasClass(D,this.CSS_HANDLE)&&!this._active){E.removeClass(D,this.CSS_HANDLE+"-active");for(var F in this._handles){if(C.hasOwnProperty(this._handles,F)){if(this._handles[F]==D){E.removeClass(D,this.CSS_HANDLE+"-"+F+"-active");break}}}}E.addClass(this._wrap,this.CSS_RESIZE)},_handleStartDrag:function(G,F){var D=F.getDragEl();if(E.hasClass(D,this.CSS_HANDLE)){if(E.getStyle(this._wrap,"position")=="absolute"){this._positioned=true}this._active=true;this._currentDD=F;if(this._proxy){this._proxy.style.visibility="visible";this._proxy.style.zIndex="1000";this._proxy.style.height=this.get("element").clientHeight+"px";this._proxy.style.width=this.get("element").clientWidth+"px"}for(var H in this._handles){if(C.hasOwnProperty(this._handles,H)){if(this._handles[H]==D){this._currentHandle=H;var I="_handle_for_"+H;E.addClass(D,this.CSS_HANDLE+"-"+H+"-active");F.on("dragEvent",this[I],this,true);F.on("mouseUpEvent",this._handleMouseUp,this,true);break}}}E.addClass(D,this.CSS_HANDLE+"-active");if(this.get("proxy")){var J=E.getXY(this.get("element"));E.setXY(this._proxy,J);if(this.get("ghost")){this.addClass(this.CSS_GHOST)}}E.addClass(this._wrap,this.CSS_RESIZING);this._setCache();this._updateStatus(this._cache.height,this._cache.width,this._cache.top,this._cache.left);this.fireEvent("startResize",{type:"startresize",target:this})}},_setCache:function(){this._cache.xy=E.getXY(this._wrap);E.setXY(this._wrap,this._cache.xy);this._cache.height=this.get("clientHeight");this._cache.width=this.get("clientWidth");this._cache.start.height=this._cache.height;this._cache.start.width=this._cache.width;this._cache.start.top=this._cache.xy[1];this._cache.start.left=this._cache.xy[0];this._cache.top=this._cache.xy[1];this._cache.left=this._cache.xy[0];this.set("height",this._cache.height,true);this.set("width",this._cache.width,true)},_handleMouseUp:function(F){this._active=false;var G="_handle_for_"+this._currentHandle;this._currentDD.unsubscribe("dragEvent",this[G],this,true);this._currentDD.unsubscribe("mouseUpEvent",this._handleMouseUp,this,true);if(this._proxy){this._proxy.style.visibility="hidden";this._proxy.style.zIndex="-1";if(this.get("setSize")){this.resize(F,this._cache.height,this._cache.width,this._cache.top,this._cache.left,true)}else{this.fireEvent("resize",{ev:"resize",target:this,height:this._cache.height,width:this._cache.width,top:this._cache.top,left:this._cache.left})}if(this.get("ghost")){this.removeClass(this.CSS_GHOST)}}if(this.get("hover")){E.addClass(this._wrap,this.CSS_HOVER)}if(this._status){E.setStyle(this._status,"display","none")}if(this.browser.ie){document.body.onselectstart=this._ieSelectBack}if(this.browser.ie){E.removeClass(this._wrap,this.CSS_RESIZE)}for(var D in this._handles){if(C.hasOwnProperty(this._handles,D)){E.removeClass(this._handles[D],this.CSS_HANDLE+"-active")}}if(this.get("hover")&&!this._active){E.addClass(this._wrap,this.CSS_HOVER)}E.removeClass(this._wrap,this.CSS_RESIZING);E.removeClass(this._handles[this._currentHandle],this.CSS_HANDLE+"-"+this._currentHandle+"-active");E.removeClass(this._handles[this._currentHandle],this.CSS_HANDLE+"-active");if(this.browser.ie){E.addClass(this._wrap,this.CSS_RESIZE)}this._resizeEvent=null;this._currentHandle=null;if(!this.get("animate")){this.set("height",this._cache.height,true);this.set("width",this._cache.width,true)}this.fireEvent("endResize",{ev:"endResize",target:this,height:this._cache.height,width:this._cache.width,top:this._cache.top,left:this._cache.left})},_setRatio:function(K,N,Q,I){var O=K,G=N;if(this.get("ratio")){var P=this._cache.height,H=this._cache.width,F=parseInt(this.get("height"),10),L=parseInt(this.get("width"),10),M=this.get("maxHeight"),R=this.get("minHeight"),D=this.get("maxWidth"),J=this.get("minWidth");switch(this._currentHandle){case"l":K=F*(N/L);K=Math.min(Math.max(R,K),M);N=L*(K/F);Q=(this._cache.start.top-(-((F-K)/2)));I=(this._cache.start.left-(-((L-N))));break;case"r":K=F*(N/L);K=Math.min(Math.max(R,K),M);N=L*(K/F);Q=(this._cache.start.top-(-((F-K)/2)));break;case"t":N=L*(K/F);K=F*(N/L);I=(this._cache.start.left-(-((L-N)/2)));Q=(this._cache.start.top-(-((F-K))));break;case"b":N=L*(K/F);K=F*(N/L);I=(this._cache.start.left-(-((L-N)/2)));break;case"bl":K=F*(N/L);N=L*(K/F);I=(this._cache.start.left-(-((L-N))));break;case"br":K=F*(N/L);N=L*(K/F);break;case"tl":K=F*(N/L);N=L*(K/F);I=(this._cache.start.left-(-((L-N))));Q=(this._cache.start.top-(-((F-K))));break;case"tr":K=F*(N/L);N=L*(K/F);I=(this._cache.start.left);Q=(this._cache.start.top-(-((F-K))));break}O=this._checkHeight(K);G=this._checkWidth(N);if((O!=K)||(G!=N)){Q=0;I=0;if(O!=K){G=this._cache.width}if(G!=N){O=this._cache.height}}}return[O,G,Q,I]},_updateStatus:function(K,G,J,F){if(this._resizeEvent&&(!C.isString(this._resizeEvent))){K=((K===0)?this._cache.start.height:K);G=((G===0)?this._cache.start.width:G);var I=parseInt(this.get("height"),10),D=parseInt(this.get("width"),10);if(isNaN(I)){I=parseInt(K,10)}if(isNaN(D)){D=parseInt(G,10)}var L=(parseInt(K,10)-I);var H=(parseInt(G,10)-D);this._cache.offsetHeight=L;this._cache.offsetWidth=H;if(this.get("status")){E.setStyle(this._status,"display","inline");this._status.innerHTML="<strong>"+parseInt(K,10)+" x "+parseInt(G,10)+"</strong><em>"+((L>0)?"+":"")+L+" x "+((H>0)?"+":"")+H+"</em>";E.setXY(this._status,[A.getPageX(this._resizeEvent)+12,A.getPageY(this._resizeEvent)+12])}}},lock:function(D){this._locked=true;if(D&&this.dd){E.removeClass(this._wrap,"yui-draggable");this.dd.lock()}return this},unlock:function(D){this._locked=false;if(D&&this.dd){E.addClass(this._wrap,"yui-draggable");this.dd.unlock()}return this},isLocked:function(){return this._locked},reset:function(){this.resize(null,this._cache.start.height,this._cache.start.width,this._cache.start.top,this._cache.start.left,true);return this},resize:function(M,J,P,Q,H,F,K){if(this._locked){return false}this._resizeEvent=M;var G=this._wrap,I=this.get("animate"),O=true;if(this._proxy&&!F){G=this._proxy;I=false}this._setAutoRatio(M);if(this._positioned){if(this._proxy){Q=this._cache.top-Q;H=this._cache.left-H}}var L=this._setRatio(J,P,Q,H);J=parseInt(L[0],10);P=parseInt(L[1],10);Q=parseInt(L[2],10);H=parseInt(L[3],10);if(Q==0){Q=E.getY(G)}if(H==0){H=E.getX(G)}if(this._positioned){if(this._proxy&&F){if(!I){G.style.top=this._proxy.style.top;G.style.left=this._proxy.style.left}else{Q=this._proxy.style.top;H=this._proxy.style.left}}else{if(!this.get("ratio")&&!this._proxy){Q=this._cache.top+-(Q);H=this._cache.left+-(H)}if(Q){if(this.get("minY")){if(Q<this.get("minY")){Q=this.get("minY")}}if(this.get("maxY")){if(Q>this.get("maxY")){Q=this.get("maxY")}}}if(H){if(this.get("minX")){if(H<this.get("minX")){H=this.get("minX")}}if(this.get("maxX")){if((H+P)>this.get("maxX")){H=(this.get("maxX")-P)}}}}}if(!K){var N=this.fireEvent("beforeResize",{ev:"beforeResize",target:this,height:J,width:P,top:Q,left:H});if(N===false){return false}}this._updateStatus(J,P,Q,H);if(this._positioned){if(this._proxy&&F){}else{if(Q){E.setY(G,Q);this._cache.top=Q}if(H){E.setX(G,H);this._cache.left=H}}}if(J){if(!I){O=true;if(this._proxy&&F){if(!this.get("setSize")){O=false}}if(O){G.style.height=J+"px"}if((this._proxy&&F)||!this._proxy){if(this._wrap!=this.get("element")){this.get("element").style.height=J+"px"}}}this._cache.height=J}if(P){this._cache.width=P;if(!I){O=true;if(this._proxy&&F){if(!this.get("setSize")){O=false}}if(O){G.style.width=P+"px"}if((this._proxy&&F)||!this._proxy){if(this._wrap!=this.get("element")){this.get("element").style.width=P+"px"}}}}if(I){if(YAHOO.util.Anim){var D=new YAHOO.util.Anim(G,{height:{to:this._cache.height},width:{to:this._cache.width}},this.get("animateDuration"),this.get("animateEasing"));if(this._positioned){if(Q){D.attributes.top={to:parseInt(Q,10)}}if(H){D.attributes.left={to:parseInt(H,10)}}}if(this._wrap!=this.get("element")){D.onTween.subscribe(function(){this.get("element").style.height=G.style.height;this.get("element").style.width=G.style.width},this,true)}D.onComplete.subscribe(function(){this.set("height",J);this.set("width",P);this.fireEvent("resize",{ev:"resize",target:this,height:J,width:P,top:Q,left:H})},this,true);D.animate()}}else{if(this._proxy&&!F){this.fireEvent("proxyResize",{ev:"proxyresize",target:this,height:J,width:P,top:Q,left:H})}else{this.fireEvent("resize",{ev:"resize",target:this,height:J,width:P,top:Q,left:H})}}return this},_handle_for_br:function(F){var G=this._setWidth(F.e);var D=this._setHeight(F.e);this.resize(F.e,D,G,0,0)},_handle_for_bl:function(G){var H=this._setWidth(G.e,true);var F=this._setHeight(G.e);var D=(H-this._cache.width);this.resize(G.e,F,H,0,D)},_handle_for_tl:function(G){var I=this._setWidth(G.e,true);var F=this._setHeight(G.e,true);var H=(F-this._cache.height);var D=(I-this._cache.width);this.resize(G.e,F,I,H,D)},_handle_for_tr:function(F){var H=this._setWidth(F.e);var D=this._setHeight(F.e,true);var G=(D-this._cache.height);this.resize(F.e,D,H,G,0)},_handle_for_r:function(D){this._dds.r.setYConstraint(0,0);var F=this._setWidth(D.e);this.resize(D.e,0,F,0,0)},_handle_for_l:function(F){this._dds.l.setYConstraint(0,0);var G=this._setWidth(F.e,true);var D=(G-this._cache.width);this.resize(F.e,0,G,0,D)},_handle_for_b:function(F){this._dds.b.setXConstraint(0,0);var D=this._setHeight(F.e);this.resize(F.e,D,0,0,0)},_handle_for_t:function(F){this._dds.t.setXConstraint(0,0);var D=this._setHeight(F.e,true);var G=(D-this._cache.height);this.resize(F.e,D,0,G,0)},_setWidth:function(H,J){var I=this._cache.xy[0],G=this._cache.width,D=A.getPageX(H),F=(D-I);if(J){F=(I-D)+parseInt(this.get("width"),10)}F=this._snapTick(F,this.get("xTicks"));F=this._checkWidth(F);return F},_checkWidth:function(D){if(this.get("minWidth")){if(D<=this.get("minWidth")){D=this.get("minWidth")}}if(this.get("maxWidth")){if(D>=this.get("maxWidth")){D=this.get("maxWidth")}}return D},_checkHeight:function(D){if(this.get("minHeight")){if(D<=this.get("minHeight")){D=this.get("minHeight")}}if(this.get("maxHeight")){if(D>=this.get("maxHeight")){D=this.get("maxHeight")}}return D},_setHeight:function(G,I){var H=this._cache.xy[1],F=this._cache.height,J=A.getPageY(G),D=(J-H);if(I){D=(H-J)+parseInt(this.get("height"),10)}D=this._snapTick(D,this.get("yTicks"));D=this._checkHeight(D);return D},_snapTick:function(G,F){if(!G||!F){return G}var H=G;var D=G%F;if(D>0){if(D>(F/2)){H=G+(F-D)}else{H=G-D}}return H},init:function(H,F){this._locked=false;this._cache={xy:[],height:0,width:0,top:0,left:0,offsetHeight:0,offsetWidth:0,start:{height:0,width:0,top:0,left:0}};B.superclass.init.call(this,H,F);this.set("setSize",this.get("setSize"));if(F.height){this.set("height",parseInt(F.height,10))}else{var G=this.getStyle("height");if(G=="auto"){this.set("height",parseInt(this.get("element").offsetHeight,10))}}if(F.width){this.set("width",parseInt(F.width,10))}else{var D=this.getStyle("width");if(D=="auto"){this.set("width",parseInt(this.get("element").offsetWidth,10))}}var I=H;if(!C.isString(I)){I=E.generateId(I)}B._instances[I]=this;this._active=false;this._createWrap();this._createProxy();this._createHandles()},getProxyEl:function(){return this._proxy},getWrapEl:function(){return this._wrap},getStatusEl:function(){return this._status},getActiveHandleEl:function(){return this._handles[this._currentHandle]},isActive:function(){return((this._active)?true:false)},initAttributes:function(D){B.superclass.initAttributes.call(this,D);this.setAttributeConfig("useShim",{value:((D.useShim===true)?true:false),validator:YAHOO.lang.isBoolean,method:function(F){for(var G in this._dds){if(C.hasOwnProperty(this._dds,G)){this._dds[G].useShim=F}}if(this.dd){this.dd.useShim=F}}});this.setAttributeConfig("setSize",{value:((D.setSize===false)?false:true),validator:YAHOO.lang.isBoolean});this.setAttributeConfig("wrap",{writeOnce:true,validator:YAHOO.lang.isBoolean,value:D.wrap||false});this.setAttributeConfig("handles",{writeOnce:true,value:D.handles||["r","b","br"],validator:function(F){if(C.isString(F)&&F.toLowerCase()=="all"){F=["t","b","r","l","bl","br","tl","tr"]}if(!C.isArray(F)){F=F.replace(/, /g,",");F=F.split(",")}this._configs.handles.value=F}});this.setAttributeConfig("width",{value:D.width||parseInt(this.getStyle("width"),10),validator:YAHOO.lang.isNumber,method:function(F){F=parseInt(F,10);if(F>0){if(this.get("setSize")){this.setStyle("width",F+"px")}this._cache.width=F;this._configs.width.value=F}}});this.setAttributeConfig("height",{value:D.height||parseInt(this.getStyle("height"),10),validator:YAHOO.lang.isNumber,method:function(F){F=parseInt(F,10);if(F>0){if(this.get("setSize")){this.setStyle("height",F+"px")}this._cache.height=F;this._configs.height.value=F}}});this.setAttributeConfig("minWidth",{value:D.minWidth||15,validator:YAHOO.lang.isNumber});this.setAttributeConfig("minHeight",{value:D.minHeight||15,validator:YAHOO.lang.isNumber});this.setAttributeConfig("maxWidth",{value:D.maxWidth||10000,validator:YAHOO.lang.isNumber});this.setAttributeConfig("maxHeight",{value:D.maxHeight||10000,validator:YAHOO.lang.isNumber});this.setAttributeConfig("minY",{value:D.minY||false});this.setAttributeConfig("minX",{value:D.minX||false});this.setAttributeConfig("maxY",{value:D.maxY||false});this.setAttributeConfig("maxX",{value:D.maxX||false});this.setAttributeConfig("animate",{value:D.animate||false,validator:function(G){var F=true;if(!YAHOO.util.Anim){F=false}return F}});this.setAttributeConfig("animateEasing",{value:D.animateEasing||function(){var F=false;if(YAHOO.util.Easing&&YAHOO.util.Easing.easeOut){F=YAHOO.util.Easing.easeOut}return F}()});this.setAttributeConfig("animateDuration",{value:D.animateDuration||0.5});this.setAttributeConfig("proxy",{value:D.proxy||false,validator:YAHOO.lang.isBoolean});this.setAttributeConfig("ratio",{value:D.ratio||false,validator:YAHOO.lang.isBoolean});this.setAttributeConfig("ghost",{value:D.ghost||false,validator:YAHOO.lang.isBoolean});this.setAttributeConfig("draggable",{value:D.draggable||false,validator:YAHOO.lang.isBoolean,method:function(F){if(F&&this._wrap&&!this.dd){this._setupDragDrop()}else{if(this.dd){if(F){E.addClass(this._wrap,this.CSS_DRAG);this.dd.DDM.regDragDrop(this.dd,"default")}else{E.removeClass(this._wrap,this.CSS_DRAG);this.dd.unreg()}}}}});this.setAttributeConfig("hover",{value:D.hover||false,validator:YAHOO.lang.isBoolean});this.setAttributeConfig("hiddenHandles",{value:D.hiddenHandles||false,validator:YAHOO.lang.isBoolean});this.setAttributeConfig("knobHandles",{value:D.knobHandles||false,validator:YAHOO.lang.isBoolean});this.setAttributeConfig("xTicks",{value:D.xTicks||false});this.setAttributeConfig("yTicks",{value:D.yTicks||false});this.setAttributeConfig("status",{value:D.status||false,validator:YAHOO.lang.isBoolean});this.setAttributeConfig("autoRatio",{value:D.autoRatio||false,validator:YAHOO.lang.isBoolean})},destroy:function(){for(var F in this._handles){if(C.hasOwnProperty(this._handles,F)){A.purgeElement(this._handles[F]);this._handles[F].parentNode.removeChild(this._handles[F])}}if(this._proxy){this._proxy.parentNode.removeChild(this._proxy)}if(this._status){this._status.parentNode.removeChild(this._status)}if(this.dd){this.dd.unreg();E.removeClass(this._wrap,this.CSS_DRAG)}if(this._wrap!=this.get("element")){this.setStyle("position",(this._positioned?"absolute":"relative"));this.setStyle("top",E.getStyle(this._wrap,"top"));this.setStyle("left",E.getStyle(this._wrap,"left"));this._wrap.parentNode.replaceChild(this.get("element"),this._wrap)}this.removeClass(this.CSS_RESIZE);delete YAHOO.util.Resize._instances[this.get("id")];for(var D in this){if(C.hasOwnProperty(this,D)){this[D]=null;delete this[D]}}},toString:function(){if(this.get){return"Resize (#"+this.get("id")+")"}return"Resize Utility"}});YAHOO.util.Resize=B})();YAHOO.register("resize",YAHOO.util.Resize,{version:"2.9.0",build:"2800"});
//
//../pacotes/yui290/build/progressbar/progressbar_compacto.js
(function(){var c=YAHOO.util.Dom,i=YAHOO.lang,B="yui-pb",D=B+"-mask",A=B+"-bar",z=B+"-anim",q=B+"-tl",l=B+"-tr",k=B+"-bl",g=B+"-br",h="width",w="height",m="minValue",y="maxValue",j="value",a="anim",x="direction",e="ltr",t="rtl",G="ttb",s="btt",f="barEl",d="maskEl",v="ariaTextTemplate",n="animAcceleration",p="background-position",o="px",C="start",F="progress",u="complete";var r=function(b){r.superclass.constructor.call(this,document.createElement("div"),b);this._init(b)};YAHOO.widget.ProgressBar=r;r.MARKUP=['<div class="',A,'"></div><div class="',D,'"><div class="',q,'"></div><div class="',l,'"></div><div class="',k,'"></div><div class="',g,'"></div></div>'].join("");i.extend(r,YAHOO.util.Element,{_init:function(b){},initAttributes:function(I){r.superclass.initAttributes.call(this,I);this.set("innerHTML",r.MARKUP);this.addClass(B);var H,b=["id",h,w,"class","style"];while((H=b.pop())){if(H in I){this.set(H,I[H])}}this.setAttributeConfig(f,{readOnly:true,value:this.getElementsByClassName(A)[0]});this.setAttributeConfig(d,{readOnly:true,value:this.getElementsByClassName(D)[0]});this.setAttributeConfig(x,{value:e,validator:function(J){if(this._rendered){return false}switch(J){case e:case t:case G:case s:return true;default:return false}}});this.setAttributeConfig(y,{value:100,validator:i.isNumber,method:function(J){this.get("element").setAttribute("aria-valuemax",J);if(this.get(j)>J){this.set(j,J)}}});this.setAttributeConfig(m,{value:0,validator:i.isNumber,method:function(J){this.get("element").setAttribute("aria-valuemin",J);if(this.get(j)<J){this.set(j,J)}}});this.setAttributeConfig(h,{getter:function(){return this.getStyle(h)},method:this._widthChange});this.setAttributeConfig(w,{getter:function(){return this.getStyle(w)},method:this._heightChange});this.setAttributeConfig(v,{value:"{value}"});this.setAttributeConfig(j,{value:0,validator:function(J){return i.isNumber(J)&&J>=this.get(m)&&J<=this.get(y)},method:this._valueChange});this.setAttributeConfig(a,{validator:function(J){return!!YAHOO.util.Anim},setter:this._animSetter});this.setAttributeConfig(n,{value:null,validator:function(J){return i.isNumber(J)||i.isNull(J)},method:function(J){this._fixAnim(this.get(a),J)}})},render:function(H,I){if(this._rendered){return}this._rendered=true;var J=this.get(x);this.addClass(B);this.addClass(B+"-"+J);var b=this.get("element");b.tabIndex=0;b.setAttribute("role","progressbar");b.setAttribute("aria-valuemin",this.get(m));b.setAttribute("aria-valuemax",this.get(y));this.appendTo(H,I);this.redraw(false);this._previousValue=this.get(j);this._fixEdges();this.on("minValueChange",this.redraw);this.on("maxValueChange",this.redraw);return this},redraw:function(b){this._recalculateConstants();this._valueChange(this.get(j),b)},destroy:function(){this.set(a,false);this.unsubscribeAll();var b=this.get("element");if(b.parentNode){b.parentNode.removeChild(b)}},_previousValue:0,_barSpace:100,_barFactor:1,_rendered:false,_heightChange:function(b){if(i.isNumber(b)){b+=o}this.setStyle(w,b);this._fixEdges();this.redraw(false)},_widthChange:function(b){if(i.isNumber(b)){b+=o}this.setStyle(h,b);this._fixEdges();this.redraw(false)},_fixEdges:function(){if(!this._rendered||YAHOO.env.ua.ie||YAHOO.env.ua.gecko){return}var J=this.get(d),L=c.getElementsByClassName(q,undefined,J)[0],I=c.getElementsByClassName(l,undefined,J)[0],K=c.getElementsByClassName(k,undefined,J)[0],H=c.getElementsByClassName(g,undefined,J)[0],b=(parseInt(c.getStyle(J,w),10)-parseInt(c.getStyle(L,w),10))+o;c.setStyle(K,w,b);c.setStyle(H,w,b);b=(parseInt(c.getStyle(J,h),10)-parseInt(c.getStyle(L,h),10))+o;c.setStyle(I,h,b);c.setStyle(H,h,b)},_recalculateConstants:function(){var b=this.get(f);switch(this.get(x)){case e:case t:this._barSpace=parseInt(this.get(h),10)-(parseInt(c.getStyle(b,"marginLeft"),10)||0)-(parseInt(c.getStyle(b,"marginRight"),10)||0);break;case G:case s:this._barSpace=parseInt(this.get(w),10)-(parseInt(c.getStyle(b,"marginTop"),10)||0)-(parseInt(c.getStyle(b,"marginBottom"),10)||0);break}this._barFactor=this._barSpace/(this.get(y)-(this.get(m)||0))||1},_animSetter:function(I){var H,b=this.get(f);if(I){if(I instanceof YAHOO.util.Anim){H=I}else{H=new YAHOO.util.Anim(b)}H.onTween.subscribe(this._animOnTween,this,true);H.onComplete.subscribe(this._animComplete,this,true);this._fixAnim(H,this.get(n))}else{H=this.get(a);if(H){H.onTween.unsubscribeAll();H.onComplete.unsubscribeAll()}H=null}return H},_fixAnim:function(I,H){if(I){if(!this._oldSetAttribute){this._oldSetAttribute=I.setAttribute}var b=this;switch(this.get(x)){case e:I.setAttribute=function(J,L,K){L=Math.round(L);b._oldSetAttribute.call(this,J,L,K);if(J==h){b._oldSetAttribute.call(this,p,-L*H,o)}};break;case t:I.setAttribute=function(J,M,K){M=Math.round(M);b._oldSetAttribute.call(this,J,M,K);if(J==h){var L=b._barSpace-M;b._oldSetAttribute.call(this,"left",L,o);b._oldSetAttribute.call(this,p,-L+M*H,o)}};break;case G:I.setAttribute=function(J,L,K){L=Math.round(L);b._oldSetAttribute.call(this,J,L,K);if(J==w){b._oldSetAttribute.call(this,p,"center "+(-L*H),o)}};break;case s:I.setAttribute=function(J,M,K){M=Math.round(M);b._oldSetAttribute.call(this,J,M,K);if(J==w){var L=b._barSpace-M;b._oldSetAttribute.call(this,"top",L,o);b._oldSetAttribute.call(this,p,"center "+(M*H-L),o)}};break}}},_animComplete:function(){var b=this.get(j);this._previousValue=b;this.fireEvent(F,b);this.fireEvent(u,b);c.removeClass(this.get(f),z)},_animOnTween:function(b,H){var I=Math.floor(this._tweenFactor*H[0].currentFrame+this._previousValue);this.fireEvent(F,I)},_valueChange:function(J,H){var I=this.get(a),b=Math.floor((J-this.get(m))*this._barFactor);this._setAriaText(J);if(this._rendered){if(I){I.stop();if(I.isAnimated()){I._onComplete.fire()}}this.fireEvent(C,this._previousValue);r._barSizeFunctions[((H!==false)&&I)?1:0][this.get(x)].call(this,J,b,this.get(f),I)}},_setAriaText:function(H){var b=this.get("element"),I=i.substitute(this.get(v),{value:H,minValue:this.get(m),maxValue:this.get(y)});b.setAttribute("aria-valuenow",H);b.setAttribute("aria-valuetext",I)}});var E=[{},{}];r._barSizeFunctions=E;E[0][e]=function(J,b,H,I){c.setStyle(H,h,b+o);this.fireEvent(F,J);this.fireEvent(u,J)};E[0][t]=function(J,b,H,I){c.setStyle(H,h,b+o);c.setStyle(H,"left",(this._barSpace-b)+o);this.fireEvent(F,J);this.fireEvent(u,J)};E[0][G]=function(J,b,H,I){c.setStyle(H,w,b+o);this.fireEvent(F,J);this.fireEvent(u,J)};E[0][s]=function(J,b,H,I){c.setStyle(H,w,b+o);c.setStyle(H,"top",(this._barSpace-b)+o);this.fireEvent(F,J);this.fireEvent(u,J)};E[1][e]=function(J,b,H,I){c.addClass(H,z);this._tweenFactor=(J-this._previousValue)/I.totalFrames/I.duration;I.attributes={width:{to:b}};I.animate()};E[1][t]=E[1][e];E[1][G]=function(J,b,H,I){c.addClass(H,z);this._tweenFactor=(J-this._previousValue)/I.totalFrames/I.duration;I.attributes={height:{to:b}};I.animate()};E[1][s]=E[1][G]})();YAHOO.register("progressbar",YAHOO.widget.ProgressBar,{version:"2.9.0",build:"2800"});
//
//../pacotes/yui290/build/selector/selector-min.js
/*
Copyright (c) 2011, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 2.9.0
*/
var Y=YAHOO,Y_DOM=YAHOO.util.Dom,EMPTY_ARRAY=[],Y_UA=Y.env.ua,Y_Lang=Y.lang,Y_DOC=document,Y_DOCUMENT_ELEMENT=Y_DOC.documentElement,Y_DOM_inDoc=Y_DOM.inDocument,Y_mix=Y_Lang.augmentObject,Y_guid=Y_DOM.generateId,Y_getDoc=function(a){var b=Y_DOC;if(a){b=(a.nodeType===9)?a:a.ownerDocument||a.document||Y_DOC;}return b;},Y_Array=function(g,d){var c,b,h=d||0;try{return Array.prototype.slice.call(g,h);}catch(f){b=[];c=g.length;for(;h<c;h++){b.push(g[h]);}return b;}},Y_DOM_allById=function(f,a){a=a||Y_DOC;var b=[],c=[],d,e;if(a.querySelectorAll){c=a.querySelectorAll('[id="'+f+'"]');}else{if(a.all){b=a.all(f);if(b){if(b.nodeName){if(b.id===f){c.push(b);b=EMPTY_ARRAY;}else{b=[b];}}if(b.length){for(d=0;e=b[d++];){if(e.id===f||(e.attributes&&e.attributes.id&&e.attributes.id.value===f)){c.push(e);}}}}}else{c=[Y_getDoc(a).getElementById(f)];}}return c;};var COMPARE_DOCUMENT_POSITION="compareDocumentPosition",OWNER_DOCUMENT="ownerDocument",Selector={_foundCache:[],useNative:true,_compare:("sourceIndex" in Y_DOCUMENT_ELEMENT)?function(f,e){var d=f.sourceIndex,c=e.sourceIndex;if(d===c){return 0;}else{if(d>c){return 1;}}return -1;}:(Y_DOCUMENT_ELEMENT[COMPARE_DOCUMENT_POSITION]?function(b,a){if(b[COMPARE_DOCUMENT_POSITION](a)&4){return -1;}else{return 1;}}:function(e,d){var c,a,b;if(e&&d){c=e[OWNER_DOCUMENT].createRange();c.setStart(e,0);a=d[OWNER_DOCUMENT].createRange();a.setStart(d,0);b=c.compareBoundaryPoints(1,a);}return b;}),_sort:function(a){if(a){a=Y_Array(a,0,true);if(a.sort){a.sort(Selector._compare);}}return a;},_deDupe:function(a){var b=[],c,d;for(c=0;(d=a[c++]);){if(!d._found){b[b.length]=d;d._found=true;}}for(c=0;(d=b[c++]);){d._found=null;d.removeAttribute("_found");}return b;},query:function(b,j,k,a){if(j&&typeof j=="string"){j=Y_DOM.get(j);if(!j){return(k)?null:[];}}else{j=j||Y_DOC;}var f=[],c=(Selector.useNative&&Y_DOC.querySelector&&!a),e=[[b,j]],g,l,d,h=(c)?Selector._nativeQuery:Selector._bruteQuery;if(b&&h){if(!a&&(!c||j.tagName)){e=Selector._splitQueries(b,j);}for(d=0;(g=e[d++]);){l=h(g[0],g[1],k);if(!k){l=Y_Array(l,0,true);}if(l){f=f.concat(l);}}if(e.length>1){f=Selector._sort(Selector._deDupe(f));}}return(k)?(f[0]||null):f;},_splitQueries:function(c,f){var b=c.split(","),d=[],g="",e,a;if(f){if(f.tagName){f.id=f.id||Y_guid();g='[id="'+f.id+'"] ';}for(e=0,a=b.length;e<a;++e){c=g+b[e];d.push([c,f]);}}return d;},_nativeQuery:function(a,b,c){if(Y_UA.webkit&&a.indexOf(":checked")>-1&&(Selector.pseudos&&Selector.pseudos.checked)){return Selector.query(a,b,c,true);}try{return b["querySelector"+(c?"":"All")](a);}catch(d){return Selector.query(a,b,c,true);}},filter:function(b,a){var c=[],d,e;if(b&&a){for(d=0;(e=b[d++]);){if(Selector.test(e,a)){c[c.length]=e;}}}else{}return c;},test:function(c,d,k){var g=false,b=d.split(","),a=false,l,o,h,n,f,e,m;if(c&&c.tagName){if(!k&&!Y_DOM_inDoc(c)){l=c.parentNode;if(l){k=l;}else{n=c[OWNER_DOCUMENT].createDocumentFragment();n.appendChild(c);k=n;a=true;}}k=k||c[OWNER_DOCUMENT];if(!c.id){c.id=Y_guid();}for(f=0;(m=b[f++]);){m+='[id="'+c.id+'"]';h=Selector.query(m,k);for(e=0;o=h[e++];){if(o===c){g=true;break;}}if(g){break;}}if(a){n.removeChild(c);}}return g;}};YAHOO.util.Selector=Selector;var PARENT_NODE="parentNode",TAG_NAME="tagName",ATTRIBUTES="attributes",COMBINATOR="combinator",PSEUDOS="pseudos",SelectorCSS2={_reRegExpTokens:/([\^\$\?\[\]\*\+\-\.\(\)\|\\])/,SORT_RESULTS:true,_children:function(e,a){var b=e.children,d,c=[],f,g;if(e.children&&a&&e.children.tags){c=e.children.tags(a);}else{if((!b&&e[TAG_NAME])||(b&&a)){f=b||e.childNodes;b=[];for(d=0;(g=f[d++]);){if(g.tagName){if(!a||a===g.tagName){b.push(g);}}}}}return b||[];},_re:{attr:/(\[[^\]]*\])/g,esc:/\\[:\[\]\(\)#\.\'\>+~"]/gi,pseudos:/(\([^\)]*\))/g},shorthand:{"\\#(-?[_a-z]+[-\\w\\uE000]*)":"[id=$1]","\\.(-?[_a-z]+[-\\w\\uE000]*)":"[className~=$1]"},operators:{"":function(b,a){return !!b.getAttribute(a);},"~=":"(?:^|\\s+){val}(?:\\s+|$)","|=":"^{val}(?:-|$)"},pseudos:{"first-child":function(a){return Selector._children(a[PARENT_NODE])[0]===a;}},_bruteQuery:function(f,j,l){var g=[],a=[],i=Selector._tokenize(f),e=i[i.length-1],k=Y_getDoc(j),c,b,h,d;if(e){b=e.id;h=e.className;d=e.tagName||"*";if(j.getElementsByTagName){if(b&&(j.all||(j.nodeType===9||Y_DOM_inDoc(j)))){a=Y_DOM_allById(b,j);}else{if(h){a=j.getElementsByClassName(h);}else{a=j.getElementsByTagName(d);}}}else{c=j.firstChild;while(c){if(c.tagName){a.push(c);}c=c.nextSilbing||c.firstChild;}}if(a.length){g=Selector._filterNodes(a,i,l);}}return g;},_filterNodes:function(l,f,h){var r=0,q,s=f.length,k=s-1,e=[],o=l[0],v=o,t=Selector.getters,d,p,c,g,a,m,b,u;for(r=0;(v=o=l[r++]);){k=s-1;g=null;testLoop:while(v&&v.tagName){c=f[k];b=c.tests;q=b.length;if(q&&!a){while((u=b[--q])){d=u[1];if(t[u[0]]){m=t[u[0]](v,u[0]);}else{m=v[u[0]];if(m===undefined&&v.getAttribute){m=v.getAttribute(u[0]);}}if((d==="="&&m!==u[2])||(typeof d!=="string"&&d.test&&!d.test(m))||(!d.test&&typeof d==="function"&&!d(v,u[0],u[2]))){if((v=v[g])){while(v&&(!v.tagName||(c.tagName&&c.tagName!==v.tagName))){v=v[g];}}continue testLoop;}}}k--;if(!a&&(p=c.combinator)){g=p.axis;v=v[g];while(v&&!v.tagName){v=v[g];}if(p.direct){g=null;}}else{e.push(o);if(h){return e;}break;}}}o=v=null;return e;},combinators:{" ":{axis:"parentNode"},">":{axis:"parentNode",direct:true},"+":{axis:"previousSibling",direct:true}},_parsers:[{name:ATTRIBUTES,re:/^\uE003(-?[a-z]+[\w\-]*)+([~\|\^\$\*!=]=?)?['"]?([^\uE004'"]*)['"]?\uE004/i,fn:function(d,e){var c=d[2]||"",a=Selector.operators,b=(d[3])?d[3].replace(/\\/g,""):"",f;if((d[1]==="id"&&c==="=")||(d[1]==="className"&&Y_DOCUMENT_ELEMENT.getElementsByClassName&&(c==="~="||c==="="))){e.prefilter=d[1];d[3]=b;e[d[1]]=(d[1]==="id")?d[3]:b;}if(c in a){f=a[c];if(typeof f==="string"){d[3]=b.replace(Selector._reRegExpTokens,"\\$1");f=new RegExp(f.replace("{val}",d[3]));}d[2]=f;}if(!e.last||e.prefilter!==d[1]){return d.slice(1);}}},{name:TAG_NAME,re:/^((?:-?[_a-z]+[\w-]*)|\*)/i,fn:function(b,c){var a=b[1].toUpperCase();c.tagName=a;if(a!=="*"&&(!c.last||c.prefilter)){return[TAG_NAME,"=",a];
}if(!c.prefilter){c.prefilter="tagName";}}},{name:COMBINATOR,re:/^\s*([>+~]|\s)\s*/,fn:function(a,b){}},{name:PSEUDOS,re:/^:([\-\w]+)(?:\uE005['"]?([^\uE005]*)['"]?\uE006)*/i,fn:function(a,b){var c=Selector[PSEUDOS][a[1]];if(c){if(a[2]){a[2]=a[2].replace(/\\/g,"");}return[a[2],c];}else{return false;}}}],_getToken:function(a){return{tagName:null,id:null,className:null,attributes:{},combinator:null,tests:[]};},_tokenize:function(c){c=c||"";c=Selector._replaceShorthand(Y_Lang.trim(c));var b=Selector._getToken(),h=c,g=[],j=false,e,f,d,a;outer:do{j=false;for(d=0;(a=Selector._parsers[d++]);){if((e=a.re.exec(c))){if(a.name!==COMBINATOR){b.selector=c;}c=c.replace(e[0],"");if(!c.length){b.last=true;}if(Selector._attrFilters[e[1]]){e[1]=Selector._attrFilters[e[1]];}f=a.fn(e,b);if(f===false){j=false;break outer;}else{if(f){b.tests.push(f);}}if(!c.length||a.name===COMBINATOR){g.push(b);b=Selector._getToken(b);if(a.name===COMBINATOR){b.combinator=Selector.combinators[e[1]];}}j=true;}}}while(j&&c.length);if(!j||c.length){g=[];}return g;},_replaceShorthand:function(b){var d=Selector.shorthand,c=b.match(Selector._re.esc),e,h,g,f,a;if(c){b=b.replace(Selector._re.esc,"\uE000");}e=b.match(Selector._re.attr);h=b.match(Selector._re.pseudos);if(e){b=b.replace(Selector._re.attr,"\uE001");}if(h){b=b.replace(Selector._re.pseudos,"\uE002");}for(g in d){if(d.hasOwnProperty(g)){b=b.replace(new RegExp(g,"gi"),d[g]);}}if(e){for(f=0,a=e.length;f<a;++f){b=b.replace(/\uE001/,e[f]);}}if(h){for(f=0,a=h.length;f<a;++f){b=b.replace(/\uE002/,h[f]);}}b=b.replace(/\[/g,"\uE003");b=b.replace(/\]/g,"\uE004");b=b.replace(/\(/g,"\uE005");b=b.replace(/\)/g,"\uE006");if(c){for(f=0,a=c.length;f<a;++f){b=b.replace("\uE000",c[f]);}}return b;},_attrFilters:{"class":"className","for":"htmlFor"},getters:{href:function(b,a){return Y_DOM.getAttribute(b,a);}}};Y_mix(Selector,SelectorCSS2,true);Selector.getters.src=Selector.getters.rel=Selector.getters.href;if(Selector.useNative&&Y_DOC.querySelector){Selector.shorthand["\\.([^\\s\\\\(\\[:]*)"]="[class~=$1]";}Selector._reNth=/^(?:([\-]?\d*)(n){1}|(odd|even)$)*([\-+]?\d*)$/;Selector._getNth=function(d,o,q,h){Selector._reNth.test(o);var m=parseInt(RegExp.$1,10),c=RegExp.$2,j=RegExp.$3,k=parseInt(RegExp.$4,10)||0,p=[],l=Selector._children(d.parentNode,q),f;if(j){m=2;f="+";c="n";k=(j==="odd")?1:0;}else{if(isNaN(m)){m=(c)?1:0;}}if(m===0){if(h){k=l.length-k+1;}if(l[k-1]===d){return true;}else{return false;}}else{if(m<0){h=!!h;m=Math.abs(m);}}if(!h){for(var e=k-1,g=l.length;e<g;e+=m){if(e>=0&&l[e]===d){return true;}}}else{for(var e=l.length-k,g=l.length;e>=0;e-=m){if(e<g&&l[e]===d){return true;}}}return false;};Y_mix(Selector.pseudos,{"root":function(a){return a===a.ownerDocument.documentElement;},"nth-child":function(a,b){return Selector._getNth(a,b);},"nth-last-child":function(a,b){return Selector._getNth(a,b,null,true);},"nth-of-type":function(a,b){return Selector._getNth(a,b,a.tagName);},"nth-last-of-type":function(a,b){return Selector._getNth(a,b,a.tagName,true);},"last-child":function(b){var a=Selector._children(b.parentNode);return a[a.length-1]===b;},"first-of-type":function(a){return Selector._children(a.parentNode,a.tagName)[0]===a;},"last-of-type":function(b){var a=Selector._children(b.parentNode,b.tagName);return a[a.length-1]===b;},"only-child":function(b){var a=Selector._children(b.parentNode);return a.length===1&&a[0]===b;},"only-of-type":function(b){var a=Selector._children(b.parentNode,b.tagName);return a.length===1&&a[0]===b;},"empty":function(a){return a.childNodes.length===0;},"not":function(a,b){return !Selector.test(a,b);},"contains":function(a,b){var c=a.innerText||a.textContent||"";return c.indexOf(b)>-1;},"checked":function(a){return(a.checked===true||a.selected===true);},enabled:function(a){return(a.disabled!==undefined&&!a.disabled);},disabled:function(a){return(a.disabled);}});Y_mix(Selector.operators,{"^=":"^{val}","!=":function(b,a,c){return b[a]!==c;},"$=":"{val}$","*=":"{val}"});Selector.combinators["~"]={axis:"previousSibling"};YAHOO.register("selector",YAHOO.util.Selector,{version:"2.9.0",build:"2800"});
//
//../pacotes/jquery/dist/jquery.min.js
/*! jQuery v2.2.3 | (c) jQuery Foundation | jquery.org/license */
!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=a.document,e=c.slice,f=c.concat,g=c.push,h=c.indexOf,i={},j=i.toString,k=i.hasOwnProperty,l={},m="2.2.3",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return e.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:e.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a){return n.each(this,a)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(e.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor()},push:g,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(n.isPlainObject(d)||(e=n.isArray(d)))?(e?(e=!1,f=c&&n.isArray(c)?c:[]):f=c&&n.isPlainObject(c)?c:{},g[b]=n.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){var b=a&&a.toString();return!n.isArray(a)&&b-parseFloat(b)+1>=0},isPlainObject:function(a){var b;if("object"!==n.type(a)||a.nodeType||n.isWindow(a))return!1;if(a.constructor&&!k.call(a,"constructor")&&!k.call(a.constructor.prototype||{},"isPrototypeOf"))return!1;for(b in a);return void 0===b||k.call(a,b)},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?i[j.call(a)]||"object":typeof a},globalEval:function(a){var b,c=eval;a=n.trim(a),a&&(1===a.indexOf("use strict")?(b=d.createElement("script"),b.text=a,d.head.appendChild(b).parentNode.removeChild(b)):c(a))},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b){var c,d=0;if(s(a)){for(c=a.length;c>d;d++)if(b.call(a[d],d,a[d])===!1)break}else for(d in a)if(b.call(a[d],d,a[d])===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):g.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:h.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;c>d;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,e,g=0,h=[];if(s(a))for(d=a.length;d>g;g++)e=b(a[g],g,c),null!=e&&h.push(e);else for(g in a)e=b(a[g],g,c),null!=e&&h.push(e);return f.apply([],h)},guid:1,proxy:function(a,b){var c,d,f;return"string"==typeof b&&(c=a[b],b=a,a=c),n.isFunction(a)?(d=e.call(arguments,2),f=function(){return a.apply(b||this,d.concat(e.call(arguments)))},f.guid=a.guid=a.guid||n.guid++,f):void 0},now:Date.now,support:l}),"function"==typeof Symbol&&(n.fn[Symbol.iterator]=c[Symbol.iterator]),n.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(a,b){i["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=!!a&&"length"in a&&a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ga(),z=ga(),A=ga(),B=function(a,b){return a===b&&(l=!0),0},C=1<<31,D={}.hasOwnProperty,E=[],F=E.pop,G=E.push,H=E.push,I=E.slice,J=function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},K="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",L="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",N="\\["+L+"*("+M+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+M+"))|)"+L+"*\\]",O=":("+M+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+N+")*)|.*)\\)|)",P=new RegExp(L+"+","g"),Q=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g"),R=new RegExp("^"+L+"*,"+L+"*"),S=new RegExp("^"+L+"*([>+~]|"+L+")"+L+"*"),T=new RegExp("="+L+"*([^\\]'\"]*?)"+L+"*\\]","g"),U=new RegExp(O),V=new RegExp("^"+M+"$"),W={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M+"|[*])"),ATTR:new RegExp("^"+N),PSEUDO:new RegExp("^"+O),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+L+"*(even|odd|(([+-]|)(\\d*)n|)"+L+"*(?:([+-]|)"+L+"*(\\d+)|))"+L+"*\\)|)","i"),bool:new RegExp("^(?:"+K+")$","i"),needsContext:new RegExp("^"+L+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+L+"*((?:-\\d)?\\d*)"+L+"*\\)|)(?=[^-]|$)","i")},X=/^(?:input|select|textarea|button)$/i,Y=/^h\d$/i,Z=/^[^{]+\{\s*\[native \w/,$=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,_=/[+~]/,aa=/'|\\/g,ba=new RegExp("\\\\([\\da-f]{1,6}"+L+"?|("+L+")|.)","ig"),ca=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},da=function(){m()};try{H.apply(E=I.call(v.childNodes),v.childNodes),E[v.childNodes.length].nodeType}catch(ea){H={apply:E.length?function(a,b){G.apply(a,I.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function fa(a,b,d,e){var f,h,j,k,l,o,r,s,w=b&&b.ownerDocument,x=b?b.nodeType:9;if(d=d||[],"string"!=typeof a||!a||1!==x&&9!==x&&11!==x)return d;if(!e&&((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,p)){if(11!==x&&(o=$.exec(a)))if(f=o[1]){if(9===x){if(!(j=b.getElementById(f)))return d;if(j.id===f)return d.push(j),d}else if(w&&(j=w.getElementById(f))&&t(b,j)&&j.id===f)return d.push(j),d}else{if(o[2])return H.apply(d,b.getElementsByTagName(a)),d;if((f=o[3])&&c.getElementsByClassName&&b.getElementsByClassName)return H.apply(d,b.getElementsByClassName(f)),d}if(c.qsa&&!A[a+" "]&&(!q||!q.test(a))){if(1!==x)w=b,s=a;else if("object"!==b.nodeName.toLowerCase()){(k=b.getAttribute("id"))?k=k.replace(aa,"\\$&"):b.setAttribute("id",k=u),r=g(a),h=r.length,l=V.test(k)?"#"+k:"[id='"+k+"']";while(h--)r[h]=l+" "+qa(r[h]);s=r.join(","),w=_.test(a)&&oa(b.parentNode)||b}if(s)try{return H.apply(d,w.querySelectorAll(s)),d}catch(y){}finally{k===u&&b.removeAttribute("id")}}}return i(a.replace(Q,"$1"),b,d,e)}function ga(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ha(a){return a[u]=!0,a}function ia(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function ja(a,b){var c=a.split("|"),e=c.length;while(e--)d.attrHandle[c[e]]=b}function ka(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||C)-(~a.sourceIndex||C);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function la(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function ma(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function na(a){return ha(function(b){return b=+b,ha(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function oa(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=fa.support={},f=fa.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=fa.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=n.documentElement,p=!f(n),(e=n.defaultView)&&e.top!==e&&(e.addEventListener?e.addEventListener("unload",da,!1):e.attachEvent&&e.attachEvent("onunload",da)),c.attributes=ia(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ia(function(a){return a.appendChild(n.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Z.test(n.getElementsByClassName),c.getById=ia(function(a){return o.appendChild(a).id=u,!n.getElementsByName||!n.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ba,ca);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ba,ca);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return"undefined"!=typeof b.getElementsByClassName&&p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=Z.test(n.querySelectorAll))&&(ia(function(a){o.appendChild(a).innerHTML="<a id='"+u+"'></a><select id='"+u+"-\r\\' msallowcapture=''><option selected=''></option></select>",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+L+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+L+"*(?:value|"+K+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),ia(function(a){var b=n.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+L+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=Z.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ia(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",O)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=Z.test(o.compareDocumentPosition),t=b||Z.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===n||a.ownerDocument===v&&t(v,a)?-1:b===n||b.ownerDocument===v&&t(v,b)?1:k?J(k,a)-J(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,g=[a],h=[b];if(!e||!f)return a===n?-1:b===n?1:e?-1:f?1:k?J(k,a)-J(k,b):0;if(e===f)return ka(a,b);c=a;while(c=c.parentNode)g.unshift(c);c=b;while(c=c.parentNode)h.unshift(c);while(g[d]===h[d])d++;return d?ka(g[d],h[d]):g[d]===v?-1:h[d]===v?1:0},n):n},fa.matches=function(a,b){return fa(a,null,null,b)},fa.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(T,"='$1']"),c.matchesSelector&&p&&!A[b+" "]&&(!r||!r.test(b))&&(!q||!q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return fa(b,n,null,[a]).length>0},fa.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},fa.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&D.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},fa.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},fa.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=fa.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=fa.selectors={cacheLength:50,createPseudo:ha,match:W,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ba,ca),a[3]=(a[3]||a[4]||a[5]||"").replace(ba,ca),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||fa.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&fa.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return W.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&U.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ba,ca).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+L+")"+a+"("+L+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=fa.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(P," ")+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h,t=!1;if(q){if(f){while(p){m=b;while(m=m[p])if(h?m.nodeName.toLowerCase()===r:1===m.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){m=q,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n&&j[2],m=n&&q.childNodes[n];while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if(1===m.nodeType&&++t&&m===b){k[a]=[w,n,t];break}}else if(s&&(m=b,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n),t===!1)while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if((h?m.nodeName.toLowerCase()===r:1===m.nodeType)&&++t&&(s&&(l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),k[a]=[w,t]),m===b))break;return t-=e,t===d||t%d===0&&t/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||fa.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ha(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=J(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ha(function(a){var b=[],c=[],d=h(a.replace(Q,"$1"));return d[u]?ha(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ha(function(a){return function(b){return fa(a,b).length>0}}),contains:ha(function(a){return a=a.replace(ba,ca),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ha(function(a){return V.test(a||"")||fa.error("unsupported lang: "+a),a=a.replace(ba,ca).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Y.test(a.nodeName)},input:function(a){return X.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:na(function(){return[0]}),last:na(function(a,b){return[b-1]}),eq:na(function(a,b,c){return[0>c?c+b:c]}),even:na(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:na(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:na(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:na(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=la(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=ma(b);function pa(){}pa.prototype=d.filters=d.pseudos,d.setFilters=new pa,g=fa.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){c&&!(e=R.exec(h))||(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=S.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(Q," ")}),h=h.slice(c.length));for(g in d.filter)!(e=W[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?fa.error(a):z(a,i).slice(0)};function qa(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function ra(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j,k=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(j=b[u]||(b[u]={}),i=j[b.uniqueID]||(j[b.uniqueID]={}),(h=i[d])&&h[0]===w&&h[1]===f)return k[2]=h[2];if(i[d]=k,k[2]=a(b,c,g))return!0}}}function sa(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function ta(a,b,c){for(var d=0,e=b.length;e>d;d++)fa(a,b[d],c);return c}function ua(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(c&&!c(f,d,e)||(g.push(f),j&&b.push(h)));return g}function va(a,b,c,d,e,f){return d&&!d[u]&&(d=va(d)),e&&!e[u]&&(e=va(e,f)),ha(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||ta(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:ua(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=ua(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?J(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=ua(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):H.apply(g,r)})}function wa(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=ra(function(a){return a===b},h,!0),l=ra(function(a){return J(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];f>i;i++)if(c=d.relative[a[i].type])m=[ra(sa(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return va(i>1&&sa(m),i>1&&qa(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(Q,"$1"),c,e>i&&wa(a.slice(i,e)),f>e&&wa(a=a.slice(e)),f>e&&qa(a))}m.push(c)}return sa(m)}function xa(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,o,q,r=0,s="0",t=f&&[],u=[],v=j,x=f||e&&d.find.TAG("*",k),y=w+=null==v?1:Math.random()||.1,z=x.length;for(k&&(j=g===n||g||k);s!==z&&null!=(l=x[s]);s++){if(e&&l){o=0,g||l.ownerDocument===n||(m(l),h=!p);while(q=a[o++])if(q(l,g||n,h)){i.push(l);break}k&&(w=y)}c&&((l=!q&&l)&&r--,f&&t.push(l))}if(r+=s,c&&s!==r){o=0;while(q=b[o++])q(t,u,g,h);if(f){if(r>0)while(s--)t[s]||u[s]||(u[s]=F.call(i));u=ua(u)}H.apply(i,u),k&&!f&&u.length>0&&r+b.length>1&&fa.uniqueSort(i)}return k&&(w=y,j=v),t};return c?ha(f):f}return h=fa.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=wa(b[c]),f[u]?d.push(f):e.push(f);f=A(a,xa(e,d)),f.selector=a}return f},i=fa.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(ba,ca),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=W.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(ba,ca),_.test(j[0].type)&&oa(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&qa(j),!a)return H.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,!b||_.test(a)&&oa(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ia(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ia(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||ja("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ia(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||ja("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ia(function(a){return null==a.getAttribute("disabled")})||ja(K,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),fa}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.uniqueSort=n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&n(a).is(c))break;d.push(a)}return d},v=function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c},w=n.expr.match.needsContext,x=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,y=/^.[^:#\[\.,]*$/;function z(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(y.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return h.call(b,a)>-1!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=this.length,d=[],e=this;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;c>b;b++)if(n.contains(e[b],this))return!0}));for(b=0;c>b;b++)n.find(a,e[b],d);return d=this.pushStack(c>1?n.unique(d):d),d.selector=this.selector?this.selector+" "+a:a,d},filter:function(a){return this.pushStack(z(this,a||[],!1))},not:function(a){return this.pushStack(z(this,a||[],!0))},is:function(a){return!!z(this,"string"==typeof a&&w.test(a)?n(a):a||[],!1).length}});var A,B=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,C=n.fn.init=function(a,b,c){var e,f;if(!a)return this;if(c=c||A,"string"==typeof a){if(e="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:B.exec(a),!e||!e[1]&&b)return!b||b.jquery?(b||c).find(a):this.constructor(b).find(a);if(e[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(e[1],b&&b.nodeType?b.ownerDocument||b:d,!0)),x.test(e[1])&&n.isPlainObject(b))for(e in b)n.isFunction(this[e])?this[e](b[e]):this.attr(e,b[e]);return this}return f=d.getElementById(e[2]),f&&f.parentNode&&(this.length=1,this[0]=f),this.context=d,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?void 0!==c.ready?c.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};C.prototype=n.fn,A=n(d);var D=/^(?:parents|prev(?:Until|All))/,E={children:!0,contents:!0,next:!0,prev:!0};n.fn.extend({has:function(a){var b=n(a,this),c=b.length;return this.filter(function(){for(var a=0;c>a;a++)if(n.contains(this,b[a]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=w.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.uniqueSort(f):f)},index:function(a){return a?"string"==typeof a?h.call(n(a),this[0]):h.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.uniqueSort(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function F(a,b){while((a=a[b])&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return u(a,"parentNode")},parentsUntil:function(a,b,c){return u(a,"parentNode",c)},next:function(a){return F(a,"nextSibling")},prev:function(a){return F(a,"previousSibling")},nextAll:function(a){return u(a,"nextSibling")},prevAll:function(a){return u(a,"previousSibling")},nextUntil:function(a,b,c){return u(a,"nextSibling",c)},prevUntil:function(a,b,c){return u(a,"previousSibling",c)},siblings:function(a){return v((a.parentNode||{}).firstChild,a)},children:function(a){return v(a.firstChild)},contents:function(a){return a.contentDocument||n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(E[a]||n.uniqueSort(e),D.test(a)&&e.reverse()),this.pushStack(e)}});var G=/\S+/g;function H(a){var b={};return n.each(a.match(G)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?H(a):n.extend({},a);var b,c,d,e,f=[],g=[],h=-1,i=function(){for(e=a.once,d=b=!0;g.length;h=-1){c=g.shift();while(++h<f.length)f[h].apply(c[0],c[1])===!1&&a.stopOnFalse&&(h=f.length,c=!1)}a.memory||(c=!1),b=!1,e&&(f=c?[]:"")},j={add:function(){return f&&(c&&!b&&(h=f.length-1,g.push(c)),function d(b){n.each(b,function(b,c){n.isFunction(c)?a.unique&&j.has(c)||f.push(c):c&&c.length&&"string"!==n.type(c)&&d(c)})}(arguments),c&&!b&&i()),this},remove:function(){return n.each(arguments,function(a,b){var c;while((c=n.inArray(b,f,c))>-1)f.splice(c,1),h>=c&&h--}),this},has:function(a){return a?n.inArray(a,f)>-1:f.length>0},empty:function(){return f&&(f=[]),this},disable:function(){return e=g=[],f=c="",this},disabled:function(){return!f},lock:function(){return e=g=[],c||(f=c=""),this},locked:function(){return!!e},fireWith:function(a,c){return e||(c=c||[],c=[a,c.slice?c.slice():c],g.push(c),b||i()),this},fire:function(){return j.fireWith(this,arguments),this},fired:function(){return!!d}};return j},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().progress(c.notify).done(c.resolve).fail(c.reject):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=e.call(arguments),d=c.length,f=1!==d||a&&n.isFunction(a.promise)?d:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(d){b[a]=this,c[a]=arguments.length>1?e.call(arguments):d,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(d>1)for(i=new Array(d),j=new Array(d),k=new Array(d);d>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().progress(h(b,j,i)).done(h(b,k,c)).fail(g.reject):--f;return f||g.resolveWith(k,c),g.promise()}});var I;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){(a===!0?--n.readyWait:n.isReady)||(n.isReady=!0,a!==!0&&--n.readyWait>0||(I.resolveWith(d,[n]),n.fn.triggerHandler&&(n(d).triggerHandler("ready"),n(d).off("ready"))))}});function J(){d.removeEventListener("DOMContentLoaded",J),a.removeEventListener("load",J),n.ready()}n.ready.promise=function(b){return I||(I=n.Deferred(),"complete"===d.readyState||"loading"!==d.readyState&&!d.documentElement.doScroll?a.setTimeout(n.ready):(d.addEventListener("DOMContentLoaded",J),a.addEventListener("load",J))),I.promise(b)},n.ready.promise();var K=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)K(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},L=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};function M(){this.expando=n.expando+M.uid++}M.uid=1,M.prototype={register:function(a,b){var c=b||{};return a.nodeType?a[this.expando]=c:Object.defineProperty(a,this.expando,{value:c,writable:!0,configurable:!0}),a[this.expando]},cache:function(a){if(!L(a))return{};var b=a[this.expando];return b||(b={},L(a)&&(a.nodeType?a[this.expando]=b:Object.defineProperty(a,this.expando,{value:b,configurable:!0}))),b},set:function(a,b,c){var d,e=this.cache(a);if("string"==typeof b)e[b]=c;else for(d in b)e[d]=b[d];return e},get:function(a,b){return void 0===b?this.cache(a):a[this.expando]&&a[this.expando][b]},access:function(a,b,c){var d;return void 0===b||b&&"string"==typeof b&&void 0===c?(d=this.get(a,b),void 0!==d?d:this.get(a,n.camelCase(b))):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d,e,f=a[this.expando];if(void 0!==f){if(void 0===b)this.register(a);else{n.isArray(b)?d=b.concat(b.map(n.camelCase)):(e=n.camelCase(b),b in f?d=[b,e]:(d=e,d=d in f?[d]:d.match(G)||[])),c=d.length;while(c--)delete f[d[c]]}(void 0===b||n.isEmptyObject(f))&&(a.nodeType?a[this.expando]=void 0:delete a[this.expando])}},hasData:function(a){var b=a[this.expando];return void 0!==b&&!n.isEmptyObject(b)}};var N=new M,O=new M,P=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Q=/[A-Z]/g;function R(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(Q,"-$&").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:P.test(c)?n.parseJSON(c):c;
}catch(e){}O.set(a,b,c)}else c=void 0;return c}n.extend({hasData:function(a){return O.hasData(a)||N.hasData(a)},data:function(a,b,c){return O.access(a,b,c)},removeData:function(a,b){O.remove(a,b)},_data:function(a,b,c){return N.access(a,b,c)},_removeData:function(a,b){N.remove(a,b)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=O.get(f),1===f.nodeType&&!N.get(f,"hasDataAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),R(f,d,e[d])));N.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){O.set(this,a)}):K(this,function(b){var c,d;if(f&&void 0===b){if(c=O.get(f,a)||O.get(f,a.replace(Q,"-$&").toLowerCase()),void 0!==c)return c;if(d=n.camelCase(a),c=O.get(f,d),void 0!==c)return c;if(c=R(f,d,void 0),void 0!==c)return c}else d=n.camelCase(a),this.each(function(){var c=O.get(this,d);O.set(this,d,b),a.indexOf("-")>-1&&void 0!==c&&O.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){O.remove(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=N.get(a,b),c&&(!d||n.isArray(c)?d=N.access(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return N.get(a,c)||N.access(a,c,{empty:n.Callbacks("once memory").add(function(){N.remove(a,[b+"queue",c])})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?n.queue(this[0],a):void 0===b?this:this.each(function(){var c=n.queue(this,a,b);n._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&n.dequeue(this,a)})},dequeue:function(a){return this.each(function(){n.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=n.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=N.get(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var S=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,T=new RegExp("^(?:([+-])=|)("+S+")([a-z%]*)$","i"),U=["Top","Right","Bottom","Left"],V=function(a,b){return a=b||a,"none"===n.css(a,"display")||!n.contains(a.ownerDocument,a)};function W(a,b,c,d){var e,f=1,g=20,h=d?function(){return d.cur()}:function(){return n.css(a,b,"")},i=h(),j=c&&c[3]||(n.cssNumber[b]?"":"px"),k=(n.cssNumber[b]||"px"!==j&&+i)&&T.exec(n.css(a,b));if(k&&k[3]!==j){j=j||k[3],c=c||[],k=+i||1;do f=f||".5",k/=f,n.style(a,b,k+j);while(f!==(f=h()/i)&&1!==f&&--g)}return c&&(k=+k||+i||0,e=c[1]?k+(c[1]+1)*c[2]:+c[2],d&&(d.unit=j,d.start=k,d.end=e)),e}var X=/^(?:checkbox|radio)$/i,Y=/<([\w:-]+)/,Z=/^$|\/(?:java|ecma)script/i,$={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};$.optgroup=$.option,$.tbody=$.tfoot=$.colgroup=$.caption=$.thead,$.th=$.td;function _(a,b){var c="undefined"!=typeof a.getElementsByTagName?a.getElementsByTagName(b||"*"):"undefined"!=typeof a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&n.nodeName(a,b)?n.merge([a],c):c}function aa(a,b){for(var c=0,d=a.length;d>c;c++)N.set(a[c],"globalEval",!b||N.get(b[c],"globalEval"))}var ba=/<|&#?\w+;/;function ca(a,b,c,d,e){for(var f,g,h,i,j,k,l=b.createDocumentFragment(),m=[],o=0,p=a.length;p>o;o++)if(f=a[o],f||0===f)if("object"===n.type(f))n.merge(m,f.nodeType?[f]:f);else if(ba.test(f)){g=g||l.appendChild(b.createElement("div")),h=(Y.exec(f)||["",""])[1].toLowerCase(),i=$[h]||$._default,g.innerHTML=i[1]+n.htmlPrefilter(f)+i[2],k=i[0];while(k--)g=g.lastChild;n.merge(m,g.childNodes),g=l.firstChild,g.textContent=""}else m.push(b.createTextNode(f));l.textContent="",o=0;while(f=m[o++])if(d&&n.inArray(f,d)>-1)e&&e.push(f);else if(j=n.contains(f.ownerDocument,f),g=_(l.appendChild(f),"script"),j&&aa(g),c){k=0;while(f=g[k++])Z.test(f.type||"")&&c.push(f)}return l}!function(){var a=d.createDocumentFragment(),b=a.appendChild(d.createElement("div")),c=d.createElement("input");c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),b.appendChild(c),l.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,b.innerHTML="<textarea>x</textarea>",l.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var da=/^key/,ea=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,fa=/^([^.]*)(?:\.(.+)|)/;function ga(){return!0}function ha(){return!1}function ia(){try{return d.activeElement}catch(a){}}function ja(a,b,c,d,e,f){var g,h;if("object"==typeof b){"string"!=typeof c&&(d=d||c,c=void 0);for(h in b)ja(a,h,c,d,b[h],f);return a}if(null==d&&null==e?(e=c,d=c=void 0):null==e&&("string"==typeof c?(e=d,d=void 0):(e=d,d=c,c=void 0)),e===!1)e=ha;else if(!e)return a;return 1===f&&(g=e,e=function(a){return n().off(a),g.apply(this,arguments)},e.guid=g.guid||(g.guid=n.guid++)),a.each(function(){n.event.add(this,b,e,d,c)})}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=N.get(a);if(r){c.handler&&(f=c,c=f.handler,e=f.selector),c.guid||(c.guid=n.guid++),(i=r.events)||(i=r.events={}),(g=r.handle)||(g=r.handle=function(b){return"undefined"!=typeof n&&n.event.triggered!==b.type?n.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(G)||[""],j=b.length;while(j--)h=fa.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o&&(l=n.event.special[o]||{},o=(e?l.delegateType:l.bindType)||o,l=n.event.special[o]||{},k=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},f),(m=i[o])||(m=i[o]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,p,g)!==!1||a.addEventListener&&a.addEventListener(o,g)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),n.event.global[o]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=N.hasData(a)&&N.get(a);if(r&&(i=r.events)){b=(b||"").match(G)||[""],j=b.length;while(j--)if(h=fa.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=i[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&q!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete i[o])}else for(o in i)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(i)&&N.remove(a,"handle events")}},dispatch:function(a){a=n.event.fix(a);var b,c,d,f,g,h=[],i=e.call(arguments),j=(N.get(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,c=0;while((g=f.handlers[c++])&&!a.isImmediatePropagationStopped())a.rnamespace&&!a.rnamespace.test(g.namespace)||(a.handleObj=g,a.data=g.data,d=((n.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==d&&(a.result=d)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&("click"!==a.type||isNaN(a.button)||a.button<1))for(;i!==this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(d=[],c=0;h>c;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?n(e,this).index(i)>-1:n.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},props:"altKey bubbles cancelable ctrlKey currentTarget detail eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,e,f,g=b.button;return null==a.pageX&&null!=b.clientX&&(c=a.target.ownerDocument||d,e=c.documentElement,f=c.body,a.pageX=b.clientX+(e&&e.scrollLeft||f&&f.scrollLeft||0)-(e&&e.clientLeft||f&&f.clientLeft||0),a.pageY=b.clientY+(e&&e.scrollTop||f&&f.scrollTop||0)-(e&&e.clientTop||f&&f.clientTop||0)),a.which||void 0===g||(a.which=1&g?1:2&g?3:4&g?2:0),a}},fix:function(a){if(a[n.expando])return a;var b,c,e,f=a.type,g=a,h=this.fixHooks[f];h||(this.fixHooks[f]=h=ea.test(f)?this.mouseHooks:da.test(f)?this.keyHooks:{}),e=h.props?this.props.concat(h.props):this.props,a=new n.Event(g),b=e.length;while(b--)c=e[b],a[c]=g[c];return a.target||(a.target=d),3===a.target.nodeType&&(a.target=a.target.parentNode),h.filter?h.filter(a,g):a},special:{load:{noBubble:!0},focus:{trigger:function(){return this!==ia()&&this.focus?(this.focus(),!1):void 0},delegateType:"focusin"},blur:{trigger:function(){return this===ia()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return"checkbox"===this.type&&this.click&&n.nodeName(this,"input")?(this.click(),!1):void 0},_default:function(a){return n.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}}},n.removeEvent=function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c)},n.Event=function(a,b){return this instanceof n.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?ga:ha):this.type=a,b&&n.extend(this,b),this.timeStamp=a&&a.timeStamp||n.now(),void(this[n.expando]=!0)):new n.Event(a,b)},n.Event.prototype={constructor:n.Event,isDefaultPrevented:ha,isPropagationStopped:ha,isImmediatePropagationStopped:ha,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=ga,a&&a.preventDefault()},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=ga,a&&a.stopPropagation()},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=ga,a&&a.stopImmediatePropagation(),this.stopPropagation()}},n.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){n.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return e&&(e===d||n.contains(d,e))||(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),n.fn.extend({on:function(a,b,c,d){return ja(this,a,b,c,d)},one:function(a,b,c,d){return ja(this,a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,n(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return b!==!1&&"function"!=typeof b||(c=b,b=void 0),c===!1&&(c=ha),this.each(function(){n.event.remove(this,a,c,b)})}});var ka=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,la=/<script|<style|<link/i,ma=/checked\s*(?:[^=]|=\s*.checked.)/i,na=/^true\/(.*)/,oa=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function pa(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function qa(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function ra(a){var b=na.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function sa(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(N.hasData(a)&&(f=N.access(a),g=N.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;d>c;c++)n.event.add(b,e,j[e][c])}O.hasData(a)&&(h=O.access(a),i=n.extend({},h),O.set(b,i))}}function ta(a,b){var c=b.nodeName.toLowerCase();"input"===c&&X.test(a.type)?b.checked=a.checked:"input"!==c&&"textarea"!==c||(b.defaultValue=a.defaultValue)}function ua(a,b,c,d){b=f.apply([],b);var e,g,h,i,j,k,m=0,o=a.length,p=o-1,q=b[0],r=n.isFunction(q);if(r||o>1&&"string"==typeof q&&!l.checkClone&&ma.test(q))return a.each(function(e){var f=a.eq(e);r&&(b[0]=q.call(this,e,f.html())),ua(f,b,c,d)});if(o&&(e=ca(b,a[0].ownerDocument,!1,a,d),g=e.firstChild,1===e.childNodes.length&&(e=g),g||d)){for(h=n.map(_(e,"script"),qa),i=h.length;o>m;m++)j=e,m!==p&&(j=n.clone(j,!0,!0),i&&n.merge(h,_(j,"script"))),c.call(a[m],j,m);if(i)for(k=h[h.length-1].ownerDocument,n.map(h,ra),m=0;i>m;m++)j=h[m],Z.test(j.type||"")&&!N.access(j,"globalEval")&&n.contains(k,j)&&(j.src?n._evalUrl&&n._evalUrl(j.src):n.globalEval(j.textContent.replace(oa,"")))}return a}function va(a,b,c){for(var d,e=b?n.filter(b,a):a,f=0;null!=(d=e[f]);f++)c||1!==d.nodeType||n.cleanData(_(d)),d.parentNode&&(c&&n.contains(d.ownerDocument,d)&&aa(_(d,"script")),d.parentNode.removeChild(d));return a}n.extend({htmlPrefilter:function(a){return a.replace(ka,"<$1></$2>")},clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=n.contains(a.ownerDocument,a);if(!(l.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(g=_(h),f=_(a),d=0,e=f.length;e>d;d++)ta(f[d],g[d]);if(b)if(c)for(f=f||_(a),g=g||_(h),d=0,e=f.length;e>d;d++)sa(f[d],g[d]);else sa(a,h);return g=_(h,"script"),g.length>0&&aa(g,!i&&_(a,"script")),h},cleanData:function(a){for(var b,c,d,e=n.event.special,f=0;void 0!==(c=a[f]);f++)if(L(c)){if(b=c[N.expando]){if(b.events)for(d in b.events)e[d]?n.event.remove(c,d):n.removeEvent(c,d,b.handle);c[N.expando]=void 0}c[O.expando]&&(c[O.expando]=void 0)}}}),n.fn.extend({domManip:ua,detach:function(a){return va(this,a,!0)},remove:function(a){return va(this,a)},text:function(a){return K(this,function(a){return void 0===a?n.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=a)})},null,a,arguments.length)},append:function(){return ua(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=pa(this,a);b.appendChild(a)}})},prepend:function(){return ua(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=pa(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return ua(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return ua(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(n.cleanData(_(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return K(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!la.test(a)&&!$[(Y.exec(a)||["",""])[1].toLowerCase()]){a=n.htmlPrefilter(a);try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(_(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=[];return ua(this,arguments,function(b){var c=this.parentNode;n.inArray(this,a)<0&&(n.cleanData(_(this)),c&&c.replaceChild(b,this))},a)}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=[],e=n(a),f=e.length-1,h=0;f>=h;h++)c=h===f?this:this.clone(!0),n(e[h])[b](c),g.apply(d,c.get());return this.pushStack(d)}});var wa,xa={HTML:"block",BODY:"block"};function ya(a,b){var c=n(b.createElement(a)).appendTo(b.body),d=n.css(c[0],"display");return c.detach(),d}function za(a){var b=d,c=xa[a];return c||(c=ya(a,b),"none"!==c&&c||(wa=(wa||n("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=wa[0].contentDocument,b.write(),b.close(),c=ya(a,b),wa.detach()),xa[a]=c),c}var Aa=/^margin/,Ba=new RegExp("^("+S+")(?!px)[a-z%]+$","i"),Ca=function(b){var c=b.ownerDocument.defaultView;return c&&c.opener||(c=a),c.getComputedStyle(b)},Da=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e},Ea=d.documentElement;!function(){var b,c,e,f,g=d.createElement("div"),h=d.createElement("div");if(h.style){h.style.backgroundClip="content-box",h.cloneNode(!0).style.backgroundClip="",l.clearCloneStyle="content-box"===h.style.backgroundClip,g.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",g.appendChild(h);function i(){h.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",h.innerHTML="",Ea.appendChild(g);var d=a.getComputedStyle(h);b="1%"!==d.top,f="2px"===d.marginLeft,c="4px"===d.width,h.style.marginRight="50%",e="4px"===d.marginRight,Ea.removeChild(g)}n.extend(l,{pixelPosition:function(){return i(),b},boxSizingReliable:function(){return null==c&&i(),c},pixelMarginRight:function(){return null==c&&i(),e},reliableMarginLeft:function(){return null==c&&i(),f},reliableMarginRight:function(){var b,c=h.appendChild(d.createElement("div"));return c.style.cssText=h.style.cssText="-webkit-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",c.style.marginRight=c.style.width="0",h.style.width="1px",Ea.appendChild(g),b=!parseFloat(a.getComputedStyle(c).marginRight),Ea.removeChild(g),h.removeChild(c),b}})}}();function Fa(a,b,c){var d,e,f,g,h=a.style;return c=c||Ca(a),g=c?c.getPropertyValue(b)||c[b]:void 0,""!==g&&void 0!==g||n.contains(a.ownerDocument,a)||(g=n.style(a,b)),c&&!l.pixelMarginRight()&&Ba.test(g)&&Aa.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f),void 0!==g?g+"":g}function Ga(a,b){return{get:function(){return a()?void delete this.get:(this.get=b).apply(this,arguments)}}}var Ha=/^(none|table(?!-c[ea]).+)/,Ia={position:"absolute",visibility:"hidden",display:"block"},Ja={letterSpacing:"0",fontWeight:"400"},Ka=["Webkit","O","Moz","ms"],La=d.createElement("div").style;function Ma(a){if(a in La)return a;var b=a[0].toUpperCase()+a.slice(1),c=Ka.length;while(c--)if(a=Ka[c]+b,a in La)return a}function Na(a,b,c){var d=T.exec(b);return d?Math.max(0,d[2]-(c||0))+(d[3]||"px"):b}function Oa(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=n.css(a,c+U[f],!0,e)),d?("content"===c&&(g-=n.css(a,"padding"+U[f],!0,e)),"margin"!==c&&(g-=n.css(a,"border"+U[f]+"Width",!0,e))):(g+=n.css(a,"padding"+U[f],!0,e),"padding"!==c&&(g+=n.css(a,"border"+U[f]+"Width",!0,e)));return g}function Pa(b,c,e){var f=!0,g="width"===c?b.offsetWidth:b.offsetHeight,h=Ca(b),i="border-box"===n.css(b,"boxSizing",!1,h);if(d.msFullscreenElement&&a.top!==a&&b.getClientRects().length&&(g=Math.round(100*b.getBoundingClientRect()[c])),0>=g||null==g){if(g=Fa(b,c,h),(0>g||null==g)&&(g=b.style[c]),Ba.test(g))return g;f=i&&(l.boxSizingReliable()||g===b.style[c]),g=parseFloat(g)||0}return g+Oa(b,c,e||(i?"border":"content"),f,h)+"px"}function Qa(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=N.get(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&V(d)&&(f[g]=N.access(d,"olddisplay",za(d.nodeName)))):(e=V(d),"none"===c&&e||N.set(d,"olddisplay",e?c:n.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}n.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=Fa(a,"opacity");return""===c?"1":c}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=n.camelCase(b),i=a.style;return b=n.cssProps[h]||(n.cssProps[h]=Ma(h)||h),g=n.cssHooks[b]||n.cssHooks[h],void 0===c?g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b]:(f=typeof c,"string"===f&&(e=T.exec(c))&&e[1]&&(c=W(a,b,e),f="number"),null!=c&&c===c&&("number"===f&&(c+=e&&e[3]||(n.cssNumber[h]?"":"px")),l.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),g&&"set"in g&&void 0===(c=g.set(a,c,d))||(i[b]=c)),void 0)}},css:function(a,b,c,d){var e,f,g,h=n.camelCase(b);return b=n.cssProps[h]||(n.cssProps[h]=Ma(h)||h),g=n.cssHooks[b]||n.cssHooks[h],g&&"get"in g&&(e=g.get(a,!0,c)),void 0===e&&(e=Fa(a,b,d)),"normal"===e&&b in Ja&&(e=Ja[b]),""===c||c?(f=parseFloat(e),c===!0||isFinite(f)?f||0:e):e}}),n.each(["height","width"],function(a,b){n.cssHooks[b]={get:function(a,c,d){return c?Ha.test(n.css(a,"display"))&&0===a.offsetWidth?Da(a,Ia,function(){return Pa(a,b,d)}):Pa(a,b,d):void 0},set:function(a,c,d){var e,f=d&&Ca(a),g=d&&Oa(a,b,d,"border-box"===n.css(a,"boxSizing",!1,f),f);return g&&(e=T.exec(c))&&"px"!==(e[3]||"px")&&(a.style[b]=c,c=n.css(a,b)),Na(a,c,g)}}}),n.cssHooks.marginLeft=Ga(l.reliableMarginLeft,function(a,b){return b?(parseFloat(Fa(a,"marginLeft"))||a.getBoundingClientRect().left-Da(a,{marginLeft:0},function(){return a.getBoundingClientRect().left}))+"px":void 0}),n.cssHooks.marginRight=Ga(l.reliableMarginRight,function(a,b){return b?Da(a,{display:"inline-block"},Fa,[a,"marginRight"]):void 0}),n.each({margin:"",padding:"",border:"Width"},function(a,b){n.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+U[d]+b]=f[d]||f[d-2]||f[0];return e}},Aa.test(a)||(n.cssHooks[a+b].set=Na)}),n.fn.extend({css:function(a,b){return K(this,function(a,b,c){var d,e,f={},g=0;if(n.isArray(b)){for(d=Ca(a),e=b.length;e>g;g++)f[b[g]]=n.css(a,b[g],!1,d);return f}return void 0!==c?n.style(a,b,c):n.css(a,b)},a,b,arguments.length>1)},show:function(){return Qa(this,!0)},hide:function(){return Qa(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){V(this)?n(this).show():n(this).hide()})}});function Ra(a,b,c,d,e){return new Ra.prototype.init(a,b,c,d,e)}n.Tween=Ra,Ra.prototype={constructor:Ra,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||n.easing._default,this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(n.cssNumber[c]?"":"px")},cur:function(){var a=Ra.propHooks[this.prop];return a&&a.get?a.get(this):Ra.propHooks._default.get(this)},run:function(a){var b,c=Ra.propHooks[this.prop];return this.options.duration?this.pos=b=n.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):this.pos=b=a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):Ra.propHooks._default.set(this),this}},Ra.prototype.init.prototype=Ra.prototype,Ra.propHooks={_default:{get:function(a){var b;return 1!==a.elem.nodeType||null!=a.elem[a.prop]&&null==a.elem.style[a.prop]?a.elem[a.prop]:(b=n.css(a.elem,a.prop,""),b&&"auto"!==b?b:0)},set:function(a){n.fx.step[a.prop]?n.fx.step[a.prop](a):1!==a.elem.nodeType||null==a.elem.style[n.cssProps[a.prop]]&&!n.cssHooks[a.prop]?a.elem[a.prop]=a.now:n.style(a.elem,a.prop,a.now+a.unit)}}},Ra.propHooks.scrollTop=Ra.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},n.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2},_default:"swing"},n.fx=Ra.prototype.init,n.fx.step={};var Sa,Ta,Ua=/^(?:toggle|show|hide)$/,Va=/queueHooks$/;function Wa(){return a.setTimeout(function(){Sa=void 0}),Sa=n.now()}function Xa(a,b){var c,d=0,e={height:a};for(b=b?1:0;4>d;d+=2-b)c=U[d],e["margin"+c]=e["padding"+c]=a;return b&&(e.opacity=e.width=a),e}function Ya(a,b,c){for(var d,e=(_a.tweeners[b]||[]).concat(_a.tweeners["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function Za(a,b,c){var d,e,f,g,h,i,j,k,l=this,m={},o=a.style,p=a.nodeType&&V(a),q=N.get(a,"fxshow");c.queue||(h=n._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,l.always(function(){l.always(function(){h.unqueued--,n.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[o.overflow,o.overflowX,o.overflowY],j=n.css(a,"display"),k="none"===j?N.get(a,"olddisplay")||za(a.nodeName):j,"inline"===k&&"none"===n.css(a,"float")&&(o.display="inline-block")),c.overflow&&(o.overflow="hidden",l.always(function(){o.overflow=c.overflow[0],o.overflowX=c.overflow[1],o.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],Ua.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(p?"hide":"show")){if("show"!==e||!q||void 0===q[d])continue;p=!0}m[d]=q&&q[d]||n.style(a,d)}else j=void 0;if(n.isEmptyObject(m))"inline"===("none"===j?za(a.nodeName):j)&&(o.display=j);else{q?"hidden"in q&&(p=q.hidden):q=N.access(a,"fxshow",{}),f&&(q.hidden=!p),p?n(a).show():l.done(function(){n(a).hide()}),l.done(function(){var b;N.remove(a,"fxshow");for(b in m)n.style(a,b,m[b])});for(d in m)g=Ya(p?q[d]:0,d,l),d in q||(q[d]=g.start,p&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function $a(a,b){var c,d,e,f,g;for(c in a)if(d=n.camelCase(c),e=b[d],f=a[c],n.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=n.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function _a(a,b,c){var d,e,f=0,g=_a.prefilters.length,h=n.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=Sa||Wa(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:n.extend({},b),opts:n.extend(!0,{specialEasing:{},easing:n.easing._default},c),originalProperties:b,originalOptions:c,startTime:Sa||Wa(),duration:c.duration,tweens:[],createTween:function(b,c){var d=n.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?(h.notifyWith(a,[j,1,0]),h.resolveWith(a,[j,b])):h.rejectWith(a,[j,b]),this}}),k=j.props;for($a(k,j.opts.specialEasing);g>f;f++)if(d=_a.prefilters[f].call(j,a,k,j.opts))return n.isFunction(d.stop)&&(n._queueHooks(j.elem,j.opts.queue).stop=n.proxy(d.stop,d)),d;return n.map(k,Ya,j),n.isFunction(j.opts.start)&&j.opts.start.call(a,j),n.fx.timer(n.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}n.Animation=n.extend(_a,{tweeners:{"*":[function(a,b){var c=this.createTween(a,b);return W(c.elem,a,T.exec(b),c),c}]},tweener:function(a,b){n.isFunction(a)?(b=a,a=["*"]):a=a.match(G);for(var c,d=0,e=a.length;e>d;d++)c=a[d],_a.tweeners[c]=_a.tweeners[c]||[],_a.tweeners[c].unshift(b)},prefilters:[Za],prefilter:function(a,b){b?_a.prefilters.unshift(a):_a.prefilters.push(a)}}),n.speed=function(a,b,c){var d=a&&"object"==typeof a?n.extend({},a):{complete:c||!c&&b||n.isFunction(a)&&a,duration:a,easing:c&&b||b&&!n.isFunction(b)&&b};return d.duration=n.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in n.fx.speeds?n.fx.speeds[d.duration]:n.fx.speeds._default,null!=d.queue&&d.queue!==!0||(d.queue="fx"),d.old=d.complete,d.complete=function(){n.isFunction(d.old)&&d.old.call(this),d.queue&&n.dequeue(this,d.queue)},d},n.fn.extend({fadeTo:function(a,b,c,d){return this.filter(V).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=n.isEmptyObject(a),f=n.speed(b,c,d),g=function(){var b=_a(this,n.extend({},a),f);(e||N.get(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=n.timers,g=N.get(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&Va.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));!b&&c||n.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=N.get(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=n.timers,g=d?d.length:0;for(c.finish=!0,n.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),n.each(["toggle","show","hide"],function(a,b){var c=n.fn[b];n.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(Xa(b,!0),a,d,e)}}),n.each({slideDown:Xa("show"),slideUp:Xa("hide"),slideToggle:Xa("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){n.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),n.timers=[],n.fx.tick=function(){var a,b=0,c=n.timers;for(Sa=n.now();b<c.length;b++)a=c[b],a()||c[b]!==a||c.splice(b--,1);c.length||n.fx.stop(),Sa=void 0},n.fx.timer=function(a){n.timers.push(a),a()?n.fx.start():n.timers.pop()},n.fx.interval=13,n.fx.start=function(){Ta||(Ta=a.setInterval(n.fx.tick,n.fx.interval))},n.fx.stop=function(){a.clearInterval(Ta),Ta=null},n.fx.speeds={slow:600,fast:200,_default:400},n.fn.delay=function(b,c){return b=n.fx?n.fx.speeds[b]||b:b,c=c||"fx",this.queue(c,function(c,d){var e=a.setTimeout(c,b);d.stop=function(){a.clearTimeout(e)}})},function(){var a=d.createElement("input"),b=d.createElement("select"),c=b.appendChild(d.createElement("option"));a.type="checkbox",l.checkOn=""!==a.value,l.optSelected=c.selected,b.disabled=!0,l.optDisabled=!c.disabled,a=d.createElement("input"),a.value="t",a.type="radio",l.radioValue="t"===a.value}();var ab,bb=n.expr.attrHandle;n.fn.extend({attr:function(a,b){return K(this,n.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){n.removeAttr(this,a)})}}),n.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(3!==f&&8!==f&&2!==f)return"undefined"==typeof a.getAttribute?n.prop(a,b,c):(1===f&&n.isXMLDoc(a)||(b=b.toLowerCase(),e=n.attrHooks[b]||(n.expr.match.bool.test(b)?ab:void 0)),void 0!==c?null===c?void n.removeAttr(a,b):e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:(a.setAttribute(b,c+""),c):e&&"get"in e&&null!==(d=e.get(a,b))?d:(d=n.find.attr(a,b),null==d?void 0:d))},attrHooks:{type:{set:function(a,b){if(!l.radioValue&&"radio"===b&&n.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(G);if(f&&1===a.nodeType)while(c=f[e++])d=n.propFix[c]||c,n.expr.match.bool.test(c)&&(a[d]=!1),a.removeAttribute(c)}}),ab={set:function(a,b,c){return b===!1?n.removeAttr(a,c):a.setAttribute(c,c),c}},n.each(n.expr.match.bool.source.match(/\w+/g),function(a,b){var c=bb[b]||n.find.attr;bb[b]=function(a,b,d){var e,f;return d||(f=bb[b],bb[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,bb[b]=f),e}});var cb=/^(?:input|select|textarea|button)$/i,db=/^(?:a|area)$/i;n.fn.extend({prop:function(a,b){return K(this,n.prop,a,b,arguments.length>1)},removeProp:function(a){return this.each(function(){delete this[n.propFix[a]||a]})}}),n.extend({prop:function(a,b,c){var d,e,f=a.nodeType;if(3!==f&&8!==f&&2!==f)return 1===f&&n.isXMLDoc(a)||(b=n.propFix[b]||b,
e=n.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=n.find.attr(a,"tabindex");return b?parseInt(b,10):cb.test(a.nodeName)||db.test(a.nodeName)&&a.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),l.optSelected||(n.propHooks.selected={get:function(a){var b=a.parentNode;return b&&b.parentNode&&b.parentNode.selectedIndex,null},set:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex)}}),n.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){n.propFix[this.toLowerCase()]=this});var eb=/[\t\r\n\f]/g;function fb(a){return a.getAttribute&&a.getAttribute("class")||""}n.fn.extend({addClass:function(a){var b,c,d,e,f,g,h,i=0;if(n.isFunction(a))return this.each(function(b){n(this).addClass(a.call(this,b,fb(this)))});if("string"==typeof a&&a){b=a.match(G)||[];while(c=this[i++])if(e=fb(c),d=1===c.nodeType&&(" "+e+" ").replace(eb," ")){g=0;while(f=b[g++])d.indexOf(" "+f+" ")<0&&(d+=f+" ");h=n.trim(d),e!==h&&c.setAttribute("class",h)}}return this},removeClass:function(a){var b,c,d,e,f,g,h,i=0;if(n.isFunction(a))return this.each(function(b){n(this).removeClass(a.call(this,b,fb(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof a&&a){b=a.match(G)||[];while(c=this[i++])if(e=fb(c),d=1===c.nodeType&&(" "+e+" ").replace(eb," ")){g=0;while(f=b[g++])while(d.indexOf(" "+f+" ")>-1)d=d.replace(" "+f+" "," ");h=n.trim(d),e!==h&&c.setAttribute("class",h)}}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):n.isFunction(a)?this.each(function(c){n(this).toggleClass(a.call(this,c,fb(this),b),b)}):this.each(function(){var b,d,e,f;if("string"===c){d=0,e=n(this),f=a.match(G)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else void 0!==a&&"boolean"!==c||(b=fb(this),b&&N.set(this,"__className__",b),this.setAttribute&&this.setAttribute("class",b||a===!1?"":N.get(this,"__className__")||""))})},hasClass:function(a){var b,c,d=0;b=" "+a+" ";while(c=this[d++])if(1===c.nodeType&&(" "+fb(c)+" ").replace(eb," ").indexOf(b)>-1)return!0;return!1}});var gb=/\r/g,hb=/[\x20\t\r\n\f]+/g;n.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=n.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,n(this).val()):a,null==e?e="":"number"==typeof e?e+="":n.isArray(e)&&(e=n.map(e,function(a){return null==a?"":a+""})),b=n.valHooks[this.type]||n.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=n.valHooks[e.type]||n.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(gb,""):null==c?"":c)}}}),n.extend({valHooks:{option:{get:function(a){var b=n.find.attr(a,"value");return null!=b?b:n.trim(n.text(a)).replace(hb," ")}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],(c.selected||i===e)&&(l.optDisabled?!c.disabled:null===c.getAttribute("disabled"))&&(!c.parentNode.disabled||!n.nodeName(c.parentNode,"optgroup"))){if(b=n(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=n.makeArray(b),g=e.length;while(g--)d=e[g],(d.selected=n.inArray(n.valHooks.option.get(d),f)>-1)&&(c=!0);return c||(a.selectedIndex=-1),f}}}}),n.each(["radio","checkbox"],function(){n.valHooks[this]={set:function(a,b){return n.isArray(b)?a.checked=n.inArray(n(a).val(),b)>-1:void 0}},l.checkOn||(n.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var ib=/^(?:focusinfocus|focusoutblur)$/;n.extend(n.event,{trigger:function(b,c,e,f){var g,h,i,j,l,m,o,p=[e||d],q=k.call(b,"type")?b.type:b,r=k.call(b,"namespace")?b.namespace.split("."):[];if(h=i=e=e||d,3!==e.nodeType&&8!==e.nodeType&&!ib.test(q+n.event.triggered)&&(q.indexOf(".")>-1&&(r=q.split("."),q=r.shift(),r.sort()),l=q.indexOf(":")<0&&"on"+q,b=b[n.expando]?b:new n.Event(q,"object"==typeof b&&b),b.isTrigger=f?2:3,b.namespace=r.join("."),b.rnamespace=b.namespace?new RegExp("(^|\\.)"+r.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=e),c=null==c?[b]:n.makeArray(c,[b]),o=n.event.special[q]||{},f||!o.trigger||o.trigger.apply(e,c)!==!1)){if(!f&&!o.noBubble&&!n.isWindow(e)){for(j=o.delegateType||q,ib.test(j+q)||(h=h.parentNode);h;h=h.parentNode)p.push(h),i=h;i===(e.ownerDocument||d)&&p.push(i.defaultView||i.parentWindow||a)}g=0;while((h=p[g++])&&!b.isPropagationStopped())b.type=g>1?j:o.bindType||q,m=(N.get(h,"events")||{})[b.type]&&N.get(h,"handle"),m&&m.apply(h,c),m=l&&h[l],m&&m.apply&&L(h)&&(b.result=m.apply(h,c),b.result===!1&&b.preventDefault());return b.type=q,f||b.isDefaultPrevented()||o._default&&o._default.apply(p.pop(),c)!==!1||!L(e)||l&&n.isFunction(e[q])&&!n.isWindow(e)&&(i=e[l],i&&(e[l]=null),n.event.triggered=q,e[q](),n.event.triggered=void 0,i&&(e[l]=i)),b.result}},simulate:function(a,b,c){var d=n.extend(new n.Event,c,{type:a,isSimulated:!0});n.event.trigger(d,null,b),d.isDefaultPrevented()&&c.preventDefault()}}),n.fn.extend({trigger:function(a,b){return this.each(function(){n.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?n.event.trigger(a,b,c,!0):void 0}}),n.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){n.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),n.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}}),l.focusin="onfocusin"in a,l.focusin||n.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){n.event.simulate(b,a.target,n.event.fix(a))};n.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=N.access(d,b);e||d.addEventListener(a,c,!0),N.access(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=N.access(d,b)-1;e?N.access(d,b,e):(d.removeEventListener(a,c,!0),N.remove(d,b))}}});var jb=a.location,kb=n.now(),lb=/\?/;n.parseJSON=function(a){return JSON.parse(a+"")},n.parseXML=function(b){var c;if(!b||"string"!=typeof b)return null;try{c=(new a.DOMParser).parseFromString(b,"text/xml")}catch(d){c=void 0}return c&&!c.getElementsByTagName("parsererror").length||n.error("Invalid XML: "+b),c};var mb=/#.*$/,nb=/([?&])_=[^&]*/,ob=/^(.*?):[ \t]*([^\r\n]*)$/gm,pb=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,qb=/^(?:GET|HEAD)$/,rb=/^\/\//,sb={},tb={},ub="*/".concat("*"),vb=d.createElement("a");vb.href=jb.href;function wb(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(G)||[];if(n.isFunction(c))while(d=f[e++])"+"===d[0]?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function xb(a,b,c,d){var e={},f=a===tb;function g(h){var i;return e[h]=!0,n.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function yb(a,b){var c,d,e=n.ajaxSettings.flatOptions||{};for(c in b)void 0!==b[c]&&((e[c]?a:d||(d={}))[c]=b[c]);return d&&n.extend(!0,a,d),a}function zb(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===d&&(d=a.mimeType||b.getResponseHeader("Content-Type"));if(d)for(e in h)if(h[e]&&h[e].test(d)){i.unshift(e);break}if(i[0]in c)f=i[0];else{for(e in c){if(!i[0]||a.converters[e+" "+i[0]]){f=e;break}g||(g=e)}f=f||g}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function Ab(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}n.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:jb.href,type:"GET",isLocal:pb.test(jb.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":ub,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":n.parseJSON,"text xml":n.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?yb(yb(a,n.ajaxSettings),b):yb(n.ajaxSettings,a)},ajaxPrefilter:wb(sb),ajaxTransport:wb(tb),ajax:function(b,c){"object"==typeof b&&(c=b,b=void 0),c=c||{};var e,f,g,h,i,j,k,l,m=n.ajaxSetup({},c),o=m.context||m,p=m.context&&(o.nodeType||o.jquery)?n(o):n.event,q=n.Deferred(),r=n.Callbacks("once memory"),s=m.statusCode||{},t={},u={},v=0,w="canceled",x={readyState:0,getResponseHeader:function(a){var b;if(2===v){if(!h){h={};while(b=ob.exec(g))h[b[1].toLowerCase()]=b[2]}b=h[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===v?g:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return v||(a=u[c]=u[c]||a,t[a]=b),this},overrideMimeType:function(a){return v||(m.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>v)for(b in a)s[b]=[s[b],a[b]];else x.always(a[x.status]);return this},abort:function(a){var b=a||w;return e&&e.abort(b),z(0,b),this}};if(q.promise(x).complete=r.add,x.success=x.done,x.error=x.fail,m.url=((b||m.url||jb.href)+"").replace(mb,"").replace(rb,jb.protocol+"//"),m.type=c.method||c.type||m.method||m.type,m.dataTypes=n.trim(m.dataType||"*").toLowerCase().match(G)||[""],null==m.crossDomain){j=d.createElement("a");try{j.href=m.url,j.href=j.href,m.crossDomain=vb.protocol+"//"+vb.host!=j.protocol+"//"+j.host}catch(y){m.crossDomain=!0}}if(m.data&&m.processData&&"string"!=typeof m.data&&(m.data=n.param(m.data,m.traditional)),xb(sb,m,c,x),2===v)return x;k=n.event&&m.global,k&&0===n.active++&&n.event.trigger("ajaxStart"),m.type=m.type.toUpperCase(),m.hasContent=!qb.test(m.type),f=m.url,m.hasContent||(m.data&&(f=m.url+=(lb.test(f)?"&":"?")+m.data,delete m.data),m.cache===!1&&(m.url=nb.test(f)?f.replace(nb,"$1_="+kb++):f+(lb.test(f)?"&":"?")+"_="+kb++)),m.ifModified&&(n.lastModified[f]&&x.setRequestHeader("If-Modified-Since",n.lastModified[f]),n.etag[f]&&x.setRequestHeader("If-None-Match",n.etag[f])),(m.data&&m.hasContent&&m.contentType!==!1||c.contentType)&&x.setRequestHeader("Content-Type",m.contentType),x.setRequestHeader("Accept",m.dataTypes[0]&&m.accepts[m.dataTypes[0]]?m.accepts[m.dataTypes[0]]+("*"!==m.dataTypes[0]?", "+ub+"; q=0.01":""):m.accepts["*"]);for(l in m.headers)x.setRequestHeader(l,m.headers[l]);if(m.beforeSend&&(m.beforeSend.call(o,x,m)===!1||2===v))return x.abort();w="abort";for(l in{success:1,error:1,complete:1})x[l](m[l]);if(e=xb(tb,m,c,x)){if(x.readyState=1,k&&p.trigger("ajaxSend",[x,m]),2===v)return x;m.async&&m.timeout>0&&(i=a.setTimeout(function(){x.abort("timeout")},m.timeout));try{v=1,e.send(t,z)}catch(y){if(!(2>v))throw y;z(-1,y)}}else z(-1,"No Transport");function z(b,c,d,h){var j,l,t,u,w,y=c;2!==v&&(v=2,i&&a.clearTimeout(i),e=void 0,g=h||"",x.readyState=b>0?4:0,j=b>=200&&300>b||304===b,d&&(u=zb(m,x,d)),u=Ab(m,u,x,j),j?(m.ifModified&&(w=x.getResponseHeader("Last-Modified"),w&&(n.lastModified[f]=w),w=x.getResponseHeader("etag"),w&&(n.etag[f]=w)),204===b||"HEAD"===m.type?y="nocontent":304===b?y="notmodified":(y=u.state,l=u.data,t=u.error,j=!t)):(t=y,!b&&y||(y="error",0>b&&(b=0))),x.status=b,x.statusText=(c||y)+"",j?q.resolveWith(o,[l,y,x]):q.rejectWith(o,[x,y,t]),x.statusCode(s),s=void 0,k&&p.trigger(j?"ajaxSuccess":"ajaxError",[x,m,j?l:t]),r.fireWith(o,[x,y]),k&&(p.trigger("ajaxComplete",[x,m]),--n.active||n.event.trigger("ajaxStop")))}return x},getJSON:function(a,b,c){return n.get(a,b,c,"json")},getScript:function(a,b){return n.get(a,void 0,b,"script")}}),n.each(["get","post"],function(a,b){n[b]=function(a,c,d,e){return n.isFunction(c)&&(e=e||d,d=c,c=void 0),n.ajax(n.extend({url:a,type:b,dataType:e,data:c,success:d},n.isPlainObject(a)&&a))}}),n._evalUrl=function(a){return n.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},n.fn.extend({wrapAll:function(a){var b;return n.isFunction(a)?this.each(function(b){n(this).wrapAll(a.call(this,b))}):(this[0]&&(b=n(a,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstElementChild)a=a.firstElementChild;return a}).append(this)),this)},wrapInner:function(a){return n.isFunction(a)?this.each(function(b){n(this).wrapInner(a.call(this,b))}):this.each(function(){var b=n(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=n.isFunction(a);return this.each(function(c){n(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){n.nodeName(this,"body")||n(this).replaceWith(this.childNodes)}).end()}}),n.expr.filters.hidden=function(a){return!n.expr.filters.visible(a)},n.expr.filters.visible=function(a){return a.offsetWidth>0||a.offsetHeight>0||a.getClientRects().length>0};var Bb=/%20/g,Cb=/\[\]$/,Db=/\r?\n/g,Eb=/^(?:submit|button|image|reset|file)$/i,Fb=/^(?:input|select|textarea|keygen)/i;function Gb(a,b,c,d){var e;if(n.isArray(b))n.each(b,function(b,e){c||Cb.test(a)?d(a,e):Gb(a+"["+("object"==typeof e&&null!=e?b:"")+"]",e,c,d)});else if(c||"object"!==n.type(b))d(a,b);else for(e in b)Gb(a+"["+e+"]",b[e],c,d)}n.param=function(a,b){var c,d=[],e=function(a,b){b=n.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=n.ajaxSettings&&n.ajaxSettings.traditional),n.isArray(a)||a.jquery&&!n.isPlainObject(a))n.each(a,function(){e(this.name,this.value)});else for(c in a)Gb(c,a[c],b,e);return d.join("&").replace(Bb,"+")},n.fn.extend({serialize:function(){return n.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=n.prop(this,"elements");return a?n.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!n(this).is(":disabled")&&Fb.test(this.nodeName)&&!Eb.test(a)&&(this.checked||!X.test(a))}).map(function(a,b){var c=n(this).val();return null==c?null:n.isArray(c)?n.map(c,function(a){return{name:b.name,value:a.replace(Db,"\r\n")}}):{name:b.name,value:c.replace(Db,"\r\n")}}).get()}}),n.ajaxSettings.xhr=function(){try{return new a.XMLHttpRequest}catch(b){}};var Hb={0:200,1223:204},Ib=n.ajaxSettings.xhr();l.cors=!!Ib&&"withCredentials"in Ib,l.ajax=Ib=!!Ib,n.ajaxTransport(function(b){var c,d;return l.cors||Ib&&!b.crossDomain?{send:function(e,f){var g,h=b.xhr();if(h.open(b.type,b.url,b.async,b.username,b.password),b.xhrFields)for(g in b.xhrFields)h[g]=b.xhrFields[g];b.mimeType&&h.overrideMimeType&&h.overrideMimeType(b.mimeType),b.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest");for(g in e)h.setRequestHeader(g,e[g]);c=function(a){return function(){c&&(c=d=h.onload=h.onerror=h.onabort=h.onreadystatechange=null,"abort"===a?h.abort():"error"===a?"number"!=typeof h.status?f(0,"error"):f(h.status,h.statusText):f(Hb[h.status]||h.status,h.statusText,"text"!==(h.responseType||"text")||"string"!=typeof h.responseText?{binary:h.response}:{text:h.responseText},h.getAllResponseHeaders()))}},h.onload=c(),d=h.onerror=c("error"),void 0!==h.onabort?h.onabort=d:h.onreadystatechange=function(){4===h.readyState&&a.setTimeout(function(){c&&d()})},c=c("abort");try{h.send(b.hasContent&&b.data||null)}catch(i){if(c)throw i}},abort:function(){c&&c()}}:void 0}),n.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(a){return n.globalEval(a),a}}}),n.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET")}),n.ajaxTransport("script",function(a){if(a.crossDomain){var b,c;return{send:function(e,f){b=n("<script>").prop({charset:a.scriptCharset,src:a.url}).on("load error",c=function(a){b.remove(),c=null,a&&f("error"===a.type?404:200,a.type)}),d.head.appendChild(b[0])},abort:function(){c&&c()}}}});var Jb=[],Kb=/(=)\?(?=&|$)|\?\?/;n.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=Jb.pop()||n.expando+"_"+kb++;return this[a]=!0,a}}),n.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(Kb.test(b.url)?"url":"string"==typeof b.data&&0===(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&Kb.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=n.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(Kb,"$1"+e):b.jsonp!==!1&&(b.url+=(lb.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||n.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){void 0===f?n(a).removeProp(e):a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,Jb.push(e)),g&&n.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),n.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||d;var e=x.exec(a),f=!c&&[];return e?[b.createElement(e[1])]:(e=ca([a],b,f),f&&f.length&&n(f).remove(),n.merge([],e.childNodes))};var Lb=n.fn.load;n.fn.load=function(a,b,c){if("string"!=typeof a&&Lb)return Lb.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>-1&&(d=n.trim(a.slice(h)),a=a.slice(0,h)),n.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(e="POST"),g.length>0&&n.ajax({url:a,type:e||"GET",dataType:"html",data:b}).done(function(a){f=arguments,g.html(d?n("<div>").append(n.parseHTML(a)).find(d):a)}).always(c&&function(a,b){g.each(function(){c.apply(this,f||[a.responseText,b,a])})}),this},n.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){n.fn[b]=function(a){return this.on(b,a)}}),n.expr.filters.animated=function(a){return n.grep(n.timers,function(b){return a===b.elem}).length};function Mb(a){return n.isWindow(a)?a:9===a.nodeType&&a.defaultView}n.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=n.css(a,"position"),l=n(a),m={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=n.css(a,"top"),i=n.css(a,"left"),j=("absolute"===k||"fixed"===k)&&(f+i).indexOf("auto")>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),n.isFunction(b)&&(b=b.call(a,c,n.extend({},h))),null!=b.top&&(m.top=b.top-h.top+g),null!=b.left&&(m.left=b.left-h.left+e),"using"in b?b.using.call(a,m):l.css(m)}},n.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){n.offset.setOffset(this,a,b)});var b,c,d=this[0],e={top:0,left:0},f=d&&d.ownerDocument;if(f)return b=f.documentElement,n.contains(b,d)?(e=d.getBoundingClientRect(),c=Mb(f),{top:e.top+c.pageYOffset-b.clientTop,left:e.left+c.pageXOffset-b.clientLeft}):e},position:function(){if(this[0]){var a,b,c=this[0],d={top:0,left:0};return"fixed"===n.css(c,"position")?b=c.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),n.nodeName(a[0],"html")||(d=a.offset()),d.top+=n.css(a[0],"borderTopWidth",!0),d.left+=n.css(a[0],"borderLeftWidth",!0)),{top:b.top-d.top-n.css(c,"marginTop",!0),left:b.left-d.left-n.css(c,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent;while(a&&"static"===n.css(a,"position"))a=a.offsetParent;return a||Ea})}}),n.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var c="pageYOffset"===b;n.fn[a]=function(d){return K(this,function(a,d,e){var f=Mb(a);return void 0===e?f?f[b]:a[d]:void(f?f.scrollTo(c?f.pageXOffset:e,c?e:f.pageYOffset):a[d]=e)},a,d,arguments.length)}}),n.each(["top","left"],function(a,b){n.cssHooks[b]=Ga(l.pixelPosition,function(a,c){return c?(c=Fa(a,b),Ba.test(c)?n(a).position()[b]+"px":c):void 0})}),n.each({Height:"height",Width:"width"},function(a,b){n.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){n.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return K(this,function(b,c,d){var e;return n.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?n.css(b,c,g):n.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),n.fn.extend({bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)},size:function(){return this.length}}),n.fn.andSelf=n.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return n});var Nb=a.jQuery,Ob=a.$;return n.noConflict=function(b){return a.$===n&&(a.$=Ob),b&&a.jQuery===n&&(a.jQuery=Nb),n},b||(a.jQuery=a.$=n),n});
//
//../pacotes/jquery/jquery-number/jquery.number.min.js
!function(e){"use strict";function t(e,t){if(this.createTextRange){var a=this.createTextRange();a.collapse(!0),a.moveStart("character",e),a.moveEnd("character",t-e),a.select()}else this.setSelectionRange&&(this.focus(),this.setSelectionRange(e,t))}function a(e){var t=this.value.length;if(e="start"==e.toLowerCase()?"Start":"End",document.selection){var a,i,n,l=document.selection.createRange();return a=l.duplicate(),a.expand("textedit"),a.setEndPoint("EndToEnd",l),i=a.text.length-l.text.length,n=i+l.text.length,"Start"==e?i:n}return"undefined"!=typeof this["selection"+e]&&(t=this["selection"+e]),t}var i={codes:{46:127,188:44,109:45,190:46,191:47,192:96,220:92,222:39,221:93,219:91,173:45,187:61,186:59,189:45,110:46},shifts:{96:"~",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",48:")",45:"_",61:"+",91:"{",93:"}",92:"|",59:":",39:'"',44:"<",46:">",47:"?"}};e.fn.number=function(n,l,s,r){r="undefined"==typeof r?",":r,s="undefined"==typeof s?".":s,l="undefined"==typeof l?0:l;var u="\\u"+("0000"+s.charCodeAt(0).toString(16)).slice(-4),h=new RegExp("[^"+u+"0-9]","g"),o=new RegExp(u,"g");return n===!0?this.is("input:text")?this.on({"keydown.format":function(n){var u=e(this),h=u.data("numFormat"),o=n.keyCode?n.keyCode:n.which,c="",v=a.apply(this,["start"]),d=a.apply(this,["end"]),p="",f=!1;if(i.codes.hasOwnProperty(o)&&(o=i.codes[o]),!n.shiftKey&&o>=65&&90>=o?o+=32:!n.shiftKey&&o>=69&&105>=o?o-=48:n.shiftKey&&i.shifts.hasOwnProperty(o)&&(c=i.shifts[o]),""==c&&(c=String.fromCharCode(o)),8!=o&&45!=o&&127!=o&&c!=s&&!c.match(/[0-9]/)){var g=n.keyCode?n.keyCode:n.which;if(46==g||8==g||127==g||9==g||27==g||13==g||(65==g||82==g||80==g||83==g||70==g||72==g||66==g||74==g||84==g||90==g||61==g||173==g||48==g)&&(n.ctrlKey||n.metaKey)===!0||(86==g||67==g||88==g)&&(n.ctrlKey||n.metaKey)===!0||g>=35&&39>=g||g>=112&&123>=g)return;return n.preventDefault(),!1}if(0==v&&d==this.value.length?8==o?(v=d=1,this.value="",h.init=l>0?-1:0,h.c=l>0?-(l+1):0,t.apply(this,[0,0])):c==s?(v=d=1,this.value="0"+s+new Array(l+1).join("0"),h.init=l>0?1:0,h.c=l>0?-(l+1):0):45==o?(v=d=2,this.value="-0"+s+new Array(l+1).join("0"),h.init=l>0?1:0,h.c=l>0?-(l+1):0,t.apply(this,[2,2])):(h.init=l>0?-1:0,h.c=l>0?-l:0):h.c=d-this.value.length,h.isPartialSelection=v==d?!1:!0,l>0&&c==s&&v==this.value.length-l-1)h.c++,h.init=Math.max(0,h.init),n.preventDefault(),f=this.value.length+h.c;else if(45!=o||0==v&&0!=this.value.indexOf("-"))if(c==s)h.init=Math.max(0,h.init),n.preventDefault();else if(l>0&&127==o&&v==this.value.length-l-1)n.preventDefault();else if(l>0&&8==o&&v==this.value.length-l)n.preventDefault(),h.c--,f=this.value.length+h.c;else if(l>0&&127==o&&v>this.value.length-l-1){if(""===this.value)return;"0"!=this.value.slice(v,v+1)&&(p=this.value.slice(0,v)+"0"+this.value.slice(v+1),u.val(p)),n.preventDefault(),f=this.value.length+h.c}else if(l>0&&8==o&&v>this.value.length-l){if(""===this.value)return;"0"!=this.value.slice(v-1,v)&&(p=this.value.slice(0,v-1)+"0"+this.value.slice(v),u.val(p)),n.preventDefault(),h.c--,f=this.value.length+h.c}else 127==o&&this.value.slice(v,v+1)==r?n.preventDefault():8==o&&this.value.slice(v-1,v)==r?(n.preventDefault(),h.c--,f=this.value.length+h.c):l>0&&v==d&&this.value.length>l+1&&v>this.value.length-l-1&&isFinite(+c)&&!n.metaKey&&!n.ctrlKey&&!n.altKey&&1===c.length&&(p=d===this.value.length?this.value.slice(0,v-1):this.value.slice(0,v)+this.value.slice(v+1),this.value=p,f=v);else n.preventDefault();f!==!1&&t.apply(this,[f,f]),u.data("numFormat",h)},"keyup.format":function(i){var n,s=e(this),r=s.data("numFormat"),u=i.keyCode?i.keyCode:i.which,h=a.apply(this,["start"]),o=a.apply(this,["end"]);0!==h||0!==o||189!==u&&109!==u||(s.val("-"+s.val()),h=1,r.c=1-this.value.length,r.init=1,s.data("numFormat",r),n=this.value.length+r.c,t.apply(this,[n,n])),""===this.value||(48>u||u>57)&&(96>u||u>105)&&8!==u&&46!==u&&110!==u||(s.val(s.val()),l>0&&(r.init<1?(h=this.value.length-l-(r.init<0?1:0),r.c=h-this.value.length,r.init=1,s.data("numFormat",r)):h>this.value.length-l&&8!=u&&(r.c++,s.data("numFormat",r))),46!=u||r.isPartialSelection||(r.c++,s.data("numFormat",r)),n=this.value.length+r.c,t.apply(this,[n,n]))},"paste.format":function(t){var a=e(this),i=t.originalEvent,n=null;return window.clipboardData&&window.clipboardData.getData?n=window.clipboardData.getData("Text"):i.clipboardData&&i.clipboardData.getData&&(n=i.clipboardData.getData("text/plain")),a.val(n),t.preventDefault(),!1}}).each(function(){var t=e(this).data("numFormat",{c:-(l+1),decimals:l,thousands_sep:r,dec_point:s,regex_dec_num:h,regex_dec:o,init:this.value.indexOf(".")?!0:!1});""!==this.value&&t.val(t.val())}):this.each(function(){var t=e(this),a=+t.text().replace(h,"").replace(o,".");t.number(isFinite(a)?+a:0,l,s,r)}):this.text(e.number.apply(window,arguments))};var n=null,l=null;e.isPlainObject(e.valHooks.text)?(e.isFunction(e.valHooks.text.get)&&(n=e.valHooks.text.get),e.isFunction(e.valHooks.text.set)&&(l=e.valHooks.text.set)):e.valHooks.text={},e.valHooks.text.get=function(t){var a,i=e(t),l=i.data("numFormat");return l?""===t.value?"":(a=+t.value.replace(l.regex_dec_num,"").replace(l.regex_dec,"."),(0===t.value.indexOf("-")?"-":"")+(isFinite(a)?a:0)):e.isFunction(n)?n(t):void 0},e.valHooks.text.set=function(t,a){var i=e(t),n=i.data("numFormat");if(n){var s=e.number(a,n.decimals,n.dec_point,n.thousands_sep);return e.isFunction(l)?l(t,s):t.value=s}return e.isFunction(l)?l(t,a):void 0},e.number=function(e,t,a,i){i="undefined"==typeof i?"1000"!==new Number(1e3).toLocaleString()?new Number(1e3).toLocaleString().charAt(1):"":i,a="undefined"==typeof a?new Number(.1).toLocaleString().charAt(1):a,t=isFinite(+t)?Math.abs(t):0;var n="\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4),l="\\u"+("0000"+i.charCodeAt(0).toString(16)).slice(-4);e=(e+"").replace(".",a).replace(new RegExp(l,"g"),"").replace(new RegExp(n,"g"),".").replace(new RegExp("[^0-9+-Ee.]","g"),"");var s=isFinite(+e)?+e:0,r="",u=function(e,t){return""+ +(Math.round((""+e).indexOf("e")>0?e:e+"e+"+t)+"e-"+t)};return r=(t?u(s,t):""+Math.round(s)).split("."),r[0].length>3&&(r[0]=r[0].replace(/\B(?=(?:\d{3})+(?!\d))/g,i)),(r[1]||"").length<t&&(r[1]=r[1]||"",r[1]+=new Array(t-r[1].length+1).join("0")),r.join(a)}}(jQuery);
//
//../pacotes/jquery/jquery-ui/jquery-ui.min.js
/*! jQuery UI - v1.11.4 - 2016-07-10
* http://jqueryui.com
* Includes: core.js, widget.js, mouse.js, position.js, draggable.js, droppable.js, resizable.js, selectable.js, sortable.js, accordion.js, autocomplete.js, button.js, datepicker.js, dialog.js, menu.js, progressbar.js, selectmenu.js, slider.js, spinner.js, tabs.js, tooltip.js, effect.js, effect-blind.js, effect-bounce.js, effect-clip.js, effect-drop.js, effect-explode.js, effect-fade.js, effect-fold.js, effect-highlight.js, effect-puff.js, effect-pulsate.js, effect-scale.js, effect-shake.js, effect-size.js, effect-slide.js, effect-transfer.js
* Copyright jQuery Foundation and other contributors; Licensed MIT */
(function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e(jQuery)})(function(e){function t(t,s){var n,a,o,r=t.nodeName.toLowerCase();return"area"===r?(n=t.parentNode,a=n.name,t.href&&a&&"map"===n.nodeName.toLowerCase()?(o=e("img[usemap='#"+a+"']")[0],!!o&&i(o)):!1):(/^(input|select|textarea|button|object)$/.test(r)?!t.disabled:"a"===r?t.href||s:s)&&i(t)}function i(t){return e.expr.filters.visible(t)&&!e(t).parents().addBack().filter(function(){return"hidden"===e.css(this,"visibility")}).length}function s(e){for(var t,i;e.length&&e[0]!==document;){if(t=e.css("position"),("absolute"===t||"relative"===t||"fixed"===t)&&(i=parseInt(e.css("zIndex"),10),!isNaN(i)&&0!==i))return i;e=e.parent()}return 0}function n(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},e.extend(this._defaults,this.regional[""]),this.regional.en=e.extend(!0,{},this.regional[""]),this.regional["en-US"]=e.extend(!0,{},this.regional.en),this.dpDiv=a(e("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function a(t){var i="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return t.delegate(i,"mouseout",function(){e(this).removeClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&e(this).removeClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&e(this).removeClass("ui-datepicker-next-hover")}).delegate(i,"mouseover",o)}function o(){e.datepicker._isDisabledDatepicker(v.inline?v.dpDiv.parent()[0]:v.input[0])||(e(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),e(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&e(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&e(this).addClass("ui-datepicker-next-hover"))}function r(t,i){e.extend(t,i);for(var s in i)null==i[s]&&(t[s]=i[s]);return t}function h(e){return function(){var t=this.element.val();e.apply(this,arguments),this._refresh(),t!==this.element.val()&&this._trigger("change")}}e.ui=e.ui||{},e.extend(e.ui,{version:"1.11.4",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),e.fn.extend({scrollParent:function(t){var i=this.css("position"),s="absolute"===i,n=t?/(auto|scroll|hidden)/:/(auto|scroll)/,a=this.parents().filter(function(){var t=e(this);return s&&"static"===t.css("position")?!1:n.test(t.css("overflow")+t.css("overflow-y")+t.css("overflow-x"))}).eq(0);return"fixed"!==i&&a.length?a:e(this[0].ownerDocument||document)},uniqueId:function(){var e=0;return function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++e)})}}(),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&e(this).removeAttr("id")})}}),e.extend(e.expr[":"],{data:e.expr.createPseudo?e.expr.createPseudo(function(t){return function(i){return!!e.data(i,t)}}):function(t,i,s){return!!e.data(t,s[3])},focusable:function(i){return t(i,!isNaN(e.attr(i,"tabindex")))},tabbable:function(i){var s=e.attr(i,"tabindex"),n=isNaN(s);return(n||s>=0)&&t(i,!n)}}),e("<a>").outerWidth(1).jquery||e.each(["Width","Height"],function(t,i){function s(t,i,s,a){return e.each(n,function(){i-=parseFloat(e.css(t,"padding"+this))||0,s&&(i-=parseFloat(e.css(t,"border"+this+"Width"))||0),a&&(i-=parseFloat(e.css(t,"margin"+this))||0)}),i}var n="Width"===i?["Left","Right"]:["Top","Bottom"],a=i.toLowerCase(),o={innerWidth:e.fn.innerWidth,innerHeight:e.fn.innerHeight,outerWidth:e.fn.outerWidth,outerHeight:e.fn.outerHeight};e.fn["inner"+i]=function(t){return void 0===t?o["inner"+i].call(this):this.each(function(){e(this).css(a,s(this,t)+"px")})},e.fn["outer"+i]=function(t,n){return"number"!=typeof t?o["outer"+i].call(this,t):this.each(function(){e(this).css(a,s(this,t,!0,n)+"px")})}}),e.fn.addBack||(e.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),e("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(e.fn.removeData=function(t){return function(i){return arguments.length?t.call(this,e.camelCase(i)):t.call(this)}}(e.fn.removeData)),e.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),e.fn.extend({focus:function(t){return function(i,s){return"number"==typeof i?this.each(function(){var t=this;setTimeout(function(){e(t).focus(),s&&s.call(t)},i)}):t.apply(this,arguments)}}(e.fn.focus),disableSelection:function(){var e="onselectstart"in document.createElement("div")?"selectstart":"mousedown";return function(){return this.bind(e+".ui-disableSelection",function(e){e.preventDefault()})}}(),enableSelection:function(){return this.unbind(".ui-disableSelection")},zIndex:function(t){if(void 0!==t)return this.css("zIndex",t);if(this.length)for(var i,s,n=e(this[0]);n.length&&n[0]!==document;){if(i=n.css("position"),("absolute"===i||"relative"===i||"fixed"===i)&&(s=parseInt(n.css("zIndex"),10),!isNaN(s)&&0!==s))return s;n=n.parent()}return 0}}),e.ui.plugin={add:function(t,i,s){var n,a=e.ui[t].prototype;for(n in s)a.plugins[n]=a.plugins[n]||[],a.plugins[n].push([i,s[n]])},call:function(e,t,i,s){var n,a=e.plugins[t];if(a&&(s||e.element[0].parentNode&&11!==e.element[0].parentNode.nodeType))for(n=0;a.length>n;n++)e.options[a[n][0]]&&a[n][1].apply(e.element,i)}};var l=0,u=Array.prototype.slice;e.cleanData=function(t){return function(i){var s,n,a;for(a=0;null!=(n=i[a]);a++)try{s=e._data(n,"events"),s&&s.remove&&e(n).triggerHandler("remove")}catch(o){}t(i)}}(e.cleanData),e.widget=function(t,i,s){var n,a,o,r,h={},l=t.split(".")[0];return t=t.split(".")[1],n=l+"-"+t,s||(s=i,i=e.Widget),e.expr[":"][n.toLowerCase()]=function(t){return!!e.data(t,n)},e[l]=e[l]||{},a=e[l][t],o=e[l][t]=function(e,t){return this._createWidget?(arguments.length&&this._createWidget(e,t),void 0):new o(e,t)},e.extend(o,a,{version:s.version,_proto:e.extend({},s),_childConstructors:[]}),r=new i,r.options=e.widget.extend({},r.options),e.each(s,function(t,s){return e.isFunction(s)?(h[t]=function(){var e=function(){return i.prototype[t].apply(this,arguments)},n=function(e){return i.prototype[t].apply(this,e)};return function(){var t,i=this._super,a=this._superApply;return this._super=e,this._superApply=n,t=s.apply(this,arguments),this._super=i,this._superApply=a,t}}(),void 0):(h[t]=s,void 0)}),o.prototype=e.widget.extend(r,{widgetEventPrefix:a?r.widgetEventPrefix||t:t},h,{constructor:o,namespace:l,widgetName:t,widgetFullName:n}),a?(e.each(a._childConstructors,function(t,i){var s=i.prototype;e.widget(s.namespace+"."+s.widgetName,o,i._proto)}),delete a._childConstructors):i._childConstructors.push(o),e.widget.bridge(t,o),o},e.widget.extend=function(t){for(var i,s,n=u.call(arguments,1),a=0,o=n.length;o>a;a++)for(i in n[a])s=n[a][i],n[a].hasOwnProperty(i)&&void 0!==s&&(t[i]=e.isPlainObject(s)?e.isPlainObject(t[i])?e.widget.extend({},t[i],s):e.widget.extend({},s):s);return t},e.widget.bridge=function(t,i){var s=i.prototype.widgetFullName||t;e.fn[t]=function(n){var a="string"==typeof n,o=u.call(arguments,1),r=this;return a?this.each(function(){var i,a=e.data(this,s);return"instance"===n?(r=a,!1):a?e.isFunction(a[n])&&"_"!==n.charAt(0)?(i=a[n].apply(a,o),i!==a&&void 0!==i?(r=i&&i.jquery?r.pushStack(i.get()):i,!1):void 0):e.error("no such method '"+n+"' for "+t+" widget instance"):e.error("cannot call methods on "+t+" prior to initialization; "+"attempted to call method '"+n+"'")}):(o.length&&(n=e.widget.extend.apply(null,[n].concat(o))),this.each(function(){var t=e.data(this,s);t?(t.option(n||{}),t._init&&t._init()):e.data(this,s,new i(n,this))})),r}},e.Widget=function(){},e.Widget._childConstructors=[],e.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(t,i){i=e(i||this.defaultElement||this)[0],this.element=e(i),this.uuid=l++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=e(),this.hoverable=e(),this.focusable=e(),i!==this&&(e.data(i,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===i&&this.destroy()}}),this.document=e(i.style?i.ownerDocument:i.document||i),this.window=e(this.document[0].defaultView||this.document[0].parentWindow)),this.options=e.widget.extend({},this.options,this._getCreateOptions(),t),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:e.noop,_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetFullName).removeData(e.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled "+"ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:e.noop,widget:function(){return this.element},option:function(t,i){var s,n,a,o=t;if(0===arguments.length)return e.widget.extend({},this.options);if("string"==typeof t)if(o={},s=t.split("."),t=s.shift(),s.length){for(n=o[t]=e.widget.extend({},this.options[t]),a=0;s.length-1>a;a++)n[s[a]]=n[s[a]]||{},n=n[s[a]];if(t=s.pop(),1===arguments.length)return void 0===n[t]?null:n[t];n[t]=i}else{if(1===arguments.length)return void 0===this.options[t]?null:this.options[t];o[t]=i}return this._setOptions(o),this},_setOptions:function(e){var t;for(t in e)this._setOption(t,e[t]);return this},_setOption:function(e,t){return this.options[e]=t,"disabled"===e&&(this.widget().toggleClass(this.widgetFullName+"-disabled",!!t),t&&(this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus"))),this},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_on:function(t,i,s){var n,a=this;"boolean"!=typeof t&&(s=i,i=t,t=!1),s?(i=n=e(i),this.bindings=this.bindings.add(i)):(s=i,i=this.element,n=this.widget()),e.each(s,function(s,o){function r(){return t||a.options.disabled!==!0&&!e(this).hasClass("ui-state-disabled")?("string"==typeof o?a[o]:o).apply(a,arguments):void 0}"string"!=typeof o&&(r.guid=o.guid=o.guid||r.guid||e.guid++);var h=s.match(/^([\w:-]*)\s*(.*)$/),l=h[1]+a.eventNamespace,u=h[2];u?n.delegate(u,l,r):i.bind(l,r)})},_off:function(t,i){i=(i||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.unbind(i).undelegate(i),this.bindings=e(this.bindings.not(t).get()),this.focusable=e(this.focusable.not(t).get()),this.hoverable=e(this.hoverable.not(t).get())},_delay:function(e,t){function i(){return("string"==typeof e?s[e]:e).apply(s,arguments)}var s=this;return setTimeout(i,t||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){e(t.currentTarget).addClass("ui-state-hover")},mouseleave:function(t){e(t.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){e(t.currentTarget).addClass("ui-state-focus")},focusout:function(t){e(t.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(t,i,s){var n,a,o=this.options[t];if(s=s||{},i=e.Event(i),i.type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),i.target=this.element[0],a=i.originalEvent)for(n in a)n in i||(i[n]=a[n]);return this.element.trigger(i,s),!(e.isFunction(o)&&o.apply(this.element[0],[i].concat(s))===!1||i.isDefaultPrevented())}},e.each({show:"fadeIn",hide:"fadeOut"},function(t,i){e.Widget.prototype["_"+t]=function(s,n,a){"string"==typeof n&&(n={effect:n});var o,r=n?n===!0||"number"==typeof n?i:n.effect||i:t;n=n||{},"number"==typeof n&&(n={duration:n}),o=!e.isEmptyObject(n),n.complete=a,n.delay&&s.delay(n.delay),o&&e.effects&&e.effects.effect[r]?s[t](n):r!==t&&s[r]?s[r](n.duration,n.easing,a):s.queue(function(i){e(this)[t](),a&&a.call(s[0]),i()})}}),e.widget;var d=!1;e(document).mouseup(function(){d=!1}),e.widget("ui.mouse",{version:"1.11.4",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var t=this;this.element.bind("mousedown."+this.widgetName,function(e){return t._mouseDown(e)}).bind("click."+this.widgetName,function(i){return!0===e.data(i.target,t.widgetName+".preventClickEvent")?(e.removeData(i.target,t.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1):void 0}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&this.document.unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(t){if(!d){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(t),this._mouseDownEvent=t;var i=this,s=1===t.which,n="string"==typeof this.options.cancel&&t.target.nodeName?e(t.target).closest(this.options.cancel).length:!1;return s&&!n&&this._mouseCapture(t)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){i.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=this._mouseStart(t)!==!1,!this._mouseStarted)?(t.preventDefault(),!0):(!0===e.data(t.target,this.widgetName+".preventClickEvent")&&e.removeData(t.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(e){return i._mouseMove(e)},this._mouseUpDelegate=function(e){return i._mouseUp(e)},this.document.bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),t.preventDefault(),d=!0,!0)):!0}},_mouseMove:function(t){if(this._mouseMoved){if(e.ui.ie&&(!document.documentMode||9>document.documentMode)&&!t.button)return this._mouseUp(t);if(!t.which)return this._mouseUp(t)}return(t.which||t.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(t),t.preventDefault()):(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,t)!==!1,this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)),!this._mouseStarted)},_mouseUp:function(t){return this.document.unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,t.target===this._mouseDownEvent.target&&e.data(t.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(t)),d=!1,!1},_mouseDistanceMet:function(e){return Math.max(Math.abs(this._mouseDownEvent.pageX-e.pageX),Math.abs(this._mouseDownEvent.pageY-e.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}}),function(){function t(e,t,i){return[parseFloat(e[0])*(p.test(e[0])?t/100:1),parseFloat(e[1])*(p.test(e[1])?i/100:1)]}function i(t,i){return parseInt(e.css(t,i),10)||0}function s(t){var i=t[0];return 9===i.nodeType?{width:t.width(),height:t.height(),offset:{top:0,left:0}}:e.isWindow(i)?{width:t.width(),height:t.height(),offset:{top:t.scrollTop(),left:t.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:t.outerWidth(),height:t.outerHeight(),offset:t.offset()}}e.ui=e.ui||{};var n,a,o=Math.max,r=Math.abs,h=Math.round,l=/left|center|right/,u=/top|center|bottom/,d=/[\+\-]\d+(\.[\d]+)?%?/,c=/^\w+/,p=/%$/,f=e.fn.position;e.position={scrollbarWidth:function(){if(void 0!==n)return n;var t,i,s=e("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),a=s.children()[0];return e("body").append(s),t=a.offsetWidth,s.css("overflow","scroll"),i=a.offsetWidth,t===i&&(i=s[0].clientWidth),s.remove(),n=t-i},getScrollInfo:function(t){var i=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),s=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),n="scroll"===i||"auto"===i&&t.width<t.element[0].scrollWidth,a="scroll"===s||"auto"===s&&t.height<t.element[0].scrollHeight;return{width:a?e.position.scrollbarWidth():0,height:n?e.position.scrollbarWidth():0}},getWithinInfo:function(t){var i=e(t||window),s=e.isWindow(i[0]),n=!!i[0]&&9===i[0].nodeType;return{element:i,isWindow:s,isDocument:n,offset:i.offset()||{left:0,top:0},scrollLeft:i.scrollLeft(),scrollTop:i.scrollTop(),width:s||n?i.width():i.outerWidth(),height:s||n?i.height():i.outerHeight()}}},e.fn.position=function(n){if(!n||!n.of)return f.apply(this,arguments);n=e.extend({},n);var p,m,g,v,y,b,_=e(n.of),x=e.position.getWithinInfo(n.within),w=e.position.getScrollInfo(x),k=(n.collision||"flip").split(" "),T={};return b=s(_),_[0].preventDefault&&(n.at="left top"),m=b.width,g=b.height,v=b.offset,y=e.extend({},v),e.each(["my","at"],function(){var e,t,i=(n[this]||"").split(" ");1===i.length&&(i=l.test(i[0])?i.concat(["center"]):u.test(i[0])?["center"].concat(i):["center","center"]),i[0]=l.test(i[0])?i[0]:"center",i[1]=u.test(i[1])?i[1]:"center",e=d.exec(i[0]),t=d.exec(i[1]),T[this]=[e?e[0]:0,t?t[0]:0],n[this]=[c.exec(i[0])[0],c.exec(i[1])[0]]}),1===k.length&&(k[1]=k[0]),"right"===n.at[0]?y.left+=m:"center"===n.at[0]&&(y.left+=m/2),"bottom"===n.at[1]?y.top+=g:"center"===n.at[1]&&(y.top+=g/2),p=t(T.at,m,g),y.left+=p[0],y.top+=p[1],this.each(function(){var s,l,u=e(this),d=u.outerWidth(),c=u.outerHeight(),f=i(this,"marginLeft"),b=i(this,"marginTop"),D=d+f+i(this,"marginRight")+w.width,S=c+b+i(this,"marginBottom")+w.height,M=e.extend({},y),C=t(T.my,u.outerWidth(),u.outerHeight());"right"===n.my[0]?M.left-=d:"center"===n.my[0]&&(M.left-=d/2),"bottom"===n.my[1]?M.top-=c:"center"===n.my[1]&&(M.top-=c/2),M.left+=C[0],M.top+=C[1],a||(M.left=h(M.left),M.top=h(M.top)),s={marginLeft:f,marginTop:b},e.each(["left","top"],function(t,i){e.ui.position[k[t]]&&e.ui.position[k[t]][i](M,{targetWidth:m,targetHeight:g,elemWidth:d,elemHeight:c,collisionPosition:s,collisionWidth:D,collisionHeight:S,offset:[p[0]+C[0],p[1]+C[1]],my:n.my,at:n.at,within:x,elem:u})}),n.using&&(l=function(e){var t=v.left-M.left,i=t+m-d,s=v.top-M.top,a=s+g-c,h={target:{element:_,left:v.left,top:v.top,width:m,height:g},element:{element:u,left:M.left,top:M.top,width:d,height:c},horizontal:0>i?"left":t>0?"right":"center",vertical:0>a?"top":s>0?"bottom":"middle"};d>m&&m>r(t+i)&&(h.horizontal="center"),c>g&&g>r(s+a)&&(h.vertical="middle"),h.important=o(r(t),r(i))>o(r(s),r(a))?"horizontal":"vertical",n.using.call(this,e,h)}),u.offset(e.extend(M,{using:l}))})},e.ui.position={fit:{left:function(e,t){var i,s=t.within,n=s.isWindow?s.scrollLeft:s.offset.left,a=s.width,r=e.left-t.collisionPosition.marginLeft,h=n-r,l=r+t.collisionWidth-a-n;t.collisionWidth>a?h>0&&0>=l?(i=e.left+h+t.collisionWidth-a-n,e.left+=h-i):e.left=l>0&&0>=h?n:h>l?n+a-t.collisionWidth:n:h>0?e.left+=h:l>0?e.left-=l:e.left=o(e.left-r,e.left)},top:function(e,t){var i,s=t.within,n=s.isWindow?s.scrollTop:s.offset.top,a=t.within.height,r=e.top-t.collisionPosition.marginTop,h=n-r,l=r+t.collisionHeight-a-n;t.collisionHeight>a?h>0&&0>=l?(i=e.top+h+t.collisionHeight-a-n,e.top+=h-i):e.top=l>0&&0>=h?n:h>l?n+a-t.collisionHeight:n:h>0?e.top+=h:l>0?e.top-=l:e.top=o(e.top-r,e.top)}},flip:{left:function(e,t){var i,s,n=t.within,a=n.offset.left+n.scrollLeft,o=n.width,h=n.isWindow?n.scrollLeft:n.offset.left,l=e.left-t.collisionPosition.marginLeft,u=l-h,d=l+t.collisionWidth-o-h,c="left"===t.my[0]?-t.elemWidth:"right"===t.my[0]?t.elemWidth:0,p="left"===t.at[0]?t.targetWidth:"right"===t.at[0]?-t.targetWidth:0,f=-2*t.offset[0];0>u?(i=e.left+c+p+f+t.collisionWidth-o-a,(0>i||r(u)>i)&&(e.left+=c+p+f)):d>0&&(s=e.left-t.collisionPosition.marginLeft+c+p+f-h,(s>0||d>r(s))&&(e.left+=c+p+f))},top:function(e,t){var i,s,n=t.within,a=n.offset.top+n.scrollTop,o=n.height,h=n.isWindow?n.scrollTop:n.offset.top,l=e.top-t.collisionPosition.marginTop,u=l-h,d=l+t.collisionHeight-o-h,c="top"===t.my[1],p=c?-t.elemHeight:"bottom"===t.my[1]?t.elemHeight:0,f="top"===t.at[1]?t.targetHeight:"bottom"===t.at[1]?-t.targetHeight:0,m=-2*t.offset[1];0>u?(s=e.top+p+f+m+t.collisionHeight-o-a,(0>s||r(u)>s)&&(e.top+=p+f+m)):d>0&&(i=e.top-t.collisionPosition.marginTop+p+f+m-h,(i>0||d>r(i))&&(e.top+=p+f+m))}},flipfit:{left:function(){e.ui.position.flip.left.apply(this,arguments),e.ui.position.fit.left.apply(this,arguments)},top:function(){e.ui.position.flip.top.apply(this,arguments),e.ui.position.fit.top.apply(this,arguments)}}},function(){var t,i,s,n,o,r=document.getElementsByTagName("body")[0],h=document.createElement("div");t=document.createElement(r?"div":"body"),s={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},r&&e.extend(s,{position:"absolute",left:"-1000px",top:"-1000px"});for(o in s)t.style[o]=s[o];t.appendChild(h),i=r||document.documentElement,i.insertBefore(t,i.firstChild),h.style.cssText="position: absolute; left: 10.7432222px;",n=e(h).offset().left,a=n>10&&11>n,t.innerHTML="",i.removeChild(t)}()}(),e.ui.position,e.widget("ui.draggable",e.ui.mouse,{version:"1.11.4",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"===this.options.helper&&this._setPositionRelative(),this.options.addClasses&&this.element.addClass("ui-draggable"),this.options.disabled&&this.element.addClass("ui-draggable-disabled"),this._setHandleClassName(),this._mouseInit()},_setOption:function(e,t){this._super(e,t),"handle"===e&&(this._removeHandleClassName(),this._setHandleClassName())},_destroy:function(){return(this.helper||this.element).is(".ui-draggable-dragging")?(this.destroyOnClear=!0,void 0):(this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._removeHandleClassName(),this._mouseDestroy(),void 0)},_mouseCapture:function(t){var i=this.options;return this._blurActiveElement(t),this.helper||i.disabled||e(t.target).closest(".ui-resizable-handle").length>0?!1:(this.handle=this._getHandle(t),this.handle?(this._blockFrames(i.iframeFix===!0?"iframe":i.iframeFix),!0):!1)},_blockFrames:function(t){this.iframeBlocks=this.document.find(t).map(function(){var t=e(this);return e("<div>").css("position","absolute").appendTo(t.parent()).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()).offset(t.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_blurActiveElement:function(t){var i=this.document[0];if(this.handleElement.is(t.target))try{i.activeElement&&"body"!==i.activeElement.nodeName.toLowerCase()&&e(i.activeElement).blur()}catch(s){}},_mouseStart:function(t){var i=this.options;return this.helper=this._createHelper(t),this.helper.addClass("ui-draggable-dragging"),this._cacheHelperProportions(),e.ui.ddmanager&&(e.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(!0),this.offsetParent=this.helper.offsetParent(),this.hasFixedAncestor=this.helper.parents().filter(function(){return"fixed"===e(this).css("position")}).length>0,this.positionAbs=this.element.offset(),this._refreshOffsets(t),this.originalPosition=this.position=this._generatePosition(t,!1),this.originalPageX=t.pageX,this.originalPageY=t.pageY,i.cursorAt&&this._adjustOffsetFromHelper(i.cursorAt),this._setContainment(),this._trigger("start",t)===!1?(this._clear(),!1):(this._cacheHelperProportions(),e.ui.ddmanager&&!i.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t),this._normalizeRightBottom(),this._mouseDrag(t,!0),e.ui.ddmanager&&e.ui.ddmanager.dragStart(this,t),!0)},_refreshOffsets:function(e){this.offset={top:this.positionAbs.top-this.margins.top,left:this.positionAbs.left-this.margins.left,scroll:!1,parent:this._getParentOffset(),relative:this._getRelativeOffset()},this.offset.click={left:e.pageX-this.offset.left,top:e.pageY-this.offset.top}},_mouseDrag:function(t,i){if(this.hasFixedAncestor&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(t,!0),this.positionAbs=this._convertPositionTo("absolute"),!i){var s=this._uiHash();if(this._trigger("drag",t,s)===!1)return this._mouseUp({}),!1;this.position=s.position}return this.helper[0].style.left=this.position.left+"px",this.helper[0].style.top=this.position.top+"px",e.ui.ddmanager&&e.ui.ddmanager.drag(this,t),!1},_mouseStop:function(t){var i=this,s=!1;return e.ui.ddmanager&&!this.options.dropBehaviour&&(s=e.ui.ddmanager.drop(this,t)),this.dropped&&(s=this.dropped,this.dropped=!1),"invalid"===this.options.revert&&!s||"valid"===this.options.revert&&s||this.options.revert===!0||e.isFunction(this.options.revert)&&this.options.revert.call(this.element,s)?e(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){i._trigger("stop",t)!==!1&&i._clear()}):this._trigger("stop",t)!==!1&&this._clear(),!1},_mouseUp:function(t){return this._unblockFrames(),e.ui.ddmanager&&e.ui.ddmanager.dragStop(this,t),this.handleElement.is(t.target)&&this.element.focus(),e.ui.mouse.prototype._mouseUp.call(this,t)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear(),this},_getHandle:function(t){return this.options.handle?!!e(t.target).closest(this.element.find(this.options.handle)).length:!0},_setHandleClassName:function(){this.handleElement=this.options.handle?this.element.find(this.options.handle):this.element,this.handleElement.addClass("ui-draggable-handle")},_removeHandleClassName:function(){this.handleElement.removeClass("ui-draggable-handle")},_createHelper:function(t){var i=this.options,s=e.isFunction(i.helper),n=s?e(i.helper.apply(this.element[0],[t])):"clone"===i.helper?this.element.clone().removeAttr("id"):this.element;return n.parents("body").length||n.appendTo("parent"===i.appendTo?this.element[0].parentNode:i.appendTo),s&&n[0]===this.element[0]&&this._setPositionRelative(),n[0]===this.element[0]||/(fixed|absolute)/.test(n.css("position"))||n.css("position","absolute"),n},_setPositionRelative:function(){/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative")},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" ")),e.isArray(t)&&(t={left:+t[0],top:+t[1]||0}),"left"in t&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_isRootNode:function(e){return/(html|body)/i.test(e.tagName)||e===this.document[0]},_getParentOffset:function(){var t=this.offsetParent.offset(),i=this.document[0];return"absolute"===this.cssPosition&&this.scrollParent[0]!==i&&e.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),this._isRootNode(this.offsetParent[0])&&(t={top:0,left:0}),{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"!==this.cssPosition)return{top:0,left:0};var e=this.element.position(),t=this._isRootNode(this.scrollParent[0]);return{top:e.top-(parseInt(this.helper.css("top"),10)||0)+(t?0:this.scrollParent.scrollTop()),left:e.left-(parseInt(this.helper.css("left"),10)||0)+(t?0:this.scrollParent.scrollLeft())}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t,i,s,n=this.options,a=this.document[0];return this.relativeContainer=null,n.containment?"window"===n.containment?(this.containment=[e(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,e(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,e(window).scrollLeft()+e(window).width()-this.helperProportions.width-this.margins.left,e(window).scrollTop()+(e(window).height()||a.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],void 0):"document"===n.containment?(this.containment=[0,0,e(a).width()-this.helperProportions.width-this.margins.left,(e(a).height()||a.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],void 0):n.containment.constructor===Array?(this.containment=n.containment,void 0):("parent"===n.containment&&(n.containment=this.helper[0].parentNode),i=e(n.containment),s=i[0],s&&(t=/(scroll|auto)/.test(i.css("overflow")),this.containment=[(parseInt(i.css("borderLeftWidth"),10)||0)+(parseInt(i.css("paddingLeft"),10)||0),(parseInt(i.css("borderTopWidth"),10)||0)+(parseInt(i.css("paddingTop"),10)||0),(t?Math.max(s.scrollWidth,s.offsetWidth):s.offsetWidth)-(parseInt(i.css("borderRightWidth"),10)||0)-(parseInt(i.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(t?Math.max(s.scrollHeight,s.offsetHeight):s.offsetHeight)-(parseInt(i.css("borderBottomWidth"),10)||0)-(parseInt(i.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relativeContainer=i),void 0):(this.containment=null,void 0)},_convertPositionTo:function(e,t){t||(t=this.position);var i="absolute"===e?1:-1,s=this._isRootNode(this.scrollParent[0]);return{top:t.top+this.offset.relative.top*i+this.offset.parent.top*i-("fixed"===this.cssPosition?-this.offset.scroll.top:s?0:this.offset.scroll.top)*i,left:t.left+this.offset.relative.left*i+this.offset.parent.left*i-("fixed"===this.cssPosition?-this.offset.scroll.left:s?0:this.offset.scroll.left)*i}},_generatePosition:function(e,t){var i,s,n,a,o=this.options,r=this._isRootNode(this.scrollParent[0]),h=e.pageX,l=e.pageY;return r&&this.offset.scroll||(this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()}),t&&(this.containment&&(this.relativeContainer?(s=this.relativeContainer.offset(),i=[this.containment[0]+s.left,this.containment[1]+s.top,this.containment[2]+s.left,this.containment[3]+s.top]):i=this.containment,e.pageX-this.offset.click.left<i[0]&&(h=i[0]+this.offset.click.left),e.pageY-this.offset.click.top<i[1]&&(l=i[1]+this.offset.click.top),e.pageX-this.offset.click.left>i[2]&&(h=i[2]+this.offset.click.left),e.pageY-this.offset.click.top>i[3]&&(l=i[3]+this.offset.click.top)),o.grid&&(n=o.grid[1]?this.originalPageY+Math.round((l-this.originalPageY)/o.grid[1])*o.grid[1]:this.originalPageY,l=i?n-this.offset.click.top>=i[1]||n-this.offset.click.top>i[3]?n:n-this.offset.click.top>=i[1]?n-o.grid[1]:n+o.grid[1]:n,a=o.grid[0]?this.originalPageX+Math.round((h-this.originalPageX)/o.grid[0])*o.grid[0]:this.originalPageX,h=i?a-this.offset.click.left>=i[0]||a-this.offset.click.left>i[2]?a:a-this.offset.click.left>=i[0]?a-o.grid[0]:a+o.grid[0]:a),"y"===o.axis&&(h=this.originalPageX),"x"===o.axis&&(l=this.originalPageY)),{top:l-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.offset.scroll.top:r?0:this.offset.scroll.top),left:h-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.offset.scroll.left:r?0:this.offset.scroll.left)}
},_clear:function(){this.helper.removeClass("ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1,this.destroyOnClear&&this.destroy()},_normalizeRightBottom:function(){"y"!==this.options.axis&&"auto"!==this.helper.css("right")&&(this.helper.width(this.helper.width()),this.helper.css("right","auto")),"x"!==this.options.axis&&"auto"!==this.helper.css("bottom")&&(this.helper.height(this.helper.height()),this.helper.css("bottom","auto"))},_trigger:function(t,i,s){return s=s||this._uiHash(),e.ui.plugin.call(this,t,[i,s,this],!0),/^(drag|start|stop)/.test(t)&&(this.positionAbs=this._convertPositionTo("absolute"),s.offset=this.positionAbs),e.Widget.prototype._trigger.call(this,t,i,s)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),e.ui.plugin.add("draggable","connectToSortable",{start:function(t,i,s){var n=e.extend({},i,{item:s.element});s.sortables=[],e(s.options.connectToSortable).each(function(){var i=e(this).sortable("instance");i&&!i.options.disabled&&(s.sortables.push(i),i.refreshPositions(),i._trigger("activate",t,n))})},stop:function(t,i,s){var n=e.extend({},i,{item:s.element});s.cancelHelperRemoval=!1,e.each(s.sortables,function(){var e=this;e.isOver?(e.isOver=0,s.cancelHelperRemoval=!0,e.cancelHelperRemoval=!1,e._storedCSS={position:e.placeholder.css("position"),top:e.placeholder.css("top"),left:e.placeholder.css("left")},e._mouseStop(t),e.options.helper=e.options._helper):(e.cancelHelperRemoval=!0,e._trigger("deactivate",t,n))})},drag:function(t,i,s){e.each(s.sortables,function(){var n=!1,a=this;a.positionAbs=s.positionAbs,a.helperProportions=s.helperProportions,a.offset.click=s.offset.click,a._intersectsWith(a.containerCache)&&(n=!0,e.each(s.sortables,function(){return this.positionAbs=s.positionAbs,this.helperProportions=s.helperProportions,this.offset.click=s.offset.click,this!==a&&this._intersectsWith(this.containerCache)&&e.contains(a.element[0],this.element[0])&&(n=!1),n})),n?(a.isOver||(a.isOver=1,s._parent=i.helper.parent(),a.currentItem=i.helper.appendTo(a.element).data("ui-sortable-item",!0),a.options._helper=a.options.helper,a.options.helper=function(){return i.helper[0]},t.target=a.currentItem[0],a._mouseCapture(t,!0),a._mouseStart(t,!0,!0),a.offset.click.top=s.offset.click.top,a.offset.click.left=s.offset.click.left,a.offset.parent.left-=s.offset.parent.left-a.offset.parent.left,a.offset.parent.top-=s.offset.parent.top-a.offset.parent.top,s._trigger("toSortable",t),s.dropped=a.element,e.each(s.sortables,function(){this.refreshPositions()}),s.currentItem=s.element,a.fromOutside=s),a.currentItem&&(a._mouseDrag(t),i.position=a.position)):a.isOver&&(a.isOver=0,a.cancelHelperRemoval=!0,a.options._revert=a.options.revert,a.options.revert=!1,a._trigger("out",t,a._uiHash(a)),a._mouseStop(t,!0),a.options.revert=a.options._revert,a.options.helper=a.options._helper,a.placeholder&&a.placeholder.remove(),i.helper.appendTo(s._parent),s._refreshOffsets(t),i.position=s._generatePosition(t,!0),s._trigger("fromSortable",t),s.dropped=!1,e.each(s.sortables,function(){this.refreshPositions()}))})}}),e.ui.plugin.add("draggable","cursor",{start:function(t,i,s){var n=e("body"),a=s.options;n.css("cursor")&&(a._cursor=n.css("cursor")),n.css("cursor",a.cursor)},stop:function(t,i,s){var n=s.options;n._cursor&&e("body").css("cursor",n._cursor)}}),e.ui.plugin.add("draggable","opacity",{start:function(t,i,s){var n=e(i.helper),a=s.options;n.css("opacity")&&(a._opacity=n.css("opacity")),n.css("opacity",a.opacity)},stop:function(t,i,s){var n=s.options;n._opacity&&e(i.helper).css("opacity",n._opacity)}}),e.ui.plugin.add("draggable","scroll",{start:function(e,t,i){i.scrollParentNotHidden||(i.scrollParentNotHidden=i.helper.scrollParent(!1)),i.scrollParentNotHidden[0]!==i.document[0]&&"HTML"!==i.scrollParentNotHidden[0].tagName&&(i.overflowOffset=i.scrollParentNotHidden.offset())},drag:function(t,i,s){var n=s.options,a=!1,o=s.scrollParentNotHidden[0],r=s.document[0];o!==r&&"HTML"!==o.tagName?(n.axis&&"x"===n.axis||(s.overflowOffset.top+o.offsetHeight-t.pageY<n.scrollSensitivity?o.scrollTop=a=o.scrollTop+n.scrollSpeed:t.pageY-s.overflowOffset.top<n.scrollSensitivity&&(o.scrollTop=a=o.scrollTop-n.scrollSpeed)),n.axis&&"y"===n.axis||(s.overflowOffset.left+o.offsetWidth-t.pageX<n.scrollSensitivity?o.scrollLeft=a=o.scrollLeft+n.scrollSpeed:t.pageX-s.overflowOffset.left<n.scrollSensitivity&&(o.scrollLeft=a=o.scrollLeft-n.scrollSpeed))):(n.axis&&"x"===n.axis||(t.pageY-e(r).scrollTop()<n.scrollSensitivity?a=e(r).scrollTop(e(r).scrollTop()-n.scrollSpeed):e(window).height()-(t.pageY-e(r).scrollTop())<n.scrollSensitivity&&(a=e(r).scrollTop(e(r).scrollTop()+n.scrollSpeed))),n.axis&&"y"===n.axis||(t.pageX-e(r).scrollLeft()<n.scrollSensitivity?a=e(r).scrollLeft(e(r).scrollLeft()-n.scrollSpeed):e(window).width()-(t.pageX-e(r).scrollLeft())<n.scrollSensitivity&&(a=e(r).scrollLeft(e(r).scrollLeft()+n.scrollSpeed)))),a!==!1&&e.ui.ddmanager&&!n.dropBehaviour&&e.ui.ddmanager.prepareOffsets(s,t)}}),e.ui.plugin.add("draggable","snap",{start:function(t,i,s){var n=s.options;s.snapElements=[],e(n.snap.constructor!==String?n.snap.items||":data(ui-draggable)":n.snap).each(function(){var t=e(this),i=t.offset();this!==s.element[0]&&s.snapElements.push({item:this,width:t.outerWidth(),height:t.outerHeight(),top:i.top,left:i.left})})},drag:function(t,i,s){var n,a,o,r,h,l,u,d,c,p,f=s.options,m=f.snapTolerance,g=i.offset.left,v=g+s.helperProportions.width,y=i.offset.top,b=y+s.helperProportions.height;for(c=s.snapElements.length-1;c>=0;c--)h=s.snapElements[c].left-s.margins.left,l=h+s.snapElements[c].width,u=s.snapElements[c].top-s.margins.top,d=u+s.snapElements[c].height,h-m>v||g>l+m||u-m>b||y>d+m||!e.contains(s.snapElements[c].item.ownerDocument,s.snapElements[c].item)?(s.snapElements[c].snapping&&s.options.snap.release&&s.options.snap.release.call(s.element,t,e.extend(s._uiHash(),{snapItem:s.snapElements[c].item})),s.snapElements[c].snapping=!1):("inner"!==f.snapMode&&(n=m>=Math.abs(u-b),a=m>=Math.abs(d-y),o=m>=Math.abs(h-v),r=m>=Math.abs(l-g),n&&(i.position.top=s._convertPositionTo("relative",{top:u-s.helperProportions.height,left:0}).top),a&&(i.position.top=s._convertPositionTo("relative",{top:d,left:0}).top),o&&(i.position.left=s._convertPositionTo("relative",{top:0,left:h-s.helperProportions.width}).left),r&&(i.position.left=s._convertPositionTo("relative",{top:0,left:l}).left)),p=n||a||o||r,"outer"!==f.snapMode&&(n=m>=Math.abs(u-y),a=m>=Math.abs(d-b),o=m>=Math.abs(h-g),r=m>=Math.abs(l-v),n&&(i.position.top=s._convertPositionTo("relative",{top:u,left:0}).top),a&&(i.position.top=s._convertPositionTo("relative",{top:d-s.helperProportions.height,left:0}).top),o&&(i.position.left=s._convertPositionTo("relative",{top:0,left:h}).left),r&&(i.position.left=s._convertPositionTo("relative",{top:0,left:l-s.helperProportions.width}).left)),!s.snapElements[c].snapping&&(n||a||o||r||p)&&s.options.snap.snap&&s.options.snap.snap.call(s.element,t,e.extend(s._uiHash(),{snapItem:s.snapElements[c].item})),s.snapElements[c].snapping=n||a||o||r||p)}}),e.ui.plugin.add("draggable","stack",{start:function(t,i,s){var n,a=s.options,o=e.makeArray(e(a.stack)).sort(function(t,i){return(parseInt(e(t).css("zIndex"),10)||0)-(parseInt(e(i).css("zIndex"),10)||0)});o.length&&(n=parseInt(e(o[0]).css("zIndex"),10)||0,e(o).each(function(t){e(this).css("zIndex",n+t)}),this.css("zIndex",n+o.length))}}),e.ui.plugin.add("draggable","zIndex",{start:function(t,i,s){var n=e(i.helper),a=s.options;n.css("zIndex")&&(a._zIndex=n.css("zIndex")),n.css("zIndex",a.zIndex)},stop:function(t,i,s){var n=s.options;n._zIndex&&e(i.helper).css("zIndex",n._zIndex)}}),e.ui.draggable,e.widget("ui.droppable",{version:"1.11.4",widgetEventPrefix:"drop",options:{accept:"*",activeClass:!1,addClasses:!0,greedy:!1,hoverClass:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var t,i=this.options,s=i.accept;this.isover=!1,this.isout=!0,this.accept=e.isFunction(s)?s:function(e){return e.is(s)},this.proportions=function(){return arguments.length?(t=arguments[0],void 0):t?t:t={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight}},this._addToManager(i.scope),i.addClasses&&this.element.addClass("ui-droppable")},_addToManager:function(t){e.ui.ddmanager.droppables[t]=e.ui.ddmanager.droppables[t]||[],e.ui.ddmanager.droppables[t].push(this)},_splice:function(e){for(var t=0;e.length>t;t++)e[t]===this&&e.splice(t,1)},_destroy:function(){var t=e.ui.ddmanager.droppables[this.options.scope];this._splice(t),this.element.removeClass("ui-droppable ui-droppable-disabled")},_setOption:function(t,i){if("accept"===t)this.accept=e.isFunction(i)?i:function(e){return e.is(i)};else if("scope"===t){var s=e.ui.ddmanager.droppables[this.options.scope];this._splice(s),this._addToManager(i)}this._super(t,i)},_activate:function(t){var i=e.ui.ddmanager.current;this.options.activeClass&&this.element.addClass(this.options.activeClass),i&&this._trigger("activate",t,this.ui(i))},_deactivate:function(t){var i=e.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass),i&&this._trigger("deactivate",t,this.ui(i))},_over:function(t){var i=e.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this.options.hoverClass&&this.element.addClass(this.options.hoverClass),this._trigger("over",t,this.ui(i)))},_out:function(t){var i=e.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("out",t,this.ui(i)))},_drop:function(t,i){var s=i||e.ui.ddmanager.current,n=!1;return s&&(s.currentItem||s.element)[0]!==this.element[0]?(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var i=e(this).droppable("instance");return i.options.greedy&&!i.options.disabled&&i.options.scope===s.options.scope&&i.accept.call(i.element[0],s.currentItem||s.element)&&e.ui.intersect(s,e.extend(i,{offset:i.element.offset()}),i.options.tolerance,t)?(n=!0,!1):void 0}),n?!1:this.accept.call(this.element[0],s.currentItem||s.element)?(this.options.activeClass&&this.element.removeClass(this.options.activeClass),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("drop",t,this.ui(s)),this.element):!1):!1},ui:function(e){return{draggable:e.currentItem||e.element,helper:e.helper,position:e.position,offset:e.positionAbs}}}),e.ui.intersect=function(){function e(e,t,i){return e>=t&&t+i>e}return function(t,i,s,n){if(!i.offset)return!1;var a=(t.positionAbs||t.position.absolute).left+t.margins.left,o=(t.positionAbs||t.position.absolute).top+t.margins.top,r=a+t.helperProportions.width,h=o+t.helperProportions.height,l=i.offset.left,u=i.offset.top,d=l+i.proportions().width,c=u+i.proportions().height;switch(s){case"fit":return a>=l&&d>=r&&o>=u&&c>=h;case"intersect":return a+t.helperProportions.width/2>l&&d>r-t.helperProportions.width/2&&o+t.helperProportions.height/2>u&&c>h-t.helperProportions.height/2;case"pointer":return e(n.pageY,u,i.proportions().height)&&e(n.pageX,l,i.proportions().width);case"touch":return(o>=u&&c>=o||h>=u&&c>=h||u>o&&h>c)&&(a>=l&&d>=a||r>=l&&d>=r||l>a&&r>d);default:return!1}}}(),e.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(t,i){var s,n,a=e.ui.ddmanager.droppables[t.options.scope]||[],o=i?i.type:null,r=(t.currentItem||t.element).find(":data(ui-droppable)").addBack();e:for(s=0;a.length>s;s++)if(!(a[s].options.disabled||t&&!a[s].accept.call(a[s].element[0],t.currentItem||t.element))){for(n=0;r.length>n;n++)if(r[n]===a[s].element[0]){a[s].proportions().height=0;continue e}a[s].visible="none"!==a[s].element.css("display"),a[s].visible&&("mousedown"===o&&a[s]._activate.call(a[s],i),a[s].offset=a[s].element.offset(),a[s].proportions({width:a[s].element[0].offsetWidth,height:a[s].element[0].offsetHeight}))}},drop:function(t,i){var s=!1;return e.each((e.ui.ddmanager.droppables[t.options.scope]||[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&e.ui.intersect(t,this,this.options.tolerance,i)&&(s=this._drop.call(this,i)||s),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],t.currentItem||t.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,i)))}),s},dragStart:function(t,i){t.element.parentsUntil("body").bind("scroll.droppable",function(){t.options.refreshPositions||e.ui.ddmanager.prepareOffsets(t,i)})},drag:function(t,i){t.options.refreshPositions&&e.ui.ddmanager.prepareOffsets(t,i),e.each(e.ui.ddmanager.droppables[t.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var s,n,a,o=e.ui.intersect(t,this,this.options.tolerance,i),r=!o&&this.isover?"isout":o&&!this.isover?"isover":null;r&&(this.options.greedy&&(n=this.options.scope,a=this.element.parents(":data(ui-droppable)").filter(function(){return e(this).droppable("instance").options.scope===n}),a.length&&(s=e(a[0]).droppable("instance"),s.greedyChild="isover"===r)),s&&"isover"===r&&(s.isover=!1,s.isout=!0,s._out.call(s,i)),this[r]=!0,this["isout"===r?"isover":"isout"]=!1,this["isover"===r?"_over":"_out"].call(this,i),s&&"isout"===r&&(s.isout=!1,s.isover=!0,s._over.call(s,i)))}})},dragStop:function(t,i){t.element.parentsUntil("body").unbind("scroll.droppable"),t.options.refreshPositions||e.ui.ddmanager.prepareOffsets(t,i)}},e.ui.droppable,e.widget("ui.resizable",e.ui.mouse,{version:"1.11.4",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_num:function(e){return parseInt(e,10)||0},_isNumber:function(e){return!isNaN(parseInt(e,10))},_hasScroll:function(t,i){if("hidden"===e(t).css("overflow"))return!1;var s=i&&"left"===i?"scrollLeft":"scrollTop",n=!1;return t[s]>0?!0:(t[s]=1,n=t[s]>0,t[s]=0,n)},_create:function(){var t,i,s,n,a,o=this,r=this.options;if(this.element.addClass("ui-resizable"),e.extend(this,{_aspectRatio:!!r.aspectRatio,aspectRatio:r.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:r.helper||r.ghost||r.animate?r.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)&&(this.element.wrap(e("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance")),this.elementIsWrapper=!0,this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")}),this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0}),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css({margin:this.originalElement.css("margin")}),this._proportionallyResize()),this.handles=r.handles||(e(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this._handles=e(),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),t=this.handles.split(","),this.handles={},i=0;t.length>i;i++)s=e.trim(t[i]),a="ui-resizable-"+s,n=e("<div class='ui-resizable-handle "+a+"'></div>"),n.css({zIndex:r.zIndex}),"se"===s&&n.addClass("ui-icon ui-icon-gripsmall-diagonal-se"),this.handles[s]=".ui-resizable-"+s,this.element.append(n);this._renderAxis=function(t){var i,s,n,a;t=t||this.element;for(i in this.handles)this.handles[i].constructor===String?this.handles[i]=this.element.children(this.handles[i]).first().show():(this.handles[i].jquery||this.handles[i].nodeType)&&(this.handles[i]=e(this.handles[i]),this._on(this.handles[i],{mousedown:o._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(s=e(this.handles[i],this.element),a=/sw|ne|nw|se|n|s/.test(i)?s.outerHeight():s.outerWidth(),n=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join(""),t.css(n,a),this._proportionallyResize()),this._handles=this._handles.add(this.handles[i])},this._renderAxis(this.element),this._handles=this._handles.add(this.element.find(".ui-resizable-handle")),this._handles.disableSelection(),this._handles.mouseover(function(){o.resizing||(this.className&&(n=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),o.axis=n&&n[1]?n[1]:"se")}),r.autoHide&&(this._handles.hide(),e(this.element).addClass("ui-resizable-autohide").mouseenter(function(){r.disabled||(e(this).removeClass("ui-resizable-autohide"),o._handles.show())}).mouseleave(function(){r.disabled||o.resizing||(e(this).addClass("ui-resizable-autohide"),o._handles.hide())})),this._mouseInit()},_destroy:function(){this._mouseDestroy();var t,i=function(t){e(t).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(i(this.element),t=this.element,this.originalElement.css({position:t.css("position"),width:t.outerWidth(),height:t.outerHeight(),top:t.css("top"),left:t.css("left")}).insertAfter(t),t.remove()),this.originalElement.css("resize",this.originalResizeStyle),i(this.originalElement),this},_mouseCapture:function(t){var i,s,n=!1;for(i in this.handles)s=e(this.handles[i])[0],(s===t.target||e.contains(s,t.target))&&(n=!0);return!this.options.disabled&&n},_mouseStart:function(t){var i,s,n,a=this.options,o=this.element;return this.resizing=!0,this._renderProxy(),i=this._num(this.helper.css("left")),s=this._num(this.helper.css("top")),a.containment&&(i+=e(a.containment).scrollLeft()||0,s+=e(a.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:i,top:s},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:o.width(),height:o.height()},this.originalSize=this._helper?{width:o.outerWidth(),height:o.outerHeight()}:{width:o.width(),height:o.height()},this.sizeDiff={width:o.outerWidth()-o.width(),height:o.outerHeight()-o.height()},this.originalPosition={left:i,top:s},this.originalMousePosition={left:t.pageX,top:t.pageY},this.aspectRatio="number"==typeof a.aspectRatio?a.aspectRatio:this.originalSize.width/this.originalSize.height||1,n=e(".ui-resizable-"+this.axis).css("cursor"),e("body").css("cursor","auto"===n?this.axis+"-resize":n),o.addClass("ui-resizable-resizing"),this._propagate("start",t),!0},_mouseDrag:function(t){var i,s,n=this.originalMousePosition,a=this.axis,o=t.pageX-n.left||0,r=t.pageY-n.top||0,h=this._change[a];return this._updatePrevProperties(),h?(i=h.apply(this,[t,o,r]),this._updateVirtualBoundaries(t.shiftKey),(this._aspectRatio||t.shiftKey)&&(i=this._updateRatio(i,t)),i=this._respectSize(i,t),this._updateCache(i),this._propagate("resize",t),s=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),e.isEmptyObject(s)||(this._updatePrevProperties(),this._trigger("resize",t,this.ui()),this._applyChanges()),!1):!1},_mouseStop:function(t){this.resizing=!1;var i,s,n,a,o,r,h,l=this.options,u=this;return this._helper&&(i=this._proportionallyResizeElements,s=i.length&&/textarea/i.test(i[0].nodeName),n=s&&this._hasScroll(i[0],"left")?0:u.sizeDiff.height,a=s?0:u.sizeDiff.width,o={width:u.helper.width()-a,height:u.helper.height()-n},r=parseInt(u.element.css("left"),10)+(u.position.left-u.originalPosition.left)||null,h=parseInt(u.element.css("top"),10)+(u.position.top-u.originalPosition.top)||null,l.animate||this.element.css(e.extend(o,{top:h,left:r})),u.helper.height(u.size.height),u.helper.width(u.size.width),this._helper&&!l.animate&&this._proportionallyResize()),e("body").css("cursor","auto"),this.element.removeClass("ui-resizable-resizing"),this._propagate("stop",t),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var e={};return this.position.top!==this.prevPosition.top&&(e.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(e.left=this.position.left+"px"),this.size.width!==this.prevSize.width&&(e.width=this.size.width+"px"),this.size.height!==this.prevSize.height&&(e.height=this.size.height+"px"),this.helper.css(e),e},_updateVirtualBoundaries:function(e){var t,i,s,n,a,o=this.options;a={minWidth:this._isNumber(o.minWidth)?o.minWidth:0,maxWidth:this._isNumber(o.maxWidth)?o.maxWidth:1/0,minHeight:this._isNumber(o.minHeight)?o.minHeight:0,maxHeight:this._isNumber(o.maxHeight)?o.maxHeight:1/0},(this._aspectRatio||e)&&(t=a.minHeight*this.aspectRatio,s=a.minWidth/this.aspectRatio,i=a.maxHeight*this.aspectRatio,n=a.maxWidth/this.aspectRatio,t>a.minWidth&&(a.minWidth=t),s>a.minHeight&&(a.minHeight=s),a.maxWidth>i&&(a.maxWidth=i),a.maxHeight>n&&(a.maxHeight=n)),this._vBoundaries=a},_updateCache:function(e){this.offset=this.helper.offset(),this._isNumber(e.left)&&(this.position.left=e.left),this._isNumber(e.top)&&(this.position.top=e.top),this._isNumber(e.height)&&(this.size.height=e.height),this._isNumber(e.width)&&(this.size.width=e.width)},_updateRatio:function(e){var t=this.position,i=this.size,s=this.axis;return this._isNumber(e.height)?e.width=e.height*this.aspectRatio:this._isNumber(e.width)&&(e.height=e.width/this.aspectRatio),"sw"===s&&(e.left=t.left+(i.width-e.width),e.top=null),"nw"===s&&(e.top=t.top+(i.height-e.height),e.left=t.left+(i.width-e.width)),e},_respectSize:function(e){var t=this._vBoundaries,i=this.axis,s=this._isNumber(e.width)&&t.maxWidth&&t.maxWidth<e.width,n=this._isNumber(e.height)&&t.maxHeight&&t.maxHeight<e.height,a=this._isNumber(e.width)&&t.minWidth&&t.minWidth>e.width,o=this._isNumber(e.height)&&t.minHeight&&t.minHeight>e.height,r=this.originalPosition.left+this.originalSize.width,h=this.position.top+this.size.height,l=/sw|nw|w/.test(i),u=/nw|ne|n/.test(i);return a&&(e.width=t.minWidth),o&&(e.height=t.minHeight),s&&(e.width=t.maxWidth),n&&(e.height=t.maxHeight),a&&l&&(e.left=r-t.minWidth),s&&l&&(e.left=r-t.maxWidth),o&&u&&(e.top=h-t.minHeight),n&&u&&(e.top=h-t.maxHeight),e.width||e.height||e.left||!e.top?e.width||e.height||e.top||!e.left||(e.left=null):e.top=null,e},_getPaddingPlusBorderDimensions:function(e){for(var t=0,i=[],s=[e.css("borderTopWidth"),e.css("borderRightWidth"),e.css("borderBottomWidth"),e.css("borderLeftWidth")],n=[e.css("paddingTop"),e.css("paddingRight"),e.css("paddingBottom"),e.css("paddingLeft")];4>t;t++)i[t]=parseInt(s[t],10)||0,i[t]+=parseInt(n[t],10)||0;return{height:i[0]+i[2],width:i[1]+i[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var e,t=0,i=this.helper||this.element;this._proportionallyResizeElements.length>t;t++)e=this._proportionallyResizeElements[t],this.outerDimensions||(this.outerDimensions=this._getPaddingPlusBorderDimensions(e)),e.css({height:i.height()-this.outerDimensions.height||0,width:i.width()-this.outerDimensions.width||0})},_renderProxy:function(){var t=this.element,i=this.options;this.elementOffset=t.offset(),this._helper?(this.helper=this.helper||e("<div style='overflow:hidden;'></div>"),this.helper.addClass(this._helper).css({width:this.element.outerWidth()-1,height:this.element.outerHeight()-1,position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++i.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(e,t){return{width:this.originalSize.width+t}},w:function(e,t){var i=this.originalSize,s=this.originalPosition;return{left:s.left+t,width:i.width-t}},n:function(e,t,i){var s=this.originalSize,n=this.originalPosition;return{top:n.top+i,height:s.height-i}},s:function(e,t,i){return{height:this.originalSize.height+i}},se:function(t,i,s){return e.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[t,i,s]))},sw:function(t,i,s){return e.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[t,i,s]))},ne:function(t,i,s){return e.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[t,i,s]))},nw:function(t,i,s){return e.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[t,i,s]))}},_propagate:function(t,i){e.ui.plugin.call(this,t,[i,this.ui()]),"resize"!==t&&this._trigger(t,i,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),e.ui.plugin.add("resizable","animate",{stop:function(t){var i=e(this).resizable("instance"),s=i.options,n=i._proportionallyResizeElements,a=n.length&&/textarea/i.test(n[0].nodeName),o=a&&i._hasScroll(n[0],"left")?0:i.sizeDiff.height,r=a?0:i.sizeDiff.width,h={width:i.size.width-r,height:i.size.height-o},l=parseInt(i.element.css("left"),10)+(i.position.left-i.originalPosition.left)||null,u=parseInt(i.element.css("top"),10)+(i.position.top-i.originalPosition.top)||null;i.element.animate(e.extend(h,u&&l?{top:u,left:l}:{}),{duration:s.animateDuration,easing:s.animateEasing,step:function(){var s={width:parseInt(i.element.css("width"),10),height:parseInt(i.element.css("height"),10),top:parseInt(i.element.css("top"),10),left:parseInt(i.element.css("left"),10)};n&&n.length&&e(n[0]).css({width:s.width,height:s.height}),i._updateCache(s),i._propagate("resize",t)}})}}),e.ui.plugin.add("resizable","containment",{start:function(){var t,i,s,n,a,o,r,h=e(this).resizable("instance"),l=h.options,u=h.element,d=l.containment,c=d instanceof e?d.get(0):/parent/.test(d)?u.parent().get(0):d;c&&(h.containerElement=e(c),/document/.test(d)||d===document?(h.containerOffset={left:0,top:0},h.containerPosition={left:0,top:0},h.parentData={element:e(document),left:0,top:0,width:e(document).width(),height:e(document).height()||document.body.parentNode.scrollHeight}):(t=e(c),i=[],e(["Top","Right","Left","Bottom"]).each(function(e,s){i[e]=h._num(t.css("padding"+s))}),h.containerOffset=t.offset(),h.containerPosition=t.position(),h.containerSize={height:t.innerHeight()-i[3],width:t.innerWidth()-i[1]},s=h.containerOffset,n=h.containerSize.height,a=h.containerSize.width,o=h._hasScroll(c,"left")?c.scrollWidth:a,r=h._hasScroll(c)?c.scrollHeight:n,h.parentData={element:c,left:s.left,top:s.top,width:o,height:r}))},resize:function(t){var i,s,n,a,o=e(this).resizable("instance"),r=o.options,h=o.containerOffset,l=o.position,u=o._aspectRatio||t.shiftKey,d={top:0,left:0},c=o.containerElement,p=!0;c[0]!==document&&/static/.test(c.css("position"))&&(d=h),l.left<(o._helper?h.left:0)&&(o.size.width=o.size.width+(o._helper?o.position.left-h.left:o.position.left-d.left),u&&(o.size.height=o.size.width/o.aspectRatio,p=!1),o.position.left=r.helper?h.left:0),l.top<(o._helper?h.top:0)&&(o.size.height=o.size.height+(o._helper?o.position.top-h.top:o.position.top),u&&(o.size.width=o.size.height*o.aspectRatio,p=!1),o.position.top=o._helper?h.top:0),n=o.containerElement.get(0)===o.element.parent().get(0),a=/relative|absolute/.test(o.containerElement.css("position")),n&&a?(o.offset.left=o.parentData.left+o.position.left,o.offset.top=o.parentData.top+o.position.top):(o.offset.left=o.element.offset().left,o.offset.top=o.element.offset().top),i=Math.abs(o.sizeDiff.width+(o._helper?o.offset.left-d.left:o.offset.left-h.left)),s=Math.abs(o.sizeDiff.height+(o._helper?o.offset.top-d.top:o.offset.top-h.top)),i+o.size.width>=o.parentData.width&&(o.size.width=o.parentData.width-i,u&&(o.size.height=o.size.width/o.aspectRatio,p=!1)),s+o.size.height>=o.parentData.height&&(o.size.height=o.parentData.height-s,u&&(o.size.width=o.size.height*o.aspectRatio,p=!1)),p||(o.position.left=o.prevPosition.left,o.position.top=o.prevPosition.top,o.size.width=o.prevSize.width,o.size.height=o.prevSize.height)},stop:function(){var t=e(this).resizable("instance"),i=t.options,s=t.containerOffset,n=t.containerPosition,a=t.containerElement,o=e(t.helper),r=o.offset(),h=o.outerWidth()-t.sizeDiff.width,l=o.outerHeight()-t.sizeDiff.height;t._helper&&!i.animate&&/relative/.test(a.css("position"))&&e(this).css({left:r.left-n.left-s.left,width:h,height:l}),t._helper&&!i.animate&&/static/.test(a.css("position"))&&e(this).css({left:r.left-n.left-s.left,width:h,height:l})}}),e.ui.plugin.add("resizable","alsoResize",{start:function(){var t=e(this).resizable("instance"),i=t.options;e(i.alsoResize).each(function(){var t=e(this);t.data("ui-resizable-alsoresize",{width:parseInt(t.width(),10),height:parseInt(t.height(),10),left:parseInt(t.css("left"),10),top:parseInt(t.css("top"),10)})})},resize:function(t,i){var s=e(this).resizable("instance"),n=s.options,a=s.originalSize,o=s.originalPosition,r={height:s.size.height-a.height||0,width:s.size.width-a.width||0,top:s.position.top-o.top||0,left:s.position.left-o.left||0};e(n.alsoResize).each(function(){var t=e(this),s=e(this).data("ui-resizable-alsoresize"),n={},a=t.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];e.each(a,function(e,t){var i=(s[t]||0)+(r[t]||0);i&&i>=0&&(n[t]=i||null)}),t.css(n)})},stop:function(){e(this).removeData("resizable-alsoresize")}}),e.ui.plugin.add("resizable","ghost",{start:function(){var t=e(this).resizable("instance"),i=t.options,s=t.size;t.ghost=t.originalElement.clone(),t.ghost.css({opacity:.25,display:"block",position:"relative",height:s.height,width:s.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass("string"==typeof i.ghost?i.ghost:""),t.ghost.appendTo(t.helper)},resize:function(){var t=e(this).resizable("instance");t.ghost&&t.ghost.css({position:"relative",height:t.size.height,width:t.size.width})},stop:function(){var t=e(this).resizable("instance");t.ghost&&t.helper&&t.helper.get(0).removeChild(t.ghost.get(0))}}),e.ui.plugin.add("resizable","grid",{resize:function(){var t,i=e(this).resizable("instance"),s=i.options,n=i.size,a=i.originalSize,o=i.originalPosition,r=i.axis,h="number"==typeof s.grid?[s.grid,s.grid]:s.grid,l=h[0]||1,u=h[1]||1,d=Math.round((n.width-a.width)/l)*l,c=Math.round((n.height-a.height)/u)*u,p=a.width+d,f=a.height+c,m=s.maxWidth&&p>s.maxWidth,g=s.maxHeight&&f>s.maxHeight,v=s.minWidth&&s.minWidth>p,y=s.minHeight&&s.minHeight>f;s.grid=h,v&&(p+=l),y&&(f+=u),m&&(p-=l),g&&(f-=u),/^(se|s|e)$/.test(r)?(i.size.width=p,i.size.height=f):/^(ne)$/.test(r)?(i.size.width=p,i.size.height=f,i.position.top=o.top-c):/^(sw)$/.test(r)?(i.size.width=p,i.size.height=f,i.position.left=o.left-d):((0>=f-u||0>=p-l)&&(t=i._getPaddingPlusBorderDimensions(this)),f-u>0?(i.size.height=f,i.position.top=o.top-c):(f=u-t.height,i.size.height=f,i.position.top=o.top+a.height-f),p-l>0?(i.size.width=p,i.position.left=o.left-d):(p=l-t.width,i.size.width=p,i.position.left=o.left+a.width-p))}}),e.ui.resizable,e.widget("ui.selectable",e.ui.mouse,{version:"1.11.4",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch",selected:null,selecting:null,start:null,stop:null,unselected:null,unselecting:null},_create:function(){var t,i=this;
this.element.addClass("ui-selectable"),this.dragged=!1,this.refresh=function(){t=e(i.options.filter,i.element[0]),t.addClass("ui-selectee"),t.each(function(){var t=e(this),i=t.offset();e.data(this,"selectable-item",{element:this,$element:t,left:i.left,top:i.top,right:i.left+t.outerWidth(),bottom:i.top+t.outerHeight(),startselected:!1,selected:t.hasClass("ui-selected"),selecting:t.hasClass("ui-selecting"),unselecting:t.hasClass("ui-unselecting")})})},this.refresh(),this.selectees=t.addClass("ui-selectee"),this._mouseInit(),this.helper=e("<div class='ui-selectable-helper'></div>")},_destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item"),this.element.removeClass("ui-selectable ui-selectable-disabled"),this._mouseDestroy()},_mouseStart:function(t){var i=this,s=this.options;this.opos=[t.pageX,t.pageY],this.options.disabled||(this.selectees=e(s.filter,this.element[0]),this._trigger("start",t),e(s.appendTo).append(this.helper),this.helper.css({left:t.pageX,top:t.pageY,width:0,height:0}),s.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var s=e.data(this,"selectable-item");s.startselected=!0,t.metaKey||t.ctrlKey||(s.$element.removeClass("ui-selected"),s.selected=!1,s.$element.addClass("ui-unselecting"),s.unselecting=!0,i._trigger("unselecting",t,{unselecting:s.element}))}),e(t.target).parents().addBack().each(function(){var s,n=e.data(this,"selectable-item");return n?(s=!t.metaKey&&!t.ctrlKey||!n.$element.hasClass("ui-selected"),n.$element.removeClass(s?"ui-unselecting":"ui-selected").addClass(s?"ui-selecting":"ui-unselecting"),n.unselecting=!s,n.selecting=s,n.selected=s,s?i._trigger("selecting",t,{selecting:n.element}):i._trigger("unselecting",t,{unselecting:n.element}),!1):void 0}))},_mouseDrag:function(t){if(this.dragged=!0,!this.options.disabled){var i,s=this,n=this.options,a=this.opos[0],o=this.opos[1],r=t.pageX,h=t.pageY;return a>r&&(i=r,r=a,a=i),o>h&&(i=h,h=o,o=i),this.helper.css({left:a,top:o,width:r-a,height:h-o}),this.selectees.each(function(){var i=e.data(this,"selectable-item"),l=!1;i&&i.element!==s.element[0]&&("touch"===n.tolerance?l=!(i.left>r||a>i.right||i.top>h||o>i.bottom):"fit"===n.tolerance&&(l=i.left>a&&r>i.right&&i.top>o&&h>i.bottom),l?(i.selected&&(i.$element.removeClass("ui-selected"),i.selected=!1),i.unselecting&&(i.$element.removeClass("ui-unselecting"),i.unselecting=!1),i.selecting||(i.$element.addClass("ui-selecting"),i.selecting=!0,s._trigger("selecting",t,{selecting:i.element}))):(i.selecting&&((t.metaKey||t.ctrlKey)&&i.startselected?(i.$element.removeClass("ui-selecting"),i.selecting=!1,i.$element.addClass("ui-selected"),i.selected=!0):(i.$element.removeClass("ui-selecting"),i.selecting=!1,i.startselected&&(i.$element.addClass("ui-unselecting"),i.unselecting=!0),s._trigger("unselecting",t,{unselecting:i.element}))),i.selected&&(t.metaKey||t.ctrlKey||i.startselected||(i.$element.removeClass("ui-selected"),i.selected=!1,i.$element.addClass("ui-unselecting"),i.unselecting=!0,s._trigger("unselecting",t,{unselecting:i.element})))))}),!1}},_mouseStop:function(t){var i=this;return this.dragged=!1,e(".ui-unselecting",this.element[0]).each(function(){var s=e.data(this,"selectable-item");s.$element.removeClass("ui-unselecting"),s.unselecting=!1,s.startselected=!1,i._trigger("unselected",t,{unselected:s.element})}),e(".ui-selecting",this.element[0]).each(function(){var s=e.data(this,"selectable-item");s.$element.removeClass("ui-selecting").addClass("ui-selected"),s.selecting=!1,s.selected=!0,s.startselected=!0,i._trigger("selected",t,{selected:s.element})}),this._trigger("stop",t),this.helper.remove(),!1}}),e.widget("ui.sortable",e.ui.mouse,{version:"1.11.4",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_isOverAxis:function(e,t,i){return e>=t&&t+i>e},_isFloating:function(e){return/left|right/.test(e.css("float"))||/inline|table-cell/.test(e.css("display"))},_create:function(){this.containerCache={},this.element.addClass("ui-sortable"),this.refresh(),this.offset=this.element.offset(),this._mouseInit(),this._setHandleClassName(),this.ready=!0},_setOption:function(e,t){this._super(e,t),"handle"===e&&this._setHandleClassName()},_setHandleClassName:function(){this.element.find(".ui-sortable-handle").removeClass("ui-sortable-handle"),e.each(this.items,function(){(this.instance.options.handle?this.item.find(this.instance.options.handle):this.item).addClass("ui-sortable-handle")})},_destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").find(".ui-sortable-handle").removeClass("ui-sortable-handle"),this._mouseDestroy();for(var e=this.items.length-1;e>=0;e--)this.items[e].item.removeData(this.widgetName+"-item");return this},_mouseCapture:function(t,i){var s=null,n=!1,a=this;return this.reverting?!1:this.options.disabled||"static"===this.options.type?!1:(this._refreshItems(t),e(t.target).parents().each(function(){return e.data(this,a.widgetName+"-item")===a?(s=e(this),!1):void 0}),e.data(t.target,a.widgetName+"-item")===a&&(s=e(t.target)),s?!this.options.handle||i||(e(this.options.handle,s).find("*").addBack().each(function(){this===t.target&&(n=!0)}),n)?(this.currentItem=s,this._removeCurrentsFromItems(),!0):!1:!1)},_mouseStart:function(t,i,s){var n,a,o=this.options;if(this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(t),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},e.extend(this.offset,{click:{left:t.pageX-this.offset.left,top:t.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(t),this.originalPageX=t.pageX,this.originalPageY=t.pageY,o.cursorAt&&this._adjustOffsetFromHelper(o.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),o.containment&&this._setContainment(),o.cursor&&"auto"!==o.cursor&&(a=this.document.find("body"),this.storedCursor=a.css("cursor"),a.css("cursor",o.cursor),this.storedStylesheet=e("<style>*{ cursor: "+o.cursor+" !important; }</style>").appendTo(a)),o.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",o.opacity)),o.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",o.zIndex)),this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",t,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!s)for(n=this.containers.length-1;n>=0;n--)this.containers[n]._trigger("activate",t,this._uiHash(this));return e.ui.ddmanager&&(e.ui.ddmanager.current=this),e.ui.ddmanager&&!o.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t),this.dragging=!0,this.helper.addClass("ui-sortable-helper"),this._mouseDrag(t),!0},_mouseDrag:function(t){var i,s,n,a,o=this.options,r=!1;for(this.position=this._generatePosition(t),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-t.pageY<o.scrollSensitivity?this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop+o.scrollSpeed:t.pageY-this.overflowOffset.top<o.scrollSensitivity&&(this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop-o.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-t.pageX<o.scrollSensitivity?this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft+o.scrollSpeed:t.pageX-this.overflowOffset.left<o.scrollSensitivity&&(this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft-o.scrollSpeed)):(t.pageY-this.document.scrollTop()<o.scrollSensitivity?r=this.document.scrollTop(this.document.scrollTop()-o.scrollSpeed):this.window.height()-(t.pageY-this.document.scrollTop())<o.scrollSensitivity&&(r=this.document.scrollTop(this.document.scrollTop()+o.scrollSpeed)),t.pageX-this.document.scrollLeft()<o.scrollSensitivity?r=this.document.scrollLeft(this.document.scrollLeft()-o.scrollSpeed):this.window.width()-(t.pageX-this.document.scrollLeft())<o.scrollSensitivity&&(r=this.document.scrollLeft(this.document.scrollLeft()+o.scrollSpeed))),r!==!1&&e.ui.ddmanager&&!o.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t)),this.positionAbs=this._convertPositionTo("absolute"),this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),i=this.items.length-1;i>=0;i--)if(s=this.items[i],n=s.item[0],a=this._intersectsWithPointer(s),a&&s.instance===this.currentContainer&&n!==this.currentItem[0]&&this.placeholder[1===a?"next":"prev"]()[0]!==n&&!e.contains(this.placeholder[0],n)&&("semi-dynamic"===this.options.type?!e.contains(this.element[0],n):!0)){if(this.direction=1===a?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(s))break;this._rearrange(t,s),this._trigger("change",t,this._uiHash());break}return this._contactContainers(t),e.ui.ddmanager&&e.ui.ddmanager.drag(this,t),this._trigger("sort",t,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(t,i){if(t){if(e.ui.ddmanager&&!this.options.dropBehaviour&&e.ui.ddmanager.drop(this,t),this.options.revert){var s=this,n=this.placeholder.offset(),a=this.options.axis,o={};a&&"x"!==a||(o.left=n.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollLeft)),a&&"y"!==a||(o.top=n.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,e(this.helper).animate(o,parseInt(this.options.revert,10)||500,function(){s._clear(t)})}else this._clear(t,i);return!1}},cancel:function(){if(this.dragging){this._mouseUp({target:null}),"original"===this.options.helper?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var t=this.containers.length-1;t>=0;t--)this.containers[t]._trigger("deactivate",null,this._uiHash(this)),this.containers[t].containerCache.over&&(this.containers[t]._trigger("out",null,this._uiHash(this)),this.containers[t].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),e.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?e(this.domPosition.prev).after(this.currentItem):e(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(t){var i=this._getItemsAsjQuery(t&&t.connected),s=[];return t=t||{},e(i).each(function(){var i=(e(t.item||this).attr(t.attribute||"id")||"").match(t.expression||/(.+)[\-=_](.+)/);i&&s.push((t.key||i[1]+"[]")+"="+(t.key&&t.expression?i[1]:i[2]))}),!s.length&&t.key&&s.push(t.key+"="),s.join("&")},toArray:function(t){var i=this._getItemsAsjQuery(t&&t.connected),s=[];return t=t||{},i.each(function(){s.push(e(t.item||this).attr(t.attribute||"id")||"")}),s},_intersectsWith:function(e){var t=this.positionAbs.left,i=t+this.helperProportions.width,s=this.positionAbs.top,n=s+this.helperProportions.height,a=e.left,o=a+e.width,r=e.top,h=r+e.height,l=this.offset.click.top,u=this.offset.click.left,d="x"===this.options.axis||s+l>r&&h>s+l,c="y"===this.options.axis||t+u>a&&o>t+u,p=d&&c;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>e[this.floating?"width":"height"]?p:t+this.helperProportions.width/2>a&&o>i-this.helperProportions.width/2&&s+this.helperProportions.height/2>r&&h>n-this.helperProportions.height/2},_intersectsWithPointer:function(e){var t="x"===this.options.axis||this._isOverAxis(this.positionAbs.top+this.offset.click.top,e.top,e.height),i="y"===this.options.axis||this._isOverAxis(this.positionAbs.left+this.offset.click.left,e.left,e.width),s=t&&i,n=this._getDragVerticalDirection(),a=this._getDragHorizontalDirection();return s?this.floating?a&&"right"===a||"down"===n?2:1:n&&("down"===n?2:1):!1},_intersectsWithSides:function(e){var t=this._isOverAxis(this.positionAbs.top+this.offset.click.top,e.top+e.height/2,e.height),i=this._isOverAxis(this.positionAbs.left+this.offset.click.left,e.left+e.width/2,e.width),s=this._getDragVerticalDirection(),n=this._getDragHorizontalDirection();return this.floating&&n?"right"===n&&i||"left"===n&&!i:s&&("down"===s&&t||"up"===s&&!t)},_getDragVerticalDirection:function(){var e=this.positionAbs.top-this.lastPositionAbs.top;return 0!==e&&(e>0?"down":"up")},_getDragHorizontalDirection:function(){var e=this.positionAbs.left-this.lastPositionAbs.left;return 0!==e&&(e>0?"right":"left")},refresh:function(e){return this._refreshItems(e),this._setHandleClassName(),this.refreshPositions(),this},_connectWith:function(){var e=this.options;return e.connectWith.constructor===String?[e.connectWith]:e.connectWith},_getItemsAsjQuery:function(t){function i(){r.push(this)}var s,n,a,o,r=[],h=[],l=this._connectWith();if(l&&t)for(s=l.length-1;s>=0;s--)for(a=e(l[s],this.document[0]),n=a.length-1;n>=0;n--)o=e.data(a[n],this.widgetFullName),o&&o!==this&&!o.options.disabled&&h.push([e.isFunction(o.options.items)?o.options.items.call(o.element):e(o.options.items,o.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),o]);for(h.push([e.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):e(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),s=h.length-1;s>=0;s--)h[s][0].each(i);return e(r)},_removeCurrentsFromItems:function(){var t=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=e.grep(this.items,function(e){for(var i=0;t.length>i;i++)if(t[i]===e.item[0])return!1;return!0})},_refreshItems:function(t){this.items=[],this.containers=[this];var i,s,n,a,o,r,h,l,u=this.items,d=[[e.isFunction(this.options.items)?this.options.items.call(this.element[0],t,{item:this.currentItem}):e(this.options.items,this.element),this]],c=this._connectWith();if(c&&this.ready)for(i=c.length-1;i>=0;i--)for(n=e(c[i],this.document[0]),s=n.length-1;s>=0;s--)a=e.data(n[s],this.widgetFullName),a&&a!==this&&!a.options.disabled&&(d.push([e.isFunction(a.options.items)?a.options.items.call(a.element[0],t,{item:this.currentItem}):e(a.options.items,a.element),a]),this.containers.push(a));for(i=d.length-1;i>=0;i--)for(o=d[i][1],r=d[i][0],s=0,l=r.length;l>s;s++)h=e(r[s]),h.data(this.widgetName+"-item",o),u.push({item:h,instance:o,width:0,height:0,left:0,top:0})},refreshPositions:function(t){this.floating=this.items.length?"x"===this.options.axis||this._isFloating(this.items[0].item):!1,this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());var i,s,n,a;for(i=this.items.length-1;i>=0;i--)s=this.items[i],s.instance!==this.currentContainer&&this.currentContainer&&s.item[0]!==this.currentItem[0]||(n=this.options.toleranceElement?e(this.options.toleranceElement,s.item):s.item,t||(s.width=n.outerWidth(),s.height=n.outerHeight()),a=n.offset(),s.left=a.left,s.top=a.top);if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(i=this.containers.length-1;i>=0;i--)a=this.containers[i].element.offset(),this.containers[i].containerCache.left=a.left,this.containers[i].containerCache.top=a.top,this.containers[i].containerCache.width=this.containers[i].element.outerWidth(),this.containers[i].containerCache.height=this.containers[i].element.outerHeight();return this},_createPlaceholder:function(t){t=t||this;var i,s=t.options;s.placeholder&&s.placeholder.constructor!==String||(i=s.placeholder,s.placeholder={element:function(){var s=t.currentItem[0].nodeName.toLowerCase(),n=e("<"+s+">",t.document[0]).addClass(i||t.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper");return"tbody"===s?t._createTrPlaceholder(t.currentItem.find("tr").eq(0),e("<tr>",t.document[0]).appendTo(n)):"tr"===s?t._createTrPlaceholder(t.currentItem,n):"img"===s&&n.attr("src",t.currentItem.attr("src")),i||n.css("visibility","hidden"),n},update:function(e,n){(!i||s.forcePlaceholderSize)&&(n.height()||n.height(t.currentItem.innerHeight()-parseInt(t.currentItem.css("paddingTop")||0,10)-parseInt(t.currentItem.css("paddingBottom")||0,10)),n.width()||n.width(t.currentItem.innerWidth()-parseInt(t.currentItem.css("paddingLeft")||0,10)-parseInt(t.currentItem.css("paddingRight")||0,10)))}}),t.placeholder=e(s.placeholder.element.call(t.element,t.currentItem)),t.currentItem.after(t.placeholder),s.placeholder.update(t,t.placeholder)},_createTrPlaceholder:function(t,i){var s=this;t.children().each(function(){e("<td>&#160;</td>",s.document[0]).attr("colspan",e(this).attr("colspan")||1).appendTo(i)})},_contactContainers:function(t){var i,s,n,a,o,r,h,l,u,d,c=null,p=null;for(i=this.containers.length-1;i>=0;i--)if(!e.contains(this.currentItem[0],this.containers[i].element[0]))if(this._intersectsWith(this.containers[i].containerCache)){if(c&&e.contains(this.containers[i].element[0],c.element[0]))continue;c=this.containers[i],p=i}else this.containers[i].containerCache.over&&(this.containers[i]._trigger("out",t,this._uiHash(this)),this.containers[i].containerCache.over=0);if(c)if(1===this.containers.length)this.containers[p].containerCache.over||(this.containers[p]._trigger("over",t,this._uiHash(this)),this.containers[p].containerCache.over=1);else{for(n=1e4,a=null,u=c.floating||this._isFloating(this.currentItem),o=u?"left":"top",r=u?"width":"height",d=u?"clientX":"clientY",s=this.items.length-1;s>=0;s--)e.contains(this.containers[p].element[0],this.items[s].item[0])&&this.items[s].item[0]!==this.currentItem[0]&&(h=this.items[s].item.offset()[o],l=!1,t[d]-h>this.items[s][r]/2&&(l=!0),n>Math.abs(t[d]-h)&&(n=Math.abs(t[d]-h),a=this.items[s],this.direction=l?"up":"down"));if(!a&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[p])return this.currentContainer.containerCache.over||(this.containers[p]._trigger("over",t,this._uiHash()),this.currentContainer.containerCache.over=1),void 0;a?this._rearrange(t,a,null,!0):this._rearrange(t,null,this.containers[p].element,!0),this._trigger("change",t,this._uiHash()),this.containers[p]._trigger("change",t,this._uiHash(this)),this.currentContainer=this.containers[p],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[p]._trigger("over",t,this._uiHash(this)),this.containers[p].containerCache.over=1}},_createHelper:function(t){var i=this.options,s=e.isFunction(i.helper)?e(i.helper.apply(this.element[0],[t,this.currentItem])):"clone"===i.helper?this.currentItem.clone():this.currentItem;return s.parents("body").length||e("parent"!==i.appendTo?i.appendTo:this.currentItem[0].parentNode)[0].appendChild(s[0]),s[0]===this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),(!s[0].style.width||i.forceHelperSize)&&s.width(this.currentItem.width()),(!s[0].style.height||i.forceHelperSize)&&s.height(this.currentItem.height()),s},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" ")),e.isArray(t)&&(t={left:+t[0],top:+t[1]||0}),"left"in t&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var t=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==this.document[0]&&e.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===this.document[0].body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&e.ui.ie)&&(t={top:0,left:0}),{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var e=this.currentItem.position();return{top:e.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:e.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t,i,s,n=this.options;"parent"===n.containment&&(n.containment=this.helper[0].parentNode),("document"===n.containment||"window"===n.containment)&&(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,"document"===n.containment?this.document.width():this.window.width()-this.helperProportions.width-this.margins.left,("document"===n.containment?this.document.width():this.window.height()||this.document[0].body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(n.containment)||(t=e(n.containment)[0],i=e(n.containment).offset(),s="hidden"!==e(t).css("overflow"),this.containment=[i.left+(parseInt(e(t).css("borderLeftWidth"),10)||0)+(parseInt(e(t).css("paddingLeft"),10)||0)-this.margins.left,i.top+(parseInt(e(t).css("borderTopWidth"),10)||0)+(parseInt(e(t).css("paddingTop"),10)||0)-this.margins.top,i.left+(s?Math.max(t.scrollWidth,t.offsetWidth):t.offsetWidth)-(parseInt(e(t).css("borderLeftWidth"),10)||0)-(parseInt(e(t).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,i.top+(s?Math.max(t.scrollHeight,t.offsetHeight):t.offsetHeight)-(parseInt(e(t).css("borderTopWidth"),10)||0)-(parseInt(e(t).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(t,i){i||(i=this.position);var s="absolute"===t?1:-1,n="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,a=/(html|body)/i.test(n[0].tagName);return{top:i.top+this.offset.relative.top*s+this.offset.parent.top*s-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():a?0:n.scrollTop())*s,left:i.left+this.offset.relative.left*s+this.offset.parent.left*s-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():a?0:n.scrollLeft())*s}},_generatePosition:function(t){var i,s,n=this.options,a=t.pageX,o=t.pageY,r="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,h=/(html|body)/i.test(r[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(t.pageX-this.offset.click.left<this.containment[0]&&(a=this.containment[0]+this.offset.click.left),t.pageY-this.offset.click.top<this.containment[1]&&(o=this.containment[1]+this.offset.click.top),t.pageX-this.offset.click.left>this.containment[2]&&(a=this.containment[2]+this.offset.click.left),t.pageY-this.offset.click.top>this.containment[3]&&(o=this.containment[3]+this.offset.click.top)),n.grid&&(i=this.originalPageY+Math.round((o-this.originalPageY)/n.grid[1])*n.grid[1],o=this.containment?i-this.offset.click.top>=this.containment[1]&&i-this.offset.click.top<=this.containment[3]?i:i-this.offset.click.top>=this.containment[1]?i-n.grid[1]:i+n.grid[1]:i,s=this.originalPageX+Math.round((a-this.originalPageX)/n.grid[0])*n.grid[0],a=this.containment?s-this.offset.click.left>=this.containment[0]&&s-this.offset.click.left<=this.containment[2]?s:s-this.offset.click.left>=this.containment[0]?s-n.grid[0]:s+n.grid[0]:s)),{top:o-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():h?0:r.scrollTop()),left:a-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():h?0:r.scrollLeft())}},_rearrange:function(e,t,i,s){i?i[0].appendChild(this.placeholder[0]):t.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?t.item[0]:t.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var n=this.counter;this._delay(function(){n===this.counter&&this.refreshPositions(!s)})},_clear:function(e,t){function i(e,t,i){return function(s){i._trigger(e,s,t._uiHash(t))}}this.reverting=!1;var s,n=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(s in this._storedCSS)("auto"===this._storedCSS[s]||"static"===this._storedCSS[s])&&(this._storedCSS[s]="");this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();for(this.fromOutside&&!t&&n.push(function(e){this._trigger("receive",e,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||t||n.push(function(e){this._trigger("update",e,this._uiHash())}),this!==this.currentContainer&&(t||(n.push(function(e){this._trigger("remove",e,this._uiHash())}),n.push(function(e){return function(t){e._trigger("receive",t,this._uiHash(this))}}.call(this,this.currentContainer)),n.push(function(e){return function(t){e._trigger("update",t,this._uiHash(this))}}.call(this,this.currentContainer)))),s=this.containers.length-1;s>=0;s--)t||n.push(i("deactivate",this,this.containers[s])),this.containers[s].containerCache.over&&(n.push(i("out",this,this.containers[s])),this.containers[s].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,t||this._trigger("beforeStop",e,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.cancelHelperRemoval||(this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null),!t){for(s=0;n.length>s;s++)n[s].call(this,e);this._trigger("stop",e,this._uiHash())}return this.fromOutside=!1,!this.cancelHelperRemoval},_trigger:function(){e.Widget.prototype._trigger.apply(this,arguments)===!1&&this.cancel()},_uiHash:function(t){var i=t||this;return{helper:i.helper,placeholder:i.placeholder||e([]),position:i.position,originalPosition:i.originalPosition,offset:i.positionAbs,item:i.currentItem,sender:t?t.element:null}}}),e.widget("ui.accordion",{version:"1.11.4",options:{active:0,animate:{},collapsible:!1,event:"click",header:"> li > :first-child,> :not(li):even",heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},hideProps:{borderTopWidth:"hide",borderBottomWidth:"hide",paddingTop:"hide",paddingBottom:"hide",height:"hide"},showProps:{borderTopWidth:"show",borderBottomWidth:"show",paddingTop:"show",paddingBottom:"show",height:"show"},_create:function(){var t=this.options;this.prevShow=this.prevHide=e(),this.element.addClass("ui-accordion ui-widget ui-helper-reset").attr("role","tablist"),t.collapsible||t.active!==!1&&null!=t.active||(t.active=0),this._processPanels(),0>t.active&&(t.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():e()}},_createIcons:function(){var t=this.options.icons;t&&(e("<span>").addClass("ui-accordion-header-icon ui-icon "+t.header).prependTo(this.headers),this.active.children(".ui-accordion-header-icon").removeClass(t.header).addClass(t.activeHeader),this.headers.addClass("ui-accordion-icons"))},_destroyIcons:function(){this.headers.removeClass("ui-accordion-icons").children(".ui-accordion-header-icon").remove()},_destroy:function(){var e;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role"),this.headers.removeClass("ui-accordion-header ui-accordion-header-active ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-selected").removeAttr("aria-controls").removeAttr("tabIndex").removeUniqueId(),this._destroyIcons(),e=this.headers.next().removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled").css("display","").removeAttr("role").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeUniqueId(),"content"!==this.options.heightStyle&&e.css("height","")},_setOption:function(e,t){return"active"===e?(this._activate(t),void 0):("event"===e&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(t)),this._super(e,t),"collapsible"!==e||t||this.options.active!==!1||this._activate(0),"icons"===e&&(this._destroyIcons(),t&&this._createIcons()),"disabled"===e&&(this.element.toggleClass("ui-state-disabled",!!t).attr("aria-disabled",t),this.headers.add(this.headers.next()).toggleClass("ui-state-disabled",!!t)),void 0)},_keydown:function(t){if(!t.altKey&&!t.ctrlKey){var i=e.ui.keyCode,s=this.headers.length,n=this.headers.index(t.target),a=!1;switch(t.keyCode){case i.RIGHT:case i.DOWN:a=this.headers[(n+1)%s];break;case i.LEFT:case i.UP:a=this.headers[(n-1+s)%s];break;case i.SPACE:case i.ENTER:this._eventHandler(t);break;case i.HOME:a=this.headers[0];break;case i.END:a=this.headers[s-1]}a&&(e(t.target).attr("tabIndex",-1),e(a).attr("tabIndex",0),a.focus(),t.preventDefault())}},_panelKeyDown:function(t){t.keyCode===e.ui.keyCode.UP&&t.ctrlKey&&e(t.currentTarget).prev().focus()},refresh:function(){var t=this.options;this._processPanels(),t.active===!1&&t.collapsible===!0||!this.headers.length?(t.active=!1,this.active=e()):t.active===!1?this._activate(0):this.active.length&&!e.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(t.active=!1,this.active=e()):this._activate(Math.max(0,t.active-1)):t.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){var e=this.headers,t=this.panels;this.headers=this.element.find(this.options.header).addClass("ui-accordion-header ui-state-default ui-corner-all"),this.panels=this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom").filter(":not(.ui-accordion-content-active)").hide(),t&&(this._off(e.not(this.headers)),this._off(t.not(this.panels)))
},_refresh:function(){var t,i=this.options,s=i.heightStyle,n=this.element.parent();this.active=this._findActive(i.active).addClass("ui-accordion-header-active ui-state-active ui-corner-top").removeClass("ui-corner-all"),this.active.next().addClass("ui-accordion-content-active").show(),this.headers.attr("role","tab").each(function(){var t=e(this),i=t.uniqueId().attr("id"),s=t.next(),n=s.uniqueId().attr("id");t.attr("aria-controls",n),s.attr("aria-labelledby",i)}).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}).next().attr({"aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}).next().attr({"aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._createIcons(),this._setupEvents(i.event),"fill"===s?(t=n.height(),this.element.siblings(":visible").each(function(){var i=e(this),s=i.css("position");"absolute"!==s&&"fixed"!==s&&(t-=i.outerHeight(!0))}),this.headers.each(function(){t-=e(this).outerHeight(!0)}),this.headers.next().each(function(){e(this).height(Math.max(0,t-e(this).innerHeight()+e(this).height()))}).css("overflow","auto")):"auto"===s&&(t=0,this.headers.next().each(function(){t=Math.max(t,e(this).css("height","").height())}).height(t))},_activate:function(t){var i=this._findActive(t)[0];i!==this.active[0]&&(i=i||this.active[0],this._eventHandler({target:i,currentTarget:i,preventDefault:e.noop}))},_findActive:function(t){return"number"==typeof t?this.headers.eq(t):e()},_setupEvents:function(t){var i={keydown:"_keydown"};t&&e.each(t.split(" "),function(e,t){i[t]="_eventHandler"}),this._off(this.headers.add(this.headers.next())),this._on(this.headers,i),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventHandler:function(t){var i=this.options,s=this.active,n=e(t.currentTarget),a=n[0]===s[0],o=a&&i.collapsible,r=o?e():n.next(),h=s.next(),l={oldHeader:s,oldPanel:h,newHeader:o?e():n,newPanel:r};t.preventDefault(),a&&!i.collapsible||this._trigger("beforeActivate",t,l)===!1||(i.active=o?!1:this.headers.index(n),this.active=a?e():n,this._toggle(l),s.removeClass("ui-accordion-header-active ui-state-active"),i.icons&&s.children(".ui-accordion-header-icon").removeClass(i.icons.activeHeader).addClass(i.icons.header),a||(n.removeClass("ui-corner-all").addClass("ui-accordion-header-active ui-state-active ui-corner-top"),i.icons&&n.children(".ui-accordion-header-icon").removeClass(i.icons.header).addClass(i.icons.activeHeader),n.next().addClass("ui-accordion-content-active")))},_toggle:function(t){var i=t.newPanel,s=this.prevShow.length?this.prevShow:t.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=i,this.prevHide=s,this.options.animate?this._animate(i,s,t):(s.hide(),i.show(),this._toggleComplete(t)),s.attr({"aria-hidden":"true"}),s.prev().attr({"aria-selected":"false","aria-expanded":"false"}),i.length&&s.length?s.prev().attr({tabIndex:-1,"aria-expanded":"false"}):i.length&&this.headers.filter(function(){return 0===parseInt(e(this).attr("tabIndex"),10)}).attr("tabIndex",-1),i.attr("aria-hidden","false").prev().attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_animate:function(e,t,i){var s,n,a,o=this,r=0,h=e.css("box-sizing"),l=e.length&&(!t.length||e.index()<t.index()),u=this.options.animate||{},d=l&&u.down||u,c=function(){o._toggleComplete(i)};return"number"==typeof d&&(a=d),"string"==typeof d&&(n=d),n=n||d.easing||u.easing,a=a||d.duration||u.duration,t.length?e.length?(s=e.show().outerHeight(),t.animate(this.hideProps,{duration:a,easing:n,step:function(e,t){t.now=Math.round(e)}}),e.hide().animate(this.showProps,{duration:a,easing:n,complete:c,step:function(e,i){i.now=Math.round(e),"height"!==i.prop?"content-box"===h&&(r+=i.now):"content"!==o.options.heightStyle&&(i.now=Math.round(s-t.outerHeight()-r),r=0)}}),void 0):t.animate(this.hideProps,a,n,c):e.animate(this.showProps,a,n,c)},_toggleComplete:function(e){var t=e.oldPanel;t.removeClass("ui-accordion-content-active").prev().removeClass("ui-corner-top").addClass("ui-corner-all"),t.length&&(t.parent()[0].className=t.parent()[0].className),this._trigger("activate",null,e)}}),e.widget("ui.menu",{version:"1.11.4",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-carat-1-e"},items:"> *",menus:"ul",position:{my:"left-1 top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().addClass("ui-menu ui-widget ui-widget-content").toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length).attr({role:this.options.role,tabIndex:0}),this.options.disabled&&this.element.addClass("ui-state-disabled").attr("aria-disabled","true"),this._on({"mousedown .ui-menu-item":function(e){e.preventDefault()},"click .ui-menu-item":function(t){var i=e(t.target);!this.mouseHandled&&i.not(".ui-state-disabled").length&&(this.select(t),t.isPropagationStopped()||(this.mouseHandled=!0),i.has(".ui-menu").length?this.expand(t):!this.element.is(":focus")&&e(this.document[0].activeElement).closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(t){if(!this.previousFilter){var i=e(t.currentTarget);i.siblings(".ui-state-active").removeClass("ui-state-active"),this.focus(t,i)}},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(e,t){var i=this.active||this.element.find(this.options.items).eq(0);t||this.focus(e,i)},blur:function(t){this._delay(function(){e.contains(this.element[0],this.document[0].activeElement)||this.collapseAll(t)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(e){this._closeOnDocumentClick(e)&&this.collapseAll(e),this.mouseHandled=!1}})},_destroy:function(){this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeClass("ui-menu ui-widget ui-widget-content ui-menu-icons ui-front").removeAttr("role").removeAttr("tabIndex").removeAttr("aria-labelledby").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-disabled").removeUniqueId().show(),this.element.find(".ui-menu-item").removeClass("ui-menu-item").removeAttr("role").removeAttr("aria-disabled").removeUniqueId().removeClass("ui-state-hover").removeAttr("tabIndex").removeAttr("role").removeAttr("aria-haspopup").children().each(function(){var t=e(this);t.data("ui-menu-submenu-carat")&&t.remove()}),this.element.find(".ui-menu-divider").removeClass("ui-menu-divider ui-widget-content")},_keydown:function(t){var i,s,n,a,o=!0;switch(t.keyCode){case e.ui.keyCode.PAGE_UP:this.previousPage(t);break;case e.ui.keyCode.PAGE_DOWN:this.nextPage(t);break;case e.ui.keyCode.HOME:this._move("first","first",t);break;case e.ui.keyCode.END:this._move("last","last",t);break;case e.ui.keyCode.UP:this.previous(t);break;case e.ui.keyCode.DOWN:this.next(t);break;case e.ui.keyCode.LEFT:this.collapse(t);break;case e.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(t);break;case e.ui.keyCode.ENTER:case e.ui.keyCode.SPACE:this._activate(t);break;case e.ui.keyCode.ESCAPE:this.collapse(t);break;default:o=!1,s=this.previousFilter||"",n=String.fromCharCode(t.keyCode),a=!1,clearTimeout(this.filterTimer),n===s?a=!0:n=s+n,i=this._filterMenuItems(n),i=a&&-1!==i.index(this.active.next())?this.active.nextAll(".ui-menu-item"):i,i.length||(n=String.fromCharCode(t.keyCode),i=this._filterMenuItems(n)),i.length?(this.focus(t,i),this.previousFilter=n,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter}o&&t.preventDefault()},_activate:function(e){this.active.is(".ui-state-disabled")||(this.active.is("[aria-haspopup='true']")?this.expand(e):this.select(e))},refresh:function(){var t,i,s=this,n=this.options.icons.submenu,a=this.element.find(this.options.menus);this.element.toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length),a.filter(":not(.ui-menu)").addClass("ui-menu ui-widget ui-widget-content ui-front").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var t=e(this),i=t.parent(),s=e("<span>").addClass("ui-menu-icon ui-icon "+n).data("ui-menu-submenu-carat",!0);i.attr("aria-haspopup","true").prepend(s),t.attr("aria-labelledby",i.attr("id"))}),t=a.add(this.element),i=t.find(this.options.items),i.not(".ui-menu-item").each(function(){var t=e(this);s._isDivider(t)&&t.addClass("ui-widget-content ui-menu-divider")}),i.not(".ui-menu-item, .ui-menu-divider").addClass("ui-menu-item").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),i.filter(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!e.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(e,t){"icons"===e&&this.element.find(".ui-menu-icon").removeClass(this.options.icons.submenu).addClass(t.submenu),"disabled"===e&&this.element.toggleClass("ui-state-disabled",!!t).attr("aria-disabled",t),this._super(e,t)},focus:function(e,t){var i,s;this.blur(e,e&&"focus"===e.type),this._scrollIntoView(t),this.active=t.first(),s=this.active.addClass("ui-state-focus").removeClass("ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",s.attr("id")),this.active.parent().closest(".ui-menu-item").addClass("ui-state-active"),e&&"keydown"===e.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),i=t.children(".ui-menu"),i.length&&e&&/^mouse/.test(e.type)&&this._startOpening(i),this.activeMenu=t.parent(),this._trigger("focus",e,{item:t})},_scrollIntoView:function(t){var i,s,n,a,o,r;this._hasScroll()&&(i=parseFloat(e.css(this.activeMenu[0],"borderTopWidth"))||0,s=parseFloat(e.css(this.activeMenu[0],"paddingTop"))||0,n=t.offset().top-this.activeMenu.offset().top-i-s,a=this.activeMenu.scrollTop(),o=this.activeMenu.height(),r=t.outerHeight(),0>n?this.activeMenu.scrollTop(a+n):n+r>o&&this.activeMenu.scrollTop(a+n-o+r))},blur:function(e,t){t||clearTimeout(this.timer),this.active&&(this.active.removeClass("ui-state-focus"),this.active=null,this._trigger("blur",e,{item:this.active}))},_startOpening:function(e){clearTimeout(this.timer),"true"===e.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(e)},this.delay))},_open:function(t){var i=e.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(t.parents(".ui-menu")).hide().attr("aria-hidden","true"),t.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(i)},collapseAll:function(t,i){clearTimeout(this.timer),this.timer=this._delay(function(){var s=i?this.element:e(t&&t.target).closest(this.element.find(".ui-menu"));s.length||(s=this.element),this._close(s),this.blur(t),this.activeMenu=s},this.delay)},_close:function(e){e||(e=this.active?this.active.parent():this.element),e.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false").end().find(".ui-state-active").not(".ui-state-focus").removeClass("ui-state-active")},_closeOnDocumentClick:function(t){return!e(t.target).closest(".ui-menu").length},_isDivider:function(e){return!/[^\-\u2014\u2013\s]/.test(e.text())},collapse:function(e){var t=this.active&&this.active.parent().closest(".ui-menu-item",this.element);t&&t.length&&(this._close(),this.focus(e,t))},expand:function(e){var t=this.active&&this.active.children(".ui-menu ").find(this.options.items).first();t&&t.length&&(this._open(t.parent()),this._delay(function(){this.focus(e,t)}))},next:function(e){this._move("next","first",e)},previous:function(e){this._move("prev","last",e)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(e,t,i){var s;this.active&&(s="first"===e||"last"===e?this.active["first"===e?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[e+"All"](".ui-menu-item").eq(0)),s&&s.length&&this.active||(s=this.activeMenu.find(this.options.items)[t]()),this.focus(i,s)},nextPage:function(t){var i,s,n;return this.active?(this.isLastItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return i=e(this),0>i.offset().top-s-n}),this.focus(t,i)):this.focus(t,this.activeMenu.find(this.options.items)[this.active?"last":"first"]())),void 0):(this.next(t),void 0)},previousPage:function(t){var i,s,n;return this.active?(this.isFirstItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return i=e(this),i.offset().top-s+n>0}),this.focus(t,i)):this.focus(t,this.activeMenu.find(this.options.items).first())),void 0):(this.next(t),void 0)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(t){this.active=this.active||e(t.target).closest(".ui-menu-item");var i={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(t,!0),this._trigger("select",t,i)},_filterMenuItems:function(t){var i=t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"),s=RegExp("^"+i,"i");return this.activeMenu.find(this.options.items).filter(".ui-menu-item").filter(function(){return s.test(e.trim(e(this).text()))})}}),e.widget("ui.autocomplete",{version:"1.11.4",defaultElement:"<input>",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,_create:function(){var t,i,s,n=this.element[0].nodeName.toLowerCase(),a="textarea"===n,o="input"===n;this.isMultiLine=a?!0:o?!1:this.element.prop("isContentEditable"),this.valueMethod=this.element[a||o?"val":"text"],this.isNewMenu=!0,this.element.addClass("ui-autocomplete-input").attr("autocomplete","off"),this._on(this.element,{keydown:function(n){if(this.element.prop("readOnly"))return t=!0,s=!0,i=!0,void 0;t=!1,s=!1,i=!1;var a=e.ui.keyCode;switch(n.keyCode){case a.PAGE_UP:t=!0,this._move("previousPage",n);break;case a.PAGE_DOWN:t=!0,this._move("nextPage",n);break;case a.UP:t=!0,this._keyEvent("previous",n);break;case a.DOWN:t=!0,this._keyEvent("next",n);break;case a.ENTER:this.menu.active&&(t=!0,n.preventDefault(),this.menu.select(n));break;case a.TAB:this.menu.active&&this.menu.select(n);break;case a.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(n),n.preventDefault());break;default:i=!0,this._searchTimeout(n)}},keypress:function(s){if(t)return t=!1,(!this.isMultiLine||this.menu.element.is(":visible"))&&s.preventDefault(),void 0;if(!i){var n=e.ui.keyCode;switch(s.keyCode){case n.PAGE_UP:this._move("previousPage",s);break;case n.PAGE_DOWN:this._move("nextPage",s);break;case n.UP:this._keyEvent("previous",s);break;case n.DOWN:this._keyEvent("next",s)}}},input:function(e){return s?(s=!1,e.preventDefault(),void 0):(this._searchTimeout(e),void 0)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(e){return this.cancelBlur?(delete this.cancelBlur,void 0):(clearTimeout(this.searching),this.close(e),this._change(e),void 0)}}),this._initSource(),this.menu=e("<ul>").addClass("ui-autocomplete ui-front").appendTo(this._appendTo()).menu({role:null}).hide().menu("instance"),this._on(this.menu.element,{mousedown:function(t){t.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur});var i=this.menu.element[0];e(t.target).closest(".ui-menu-item").length||this._delay(function(){var t=this;this.document.one("mousedown",function(s){s.target===t.element[0]||s.target===i||e.contains(i,s.target)||t.close()})})},menufocus:function(t,i){var s,n;return this.isNewMenu&&(this.isNewMenu=!1,t.originalEvent&&/^mouse/.test(t.originalEvent.type))?(this.menu.blur(),this.document.one("mousemove",function(){e(t.target).trigger(t.originalEvent)}),void 0):(n=i.item.data("ui-autocomplete-item"),!1!==this._trigger("focus",t,{item:n})&&t.originalEvent&&/^key/.test(t.originalEvent.type)&&this._value(n.value),s=i.item.attr("aria-label")||n.value,s&&e.trim(s).length&&(this.liveRegion.children().hide(),e("<div>").text(s).appendTo(this.liveRegion)),void 0)},menuselect:function(e,t){var i=t.item.data("ui-autocomplete-item"),s=this.previous;this.element[0]!==this.document[0].activeElement&&(this.element.focus(),this.previous=s,this._delay(function(){this.previous=s,this.selectedItem=i})),!1!==this._trigger("select",e,{item:i})&&this._value(i.value),this.term=this._value(),this.close(e),this.selectedItem=i}}),this.liveRegion=e("<span>",{role:"status","aria-live":"assertive","aria-relevant":"additions"}).addClass("ui-helper-hidden-accessible").appendTo(this.document[0].body),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(e,t){this._super(e,t),"source"===e&&this._initSource(),"appendTo"===e&&this.menu.element.appendTo(this._appendTo()),"disabled"===e&&t&&this.xhr&&this.xhr.abort()},_appendTo:function(){var t=this.options.appendTo;return t&&(t=t.jquery||t.nodeType?e(t):this.document.find(t).eq(0)),t&&t[0]||(t=this.element.closest(".ui-front")),t.length||(t=this.document[0].body),t},_initSource:function(){var t,i,s=this;e.isArray(this.options.source)?(t=this.options.source,this.source=function(i,s){s(e.ui.autocomplete.filter(t,i.term))}):"string"==typeof this.options.source?(i=this.options.source,this.source=function(t,n){s.xhr&&s.xhr.abort(),s.xhr=e.ajax({url:i,data:t,dataType:"json",success:function(e){n(e)},error:function(){n([])}})}):this.source=this.options.source},_searchTimeout:function(e){clearTimeout(this.searching),this.searching=this._delay(function(){var t=this.term===this._value(),i=this.menu.element.is(":visible"),s=e.altKey||e.ctrlKey||e.metaKey||e.shiftKey;(!t||t&&!i&&!s)&&(this.selectedItem=null,this.search(null,e))},this.options.delay)},search:function(e,t){return e=null!=e?e:this._value(),this.term=this._value(),e.length<this.options.minLength?this.close(t):this._trigger("search",t)!==!1?this._search(e):void 0},_search:function(e){this.pending++,this.element.addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:e},this._response())},_response:function(){var t=++this.requestIndex;return e.proxy(function(e){t===this.requestIndex&&this.__response(e),this.pending--,this.pending||this.element.removeClass("ui-autocomplete-loading")},this)},__response:function(e){e&&(e=this._normalize(e)),this._trigger("response",null,{content:e}),!this.options.disabled&&e&&e.length&&!this.cancelSearch?(this._suggest(e),this._trigger("open")):this._close()},close:function(e){this.cancelSearch=!0,this._close(e)},_close:function(e){this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",e))},_change:function(e){this.previous!==this._value()&&this._trigger("change",e,{item:this.selectedItem})},_normalize:function(t){return t.length&&t[0].label&&t[0].value?t:e.map(t,function(t){return"string"==typeof t?{label:t,value:t}:e.extend({},t,{label:t.label||t.value,value:t.value||t.label})})},_suggest:function(t){var i=this.menu.element.empty();this._renderMenu(i,t),this.isNewMenu=!0,this.menu.refresh(),i.show(),this._resizeMenu(),i.position(e.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next()},_resizeMenu:function(){var e=this.menu.element;e.outerWidth(Math.max(e.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(t,i){var s=this;e.each(i,function(e,i){s._renderItemData(t,i)})},_renderItemData:function(e,t){return this._renderItem(e,t).data("ui-autocomplete-item",t)},_renderItem:function(t,i){return e("<li>").text(i.label).appendTo(t)},_move:function(e,t){return this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(e)||this.menu.isLastItem()&&/^next/.test(e)?(this.isMultiLine||this._value(this.term),this.menu.blur(),void 0):(this.menu[e](t),void 0):(this.search(null,t),void 0)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(e,t){(!this.isMultiLine||this.menu.element.is(":visible"))&&(this._move(e,t),t.preventDefault())}}),e.extend(e.ui.autocomplete,{escapeRegex:function(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(t,i){var s=RegExp(e.ui.autocomplete.escapeRegex(i),"i");return e.grep(t,function(e){return s.test(e.label||e.value||e)})}}),e.widget("ui.autocomplete",e.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(e){return e+(e>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(t){var i;this._superApply(arguments),this.options.disabled||this.cancelSearch||(i=t&&t.length?this.options.messages.results(t.length):this.options.messages.noResults,this.liveRegion.children().hide(),e("<div>").text(i).appendTo(this.liveRegion))}}),e.ui.autocomplete;var c,p="ui-button ui-widget ui-state-default ui-corner-all",f="ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only",m=function(){var t=e(this);setTimeout(function(){t.find(":ui-button").button("refresh")},1)},g=function(t){var i=t.name,s=t.form,n=e([]);return i&&(i=i.replace(/'/g,"\\'"),n=s?e(s).find("[name='"+i+"'][type=radio]"):e("[name='"+i+"'][type=radio]",t.ownerDocument).filter(function(){return!this.form})),n};e.widget("ui.button",{version:"1.11.4",defaultElement:"<button>",options:{disabled:null,text:!0,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset"+this.eventNamespace).bind("reset"+this.eventNamespace,m),"boolean"!=typeof this.options.disabled?this.options.disabled=!!this.element.prop("disabled"):this.element.prop("disabled",this.options.disabled),this._determineButtonType(),this.hasTitle=!!this.buttonElement.attr("title");var t=this,i=this.options,s="checkbox"===this.type||"radio"===this.type,n=s?"":"ui-state-active";null===i.label&&(i.label="input"===this.type?this.buttonElement.val():this.buttonElement.html()),this._hoverable(this.buttonElement),this.buttonElement.addClass(p).attr("role","button").bind("mouseenter"+this.eventNamespace,function(){i.disabled||this===c&&e(this).addClass("ui-state-active")}).bind("mouseleave"+this.eventNamespace,function(){i.disabled||e(this).removeClass(n)}).bind("click"+this.eventNamespace,function(e){i.disabled&&(e.preventDefault(),e.stopImmediatePropagation())}),this._on({focus:function(){this.buttonElement.addClass("ui-state-focus")},blur:function(){this.buttonElement.removeClass("ui-state-focus")}}),s&&this.element.bind("change"+this.eventNamespace,function(){t.refresh()}),"checkbox"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){return i.disabled?!1:void 0}):"radio"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){if(i.disabled)return!1;e(this).addClass("ui-state-active"),t.buttonElement.attr("aria-pressed","true");var s=t.element[0];g(s).not(s).map(function(){return e(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed","false")}):(this.buttonElement.bind("mousedown"+this.eventNamespace,function(){return i.disabled?!1:(e(this).addClass("ui-state-active"),c=this,t.document.one("mouseup",function(){c=null}),void 0)}).bind("mouseup"+this.eventNamespace,function(){return i.disabled?!1:(e(this).removeClass("ui-state-active"),void 0)}).bind("keydown"+this.eventNamespace,function(t){return i.disabled?!1:((t.keyCode===e.ui.keyCode.SPACE||t.keyCode===e.ui.keyCode.ENTER)&&e(this).addClass("ui-state-active"),void 0)}).bind("keyup"+this.eventNamespace+" blur"+this.eventNamespace,function(){e(this).removeClass("ui-state-active")}),this.buttonElement.is("a")&&this.buttonElement.keyup(function(t){t.keyCode===e.ui.keyCode.SPACE&&e(this).click()})),this._setOption("disabled",i.disabled),this._resetButton()},_determineButtonType:function(){var e,t,i;this.type=this.element.is("[type=checkbox]")?"checkbox":this.element.is("[type=radio]")?"radio":this.element.is("input")?"input":"button","checkbox"===this.type||"radio"===this.type?(e=this.element.parents().last(),t="label[for='"+this.element.attr("id")+"']",this.buttonElement=e.find(t),this.buttonElement.length||(e=e.length?e.siblings():this.element.siblings(),this.buttonElement=e.filter(t),this.buttonElement.length||(this.buttonElement=e.find(t))),this.element.addClass("ui-helper-hidden-accessible"),i=this.element.is(":checked"),i&&this.buttonElement.addClass("ui-state-active"),this.buttonElement.prop("aria-pressed",i)):this.buttonElement=this.element},widget:function(){return this.buttonElement},_destroy:function(){this.element.removeClass("ui-helper-hidden-accessible"),this.buttonElement.removeClass(p+" ui-state-active "+f).removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html()),this.hasTitle||this.buttonElement.removeAttr("title")},_setOption:function(e,t){return this._super(e,t),"disabled"===e?(this.widget().toggleClass("ui-state-disabled",!!t),this.element.prop("disabled",!!t),t&&("checkbox"===this.type||"radio"===this.type?this.buttonElement.removeClass("ui-state-focus"):this.buttonElement.removeClass("ui-state-focus ui-state-active")),void 0):(this._resetButton(),void 0)},refresh:function(){var t=this.element.is("input, button")?this.element.is(":disabled"):this.element.hasClass("ui-button-disabled");t!==this.options.disabled&&this._setOption("disabled",t),"radio"===this.type?g(this.element[0]).each(function(){e(this).is(":checked")?e(this).button("widget").addClass("ui-state-active").attr("aria-pressed","true"):e(this).button("widget").removeClass("ui-state-active").attr("aria-pressed","false")}):"checkbox"===this.type&&(this.element.is(":checked")?this.buttonElement.addClass("ui-state-active").attr("aria-pressed","true"):this.buttonElement.removeClass("ui-state-active").attr("aria-pressed","false"))},_resetButton:function(){if("input"===this.type)return this.options.label&&this.element.val(this.options.label),void 0;var t=this.buttonElement.removeClass(f),i=e("<span></span>",this.document[0]).addClass("ui-button-text").html(this.options.label).appendTo(t.empty()).text(),s=this.options.icons,n=s.primary&&s.secondary,a=[];s.primary||s.secondary?(this.options.text&&a.push("ui-button-text-icon"+(n?"s":s.primary?"-primary":"-secondary")),s.primary&&t.prepend("<span class='ui-button-icon-primary ui-icon "+s.primary+"'></span>"),s.secondary&&t.append("<span class='ui-button-icon-secondary ui-icon "+s.secondary+"'></span>"),this.options.text||(a.push(n?"ui-button-icons-only":"ui-button-icon-only"),this.hasTitle||t.attr("title",e.trim(i)))):a.push("ui-button-text-only"),t.addClass(a.join(" "))}}),e.widget("ui.buttonset",{version:"1.11.4",options:{items:"button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(ui-button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(e,t){"disabled"===e&&this.buttons.button("option",e,t),this._super(e,t)},refresh:function(){var t="rtl"===this.element.css("direction"),i=this.element.find(this.options.items),s=i.filter(":ui-button");i.not(":ui-button").button(),s.button("refresh"),this.buttons=i.map(function(){return e(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(t?"ui-corner-right":"ui-corner-left").end().filter(":last").addClass(t?"ui-corner-left":"ui-corner-right").end().end()},_destroy:function(){this.element.removeClass("ui-buttonset"),this.buttons.map(function(){return e(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy")}}),e.ui.button,e.extend(e.ui,{datepicker:{version:"1.11.4"}});var v;e.extend(n.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(e){return r(this._defaults,e||{}),this},_attachDatepicker:function(t,i){var s,n,a;s=t.nodeName.toLowerCase(),n="div"===s||"span"===s,t.id||(this.uuid+=1,t.id="dp"+this.uuid),a=this._newInst(e(t),n),a.settings=e.extend({},i||{}),"input"===s?this._connectDatepicker(t,a):n&&this._inlineDatepicker(t,a)},_newInst:function(t,i){var s=t[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1");return{id:s,input:t,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:i,dpDiv:i?a(e("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")):this.dpDiv}},_connectDatepicker:function(t,i){var s=e(t);i.append=e([]),i.trigger=e([]),s.hasClass(this.markerClassName)||(this._attachments(s,i),s.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp),this._autoSize(i),e.data(t,"datepicker",i),i.settings.disabled&&this._disableDatepicker(t))},_attachments:function(t,i){var s,n,a,o=this._get(i,"appendText"),r=this._get(i,"isRTL");i.append&&i.append.remove(),o&&(i.append=e("<span class='"+this._appendClass+"'>"+o+"</span>"),t[r?"before":"after"](i.append)),t.unbind("focus",this._showDatepicker),i.trigger&&i.trigger.remove(),s=this._get(i,"showOn"),("focus"===s||"both"===s)&&t.focus(this._showDatepicker),("button"===s||"both"===s)&&(n=this._get(i,"buttonText"),a=this._get(i,"buttonImage"),i.trigger=e(this._get(i,"buttonImageOnly")?e("<img/>").addClass(this._triggerClass).attr({src:a,alt:n,title:n}):e("<button type='button'></button>").addClass(this._triggerClass).html(a?e("<img/>").attr({src:a,alt:n,title:n}):n)),t[r?"before":"after"](i.trigger),i.trigger.click(function(){return e.datepicker._datepickerShowing&&e.datepicker._lastInput===t[0]?e.datepicker._hideDatepicker():e.datepicker._datepickerShowing&&e.datepicker._lastInput!==t[0]?(e.datepicker._hideDatepicker(),e.datepicker._showDatepicker(t[0])):e.datepicker._showDatepicker(t[0]),!1}))},_autoSize:function(e){if(this._get(e,"autoSize")&&!e.inline){var t,i,s,n,a=new Date(2009,11,20),o=this._get(e,"dateFormat");o.match(/[DM]/)&&(t=function(e){for(i=0,s=0,n=0;e.length>n;n++)e[n].length>i&&(i=e[n].length,s=n);return s},a.setMonth(t(this._get(e,o.match(/MM/)?"monthNames":"monthNamesShort"))),a.setDate(t(this._get(e,o.match(/DD/)?"dayNames":"dayNamesShort"))+20-a.getDay())),e.input.attr("size",this._formatDate(e,a).length)}},_inlineDatepicker:function(t,i){var s=e(t);s.hasClass(this.markerClassName)||(s.addClass(this.markerClassName).append(i.dpDiv),e.data(t,"datepicker",i),this._setDate(i,this._getDefaultDate(i),!0),this._updateDatepicker(i),this._updateAlternate(i),i.settings.disabled&&this._disableDatepicker(t),i.dpDiv.css("display","block"))},_dialogDatepicker:function(t,i,s,n,a){var o,h,l,u,d,c=this._dialogInst;return c||(this.uuid+=1,o="dp"+this.uuid,this._dialogInput=e("<input type='text' id='"+o+"' style='position: absolute; top: -100px; width: 0px;'/>"),this._dialogInput.keydown(this._doKeyDown),e("body").append(this._dialogInput),c=this._dialogInst=this._newInst(this._dialogInput,!1),c.settings={},e.data(this._dialogInput[0],"datepicker",c)),r(c.settings,n||{}),i=i&&i.constructor===Date?this._formatDate(c,i):i,this._dialogInput.val(i),this._pos=a?a.length?a:[a.pageX,a.pageY]:null,this._pos||(h=document.documentElement.clientWidth,l=document.documentElement.clientHeight,u=document.documentElement.scrollLeft||document.body.scrollLeft,d=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[h/2-100+u,l/2-150+d]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),c.settings.onSelect=s,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),e.blockUI&&e.blockUI(this.dpDiv),e.data(this._dialogInput[0],"datepicker",c),this
},_destroyDatepicker:function(t){var i,s=e(t),n=e.data(t,"datepicker");s.hasClass(this.markerClassName)&&(i=t.nodeName.toLowerCase(),e.removeData(t,"datepicker"),"input"===i?(n.append.remove(),n.trigger.remove(),s.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)):("div"===i||"span"===i)&&s.removeClass(this.markerClassName).empty(),v===n&&(v=null))},_enableDatepicker:function(t){var i,s,n=e(t),a=e.data(t,"datepicker");n.hasClass(this.markerClassName)&&(i=t.nodeName.toLowerCase(),"input"===i?(t.disabled=!1,a.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):("div"===i||"span"===i)&&(s=n.children("."+this._inlineClass),s.children().removeClass("ui-state-disabled"),s.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=e.map(this._disabledInputs,function(e){return e===t?null:e}))},_disableDatepicker:function(t){var i,s,n=e(t),a=e.data(t,"datepicker");n.hasClass(this.markerClassName)&&(i=t.nodeName.toLowerCase(),"input"===i?(t.disabled=!0,a.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):("div"===i||"span"===i)&&(s=n.children("."+this._inlineClass),s.children().addClass("ui-state-disabled"),s.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=e.map(this._disabledInputs,function(e){return e===t?null:e}),this._disabledInputs[this._disabledInputs.length]=t)},_isDisabledDatepicker:function(e){if(!e)return!1;for(var t=0;this._disabledInputs.length>t;t++)if(this._disabledInputs[t]===e)return!0;return!1},_getInst:function(t){try{return e.data(t,"datepicker")}catch(i){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(t,i,s){var n,a,o,h,l=this._getInst(t);return 2===arguments.length&&"string"==typeof i?"defaults"===i?e.extend({},e.datepicker._defaults):l?"all"===i?e.extend({},l.settings):this._get(l,i):null:(n=i||{},"string"==typeof i&&(n={},n[i]=s),l&&(this._curInst===l&&this._hideDatepicker(),a=this._getDateDatepicker(t,!0),o=this._getMinMaxDate(l,"min"),h=this._getMinMaxDate(l,"max"),r(l.settings,n),null!==o&&void 0!==n.dateFormat&&void 0===n.minDate&&(l.settings.minDate=this._formatDate(l,o)),null!==h&&void 0!==n.dateFormat&&void 0===n.maxDate&&(l.settings.maxDate=this._formatDate(l,h)),"disabled"in n&&(n.disabled?this._disableDatepicker(t):this._enableDatepicker(t)),this._attachments(e(t),l),this._autoSize(l),this._setDate(l,a),this._updateAlternate(l),this._updateDatepicker(l)),void 0)},_changeDatepicker:function(e,t,i){this._optionDatepicker(e,t,i)},_refreshDatepicker:function(e){var t=this._getInst(e);t&&this._updateDatepicker(t)},_setDateDatepicker:function(e,t){var i=this._getInst(e);i&&(this._setDate(i,t),this._updateDatepicker(i),this._updateAlternate(i))},_getDateDatepicker:function(e,t){var i=this._getInst(e);return i&&!i.inline&&this._setDateFromField(i,t),i?this._getDate(i):null},_doKeyDown:function(t){var i,s,n,a=e.datepicker._getInst(t.target),o=!0,r=a.dpDiv.is(".ui-datepicker-rtl");if(a._keyEvent=!0,e.datepicker._datepickerShowing)switch(t.keyCode){case 9:e.datepicker._hideDatepicker(),o=!1;break;case 13:return n=e("td."+e.datepicker._dayOverClass+":not(."+e.datepicker._currentClass+")",a.dpDiv),n[0]&&e.datepicker._selectDay(t.target,a.selectedMonth,a.selectedYear,n[0]),i=e.datepicker._get(a,"onSelect"),i?(s=e.datepicker._formatDate(a),i.apply(a.input?a.input[0]:null,[s,a])):e.datepicker._hideDatepicker(),!1;case 27:e.datepicker._hideDatepicker();break;case 33:e.datepicker._adjustDate(t.target,t.ctrlKey?-e.datepicker._get(a,"stepBigMonths"):-e.datepicker._get(a,"stepMonths"),"M");break;case 34:e.datepicker._adjustDate(t.target,t.ctrlKey?+e.datepicker._get(a,"stepBigMonths"):+e.datepicker._get(a,"stepMonths"),"M");break;case 35:(t.ctrlKey||t.metaKey)&&e.datepicker._clearDate(t.target),o=t.ctrlKey||t.metaKey;break;case 36:(t.ctrlKey||t.metaKey)&&e.datepicker._gotoToday(t.target),o=t.ctrlKey||t.metaKey;break;case 37:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,r?1:-1,"D"),o=t.ctrlKey||t.metaKey,t.originalEvent.altKey&&e.datepicker._adjustDate(t.target,t.ctrlKey?-e.datepicker._get(a,"stepBigMonths"):-e.datepicker._get(a,"stepMonths"),"M");break;case 38:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,-7,"D"),o=t.ctrlKey||t.metaKey;break;case 39:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,r?-1:1,"D"),o=t.ctrlKey||t.metaKey,t.originalEvent.altKey&&e.datepicker._adjustDate(t.target,t.ctrlKey?+e.datepicker._get(a,"stepBigMonths"):+e.datepicker._get(a,"stepMonths"),"M");break;case 40:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,7,"D"),o=t.ctrlKey||t.metaKey;break;default:o=!1}else 36===t.keyCode&&t.ctrlKey?e.datepicker._showDatepicker(this):o=!1;o&&(t.preventDefault(),t.stopPropagation())},_doKeyPress:function(t){var i,s,n=e.datepicker._getInst(t.target);return e.datepicker._get(n,"constrainInput")?(i=e.datepicker._possibleChars(e.datepicker._get(n,"dateFormat")),s=String.fromCharCode(null==t.charCode?t.keyCode:t.charCode),t.ctrlKey||t.metaKey||" ">s||!i||i.indexOf(s)>-1):void 0},_doKeyUp:function(t){var i,s=e.datepicker._getInst(t.target);if(s.input.val()!==s.lastVal)try{i=e.datepicker.parseDate(e.datepicker._get(s,"dateFormat"),s.input?s.input.val():null,e.datepicker._getFormatConfig(s)),i&&(e.datepicker._setDateFromField(s),e.datepicker._updateAlternate(s),e.datepicker._updateDatepicker(s))}catch(n){}return!0},_showDatepicker:function(t){if(t=t.target||t,"input"!==t.nodeName.toLowerCase()&&(t=e("input",t.parentNode)[0]),!e.datepicker._isDisabledDatepicker(t)&&e.datepicker._lastInput!==t){var i,n,a,o,h,l,u;i=e.datepicker._getInst(t),e.datepicker._curInst&&e.datepicker._curInst!==i&&(e.datepicker._curInst.dpDiv.stop(!0,!0),i&&e.datepicker._datepickerShowing&&e.datepicker._hideDatepicker(e.datepicker._curInst.input[0])),n=e.datepicker._get(i,"beforeShow"),a=n?n.apply(t,[t,i]):{},a!==!1&&(r(i.settings,a),i.lastVal=null,e.datepicker._lastInput=t,e.datepicker._setDateFromField(i),e.datepicker._inDialog&&(t.value=""),e.datepicker._pos||(e.datepicker._pos=e.datepicker._findPos(t),e.datepicker._pos[1]+=t.offsetHeight),o=!1,e(t).parents().each(function(){return o|="fixed"===e(this).css("position"),!o}),h={left:e.datepicker._pos[0],top:e.datepicker._pos[1]},e.datepicker._pos=null,i.dpDiv.empty(),i.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),e.datepicker._updateDatepicker(i),h=e.datepicker._checkOffset(i,h,o),i.dpDiv.css({position:e.datepicker._inDialog&&e.blockUI?"static":o?"fixed":"absolute",display:"none",left:h.left+"px",top:h.top+"px"}),i.inline||(l=e.datepicker._get(i,"showAnim"),u=e.datepicker._get(i,"duration"),i.dpDiv.css("z-index",s(e(t))+1),e.datepicker._datepickerShowing=!0,e.effects&&e.effects.effect[l]?i.dpDiv.show(l,e.datepicker._get(i,"showOptions"),u):i.dpDiv[l||"show"](l?u:null),e.datepicker._shouldFocusInput(i)&&i.input.focus(),e.datepicker._curInst=i))}},_updateDatepicker:function(t){this.maxRows=4,v=t,t.dpDiv.empty().append(this._generateHTML(t)),this._attachHandlers(t);var i,s=this._getNumberOfMonths(t),n=s[1],a=17,r=t.dpDiv.find("."+this._dayOverClass+" a");r.length>0&&o.apply(r.get(0)),t.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),n>1&&t.dpDiv.addClass("ui-datepicker-multi-"+n).css("width",a*n+"em"),t.dpDiv[(1!==s[0]||1!==s[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),t.dpDiv[(this._get(t,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),t===e.datepicker._curInst&&e.datepicker._datepickerShowing&&e.datepicker._shouldFocusInput(t)&&t.input.focus(),t.yearshtml&&(i=t.yearshtml,setTimeout(function(){i===t.yearshtml&&t.yearshtml&&t.dpDiv.find("select.ui-datepicker-year:first").replaceWith(t.yearshtml),i=t.yearshtml=null},0))},_shouldFocusInput:function(e){return e.input&&e.input.is(":visible")&&!e.input.is(":disabled")&&!e.input.is(":focus")},_checkOffset:function(t,i,s){var n=t.dpDiv.outerWidth(),a=t.dpDiv.outerHeight(),o=t.input?t.input.outerWidth():0,r=t.input?t.input.outerHeight():0,h=document.documentElement.clientWidth+(s?0:e(document).scrollLeft()),l=document.documentElement.clientHeight+(s?0:e(document).scrollTop());return i.left-=this._get(t,"isRTL")?n-o:0,i.left-=s&&i.left===t.input.offset().left?e(document).scrollLeft():0,i.top-=s&&i.top===t.input.offset().top+r?e(document).scrollTop():0,i.left-=Math.min(i.left,i.left+n>h&&h>n?Math.abs(i.left+n-h):0),i.top-=Math.min(i.top,i.top+a>l&&l>a?Math.abs(a+r):0),i},_findPos:function(t){for(var i,s=this._getInst(t),n=this._get(s,"isRTL");t&&("hidden"===t.type||1!==t.nodeType||e.expr.filters.hidden(t));)t=t[n?"previousSibling":"nextSibling"];return i=e(t).offset(),[i.left,i.top]},_hideDatepicker:function(t){var i,s,n,a,o=this._curInst;!o||t&&o!==e.data(t,"datepicker")||this._datepickerShowing&&(i=this._get(o,"showAnim"),s=this._get(o,"duration"),n=function(){e.datepicker._tidyDialog(o)},e.effects&&(e.effects.effect[i]||e.effects[i])?o.dpDiv.hide(i,e.datepicker._get(o,"showOptions"),s,n):o.dpDiv["slideDown"===i?"slideUp":"fadeIn"===i?"fadeOut":"hide"](i?s:null,n),i||n(),this._datepickerShowing=!1,a=this._get(o,"onClose"),a&&a.apply(o.input?o.input[0]:null,[o.input?o.input.val():"",o]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),e.blockUI&&(e.unblockUI(),e("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(e){e.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(t){if(e.datepicker._curInst){var i=e(t.target),s=e.datepicker._getInst(i[0]);(i[0].id!==e.datepicker._mainDivId&&0===i.parents("#"+e.datepicker._mainDivId).length&&!i.hasClass(e.datepicker.markerClassName)&&!i.closest("."+e.datepicker._triggerClass).length&&e.datepicker._datepickerShowing&&(!e.datepicker._inDialog||!e.blockUI)||i.hasClass(e.datepicker.markerClassName)&&e.datepicker._curInst!==s)&&e.datepicker._hideDatepicker()}},_adjustDate:function(t,i,s){var n=e(t),a=this._getInst(n[0]);this._isDisabledDatepicker(n[0])||(this._adjustInstDate(a,i+("M"===s?this._get(a,"showCurrentAtPos"):0),s),this._updateDatepicker(a))},_gotoToday:function(t){var i,s=e(t),n=this._getInst(s[0]);this._get(n,"gotoCurrent")&&n.currentDay?(n.selectedDay=n.currentDay,n.drawMonth=n.selectedMonth=n.currentMonth,n.drawYear=n.selectedYear=n.currentYear):(i=new Date,n.selectedDay=i.getDate(),n.drawMonth=n.selectedMonth=i.getMonth(),n.drawYear=n.selectedYear=i.getFullYear()),this._notifyChange(n),this._adjustDate(s)},_selectMonthYear:function(t,i,s){var n=e(t),a=this._getInst(n[0]);a["selected"+("M"===s?"Month":"Year")]=a["draw"+("M"===s?"Month":"Year")]=parseInt(i.options[i.selectedIndex].value,10),this._notifyChange(a),this._adjustDate(n)},_selectDay:function(t,i,s,n){var a,o=e(t);e(n).hasClass(this._unselectableClass)||this._isDisabledDatepicker(o[0])||(a=this._getInst(o[0]),a.selectedDay=a.currentDay=e("a",n).html(),a.selectedMonth=a.currentMonth=i,a.selectedYear=a.currentYear=s,this._selectDate(t,this._formatDate(a,a.currentDay,a.currentMonth,a.currentYear)))},_clearDate:function(t){var i=e(t);this._selectDate(i,"")},_selectDate:function(t,i){var s,n=e(t),a=this._getInst(n[0]);i=null!=i?i:this._formatDate(a),a.input&&a.input.val(i),this._updateAlternate(a),s=this._get(a,"onSelect"),s?s.apply(a.input?a.input[0]:null,[i,a]):a.input&&a.input.trigger("change"),a.inline?this._updateDatepicker(a):(this._hideDatepicker(),this._lastInput=a.input[0],"object"!=typeof a.input[0]&&a.input.focus(),this._lastInput=null)},_updateAlternate:function(t){var i,s,n,a=this._get(t,"altField");a&&(i=this._get(t,"altFormat")||this._get(t,"dateFormat"),s=this._getDate(t),n=this.formatDate(i,s,this._getFormatConfig(t)),e(a).each(function(){e(this).val(n)}))},noWeekends:function(e){var t=e.getDay();return[t>0&&6>t,""]},iso8601Week:function(e){var t,i=new Date(e.getTime());return i.setDate(i.getDate()+4-(i.getDay()||7)),t=i.getTime(),i.setMonth(0),i.setDate(1),Math.floor(Math.round((t-i)/864e5)/7)+1},parseDate:function(t,i,s){if(null==t||null==i)throw"Invalid arguments";if(i="object"==typeof i?""+i:i+"",""===i)return null;var n,a,o,r,h=0,l=(s?s.shortYearCutoff:null)||this._defaults.shortYearCutoff,u="string"!=typeof l?l:(new Date).getFullYear()%100+parseInt(l,10),d=(s?s.dayNamesShort:null)||this._defaults.dayNamesShort,c=(s?s.dayNames:null)||this._defaults.dayNames,p=(s?s.monthNamesShort:null)||this._defaults.monthNamesShort,f=(s?s.monthNames:null)||this._defaults.monthNames,m=-1,g=-1,v=-1,y=-1,b=!1,_=function(e){var i=t.length>n+1&&t.charAt(n+1)===e;return i&&n++,i},x=function(e){var t=_(e),s="@"===e?14:"!"===e?20:"y"===e&&t?4:"o"===e?3:2,n="y"===e?s:1,a=RegExp("^\\d{"+n+","+s+"}"),o=i.substring(h).match(a);if(!o)throw"Missing number at position "+h;return h+=o[0].length,parseInt(o[0],10)},w=function(t,s,n){var a=-1,o=e.map(_(t)?n:s,function(e,t){return[[t,e]]}).sort(function(e,t){return-(e[1].length-t[1].length)});if(e.each(o,function(e,t){var s=t[1];return i.substr(h,s.length).toLowerCase()===s.toLowerCase()?(a=t[0],h+=s.length,!1):void 0}),-1!==a)return a+1;throw"Unknown name at position "+h},k=function(){if(i.charAt(h)!==t.charAt(n))throw"Unexpected literal at position "+h;h++};for(n=0;t.length>n;n++)if(b)"'"!==t.charAt(n)||_("'")?k():b=!1;else switch(t.charAt(n)){case"d":v=x("d");break;case"D":w("D",d,c);break;case"o":y=x("o");break;case"m":g=x("m");break;case"M":g=w("M",p,f);break;case"y":m=x("y");break;case"@":r=new Date(x("@")),m=r.getFullYear(),g=r.getMonth()+1,v=r.getDate();break;case"!":r=new Date((x("!")-this._ticksTo1970)/1e4),m=r.getFullYear(),g=r.getMonth()+1,v=r.getDate();break;case"'":_("'")?k():b=!0;break;default:k()}if(i.length>h&&(o=i.substr(h),!/^\s+/.test(o)))throw"Extra/unparsed characters found in date: "+o;if(-1===m?m=(new Date).getFullYear():100>m&&(m+=(new Date).getFullYear()-(new Date).getFullYear()%100+(u>=m?0:-100)),y>-1)for(g=1,v=y;;){if(a=this._getDaysInMonth(m,g-1),a>=v)break;g++,v-=a}if(r=this._daylightSavingAdjust(new Date(m,g-1,v)),r.getFullYear()!==m||r.getMonth()+1!==g||r.getDate()!==v)throw"Invalid date";return r},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:1e7*60*60*24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925)),formatDate:function(e,t,i){if(!t)return"";var s,n=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,a=(i?i.dayNames:null)||this._defaults.dayNames,o=(i?i.monthNamesShort:null)||this._defaults.monthNamesShort,r=(i?i.monthNames:null)||this._defaults.monthNames,h=function(t){var i=e.length>s+1&&e.charAt(s+1)===t;return i&&s++,i},l=function(e,t,i){var s=""+t;if(h(e))for(;i>s.length;)s="0"+s;return s},u=function(e,t,i,s){return h(e)?s[t]:i[t]},d="",c=!1;if(t)for(s=0;e.length>s;s++)if(c)"'"!==e.charAt(s)||h("'")?d+=e.charAt(s):c=!1;else switch(e.charAt(s)){case"d":d+=l("d",t.getDate(),2);break;case"D":d+=u("D",t.getDay(),n,a);break;case"o":d+=l("o",Math.round((new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime()-new Date(t.getFullYear(),0,0).getTime())/864e5),3);break;case"m":d+=l("m",t.getMonth()+1,2);break;case"M":d+=u("M",t.getMonth(),o,r);break;case"y":d+=h("y")?t.getFullYear():(10>t.getYear()%100?"0":"")+t.getYear()%100;break;case"@":d+=t.getTime();break;case"!":d+=1e4*t.getTime()+this._ticksTo1970;break;case"'":h("'")?d+="'":c=!0;break;default:d+=e.charAt(s)}return d},_possibleChars:function(e){var t,i="",s=!1,n=function(i){var s=e.length>t+1&&e.charAt(t+1)===i;return s&&t++,s};for(t=0;e.length>t;t++)if(s)"'"!==e.charAt(t)||n("'")?i+=e.charAt(t):s=!1;else switch(e.charAt(t)){case"d":case"m":case"y":case"@":i+="0123456789";break;case"D":case"M":return null;case"'":n("'")?i+="'":s=!0;break;default:i+=e.charAt(t)}return i},_get:function(e,t){return void 0!==e.settings[t]?e.settings[t]:this._defaults[t]},_setDateFromField:function(e,t){if(e.input.val()!==e.lastVal){var i=this._get(e,"dateFormat"),s=e.lastVal=e.input?e.input.val():null,n=this._getDefaultDate(e),a=n,o=this._getFormatConfig(e);try{a=this.parseDate(i,s,o)||n}catch(r){s=t?"":s}e.selectedDay=a.getDate(),e.drawMonth=e.selectedMonth=a.getMonth(),e.drawYear=e.selectedYear=a.getFullYear(),e.currentDay=s?a.getDate():0,e.currentMonth=s?a.getMonth():0,e.currentYear=s?a.getFullYear():0,this._adjustInstDate(e)}},_getDefaultDate:function(e){return this._restrictMinMax(e,this._determineDate(e,this._get(e,"defaultDate"),new Date))},_determineDate:function(t,i,s){var n=function(e){var t=new Date;return t.setDate(t.getDate()+e),t},a=function(i){try{return e.datepicker.parseDate(e.datepicker._get(t,"dateFormat"),i,e.datepicker._getFormatConfig(t))}catch(s){}for(var n=(i.toLowerCase().match(/^c/)?e.datepicker._getDate(t):null)||new Date,a=n.getFullYear(),o=n.getMonth(),r=n.getDate(),h=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,l=h.exec(i);l;){switch(l[2]||"d"){case"d":case"D":r+=parseInt(l[1],10);break;case"w":case"W":r+=7*parseInt(l[1],10);break;case"m":case"M":o+=parseInt(l[1],10),r=Math.min(r,e.datepicker._getDaysInMonth(a,o));break;case"y":case"Y":a+=parseInt(l[1],10),r=Math.min(r,e.datepicker._getDaysInMonth(a,o))}l=h.exec(i)}return new Date(a,o,r)},o=null==i||""===i?s:"string"==typeof i?a(i):"number"==typeof i?isNaN(i)?s:n(i):new Date(i.getTime());return o=o&&"Invalid Date"==""+o?s:o,o&&(o.setHours(0),o.setMinutes(0),o.setSeconds(0),o.setMilliseconds(0)),this._daylightSavingAdjust(o)},_daylightSavingAdjust:function(e){return e?(e.setHours(e.getHours()>12?e.getHours()+2:0),e):null},_setDate:function(e,t,i){var s=!t,n=e.selectedMonth,a=e.selectedYear,o=this._restrictMinMax(e,this._determineDate(e,t,new Date));e.selectedDay=e.currentDay=o.getDate(),e.drawMonth=e.selectedMonth=e.currentMonth=o.getMonth(),e.drawYear=e.selectedYear=e.currentYear=o.getFullYear(),n===e.selectedMonth&&a===e.selectedYear||i||this._notifyChange(e),this._adjustInstDate(e),e.input&&e.input.val(s?"":this._formatDate(e))},_getDate:function(e){var t=!e.currentYear||e.input&&""===e.input.val()?null:this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay));return t},_attachHandlers:function(t){var i=this._get(t,"stepMonths"),s="#"+t.id.replace(/\\\\/g,"\\");t.dpDiv.find("[data-handler]").map(function(){var t={prev:function(){e.datepicker._adjustDate(s,-i,"M")},next:function(){e.datepicker._adjustDate(s,+i,"M")},hide:function(){e.datepicker._hideDatepicker()},today:function(){e.datepicker._gotoToday(s)},selectDay:function(){return e.datepicker._selectDay(s,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return e.datepicker._selectMonthYear(s,this,"M"),!1},selectYear:function(){return e.datepicker._selectMonthYear(s,this,"Y"),!1}};e(this).bind(this.getAttribute("data-event"),t[this.getAttribute("data-handler")])})},_generateHTML:function(e){var t,i,s,n,a,o,r,h,l,u,d,c,p,f,m,g,v,y,b,_,x,w,k,T,D,S,M,C,N,A,P,I,H,z,F,E,O,j,W,L=new Date,R=this._daylightSavingAdjust(new Date(L.getFullYear(),L.getMonth(),L.getDate())),Y=this._get(e,"isRTL"),B=this._get(e,"showButtonPanel"),J=this._get(e,"hideIfNoPrevNext"),q=this._get(e,"navigationAsDateFormat"),K=this._getNumberOfMonths(e),V=this._get(e,"showCurrentAtPos"),U=this._get(e,"stepMonths"),Q=1!==K[0]||1!==K[1],G=this._daylightSavingAdjust(e.currentDay?new Date(e.currentYear,e.currentMonth,e.currentDay):new Date(9999,9,9)),X=this._getMinMaxDate(e,"min"),$=this._getMinMaxDate(e,"max"),Z=e.drawMonth-V,et=e.drawYear;if(0>Z&&(Z+=12,et--),$)for(t=this._daylightSavingAdjust(new Date($.getFullYear(),$.getMonth()-K[0]*K[1]+1,$.getDate())),t=X&&X>t?X:t;this._daylightSavingAdjust(new Date(et,Z,1))>t;)Z--,0>Z&&(Z=11,et--);for(e.drawMonth=Z,e.drawYear=et,i=this._get(e,"prevText"),i=q?this.formatDate(i,this._daylightSavingAdjust(new Date(et,Z-U,1)),this._getFormatConfig(e)):i,s=this._canAdjustMonth(e,-1,et,Z)?"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"e":"w")+"'>"+i+"</span></a>":J?"":"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"e":"w")+"'>"+i+"</span></a>",n=this._get(e,"nextText"),n=q?this.formatDate(n,this._daylightSavingAdjust(new Date(et,Z+U,1)),this._getFormatConfig(e)):n,a=this._canAdjustMonth(e,1,et,Z)?"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"w":"e")+"'>"+n+"</span></a>":J?"":"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"w":"e")+"'>"+n+"</span></a>",o=this._get(e,"currentText"),r=this._get(e,"gotoCurrent")&&e.currentDay?G:R,o=q?this.formatDate(o,r,this._getFormatConfig(e)):o,h=e.inline?"":"<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>"+this._get(e,"closeText")+"</button>",l=B?"<div class='ui-datepicker-buttonpane ui-widget-content'>"+(Y?h:"")+(this._isInRange(e,r)?"<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>"+o+"</button>":"")+(Y?"":h)+"</div>":"",u=parseInt(this._get(e,"firstDay"),10),u=isNaN(u)?0:u,d=this._get(e,"showWeek"),c=this._get(e,"dayNames"),p=this._get(e,"dayNamesMin"),f=this._get(e,"monthNames"),m=this._get(e,"monthNamesShort"),g=this._get(e,"beforeShowDay"),v=this._get(e,"showOtherMonths"),y=this._get(e,"selectOtherMonths"),b=this._getDefaultDate(e),_="",w=0;K[0]>w;w++){for(k="",this.maxRows=4,T=0;K[1]>T;T++){if(D=this._daylightSavingAdjust(new Date(et,Z,e.selectedDay)),S=" ui-corner-all",M="",Q){if(M+="<div class='ui-datepicker-group",K[1]>1)switch(T){case 0:M+=" ui-datepicker-group-first",S=" ui-corner-"+(Y?"right":"left");break;case K[1]-1:M+=" ui-datepicker-group-last",S=" ui-corner-"+(Y?"left":"right");break;default:M+=" ui-datepicker-group-middle",S=""}M+="'>"}for(M+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+S+"'>"+(/all|left/.test(S)&&0===w?Y?a:s:"")+(/all|right/.test(S)&&0===w?Y?s:a:"")+this._generateMonthYearHeader(e,Z,et,X,$,w>0||T>0,f,m)+"</div><table class='ui-datepicker-calendar'><thead>"+"<tr>",C=d?"<th class='ui-datepicker-week-col'>"+this._get(e,"weekHeader")+"</th>":"",x=0;7>x;x++)N=(x+u)%7,C+="<th scope='col'"+((x+u+6)%7>=5?" class='ui-datepicker-week-end'":"")+">"+"<span title='"+c[N]+"'>"+p[N]+"</span></th>";for(M+=C+"</tr></thead><tbody>",A=this._getDaysInMonth(et,Z),et===e.selectedYear&&Z===e.selectedMonth&&(e.selectedDay=Math.min(e.selectedDay,A)),P=(this._getFirstDayOfMonth(et,Z)-u+7)%7,I=Math.ceil((P+A)/7),H=Q?this.maxRows>I?this.maxRows:I:I,this.maxRows=H,z=this._daylightSavingAdjust(new Date(et,Z,1-P)),F=0;H>F;F++){for(M+="<tr>",E=d?"<td class='ui-datepicker-week-col'>"+this._get(e,"calculateWeek")(z)+"</td>":"",x=0;7>x;x++)O=g?g.apply(e.input?e.input[0]:null,[z]):[!0,""],j=z.getMonth()!==Z,W=j&&!y||!O[0]||X&&X>z||$&&z>$,E+="<td class='"+((x+u+6)%7>=5?" ui-datepicker-week-end":"")+(j?" ui-datepicker-other-month":"")+(z.getTime()===D.getTime()&&Z===e.selectedMonth&&e._keyEvent||b.getTime()===z.getTime()&&b.getTime()===D.getTime()?" "+this._dayOverClass:"")+(W?" "+this._unselectableClass+" ui-state-disabled":"")+(j&&!v?"":" "+O[1]+(z.getTime()===G.getTime()?" "+this._currentClass:"")+(z.getTime()===R.getTime()?" ui-datepicker-today":""))+"'"+(j&&!v||!O[2]?"":" title='"+O[2].replace(/'/g,"&#39;")+"'")+(W?"":" data-handler='selectDay' data-event='click' data-month='"+z.getMonth()+"' data-year='"+z.getFullYear()+"'")+">"+(j&&!v?"&#xa0;":W?"<span class='ui-state-default'>"+z.getDate()+"</span>":"<a class='ui-state-default"+(z.getTime()===R.getTime()?" ui-state-highlight":"")+(z.getTime()===G.getTime()?" ui-state-active":"")+(j?" ui-priority-secondary":"")+"' href='#'>"+z.getDate()+"</a>")+"</td>",z.setDate(z.getDate()+1),z=this._daylightSavingAdjust(z);M+=E+"</tr>"}Z++,Z>11&&(Z=0,et++),M+="</tbody></table>"+(Q?"</div>"+(K[0]>0&&T===K[1]-1?"<div class='ui-datepicker-row-break'></div>":""):""),k+=M}_+=k}return _+=l,e._keyEvent=!1,_},_generateMonthYearHeader:function(e,t,i,s,n,a,o,r){var h,l,u,d,c,p,f,m,g=this._get(e,"changeMonth"),v=this._get(e,"changeYear"),y=this._get(e,"showMonthAfterYear"),b="<div class='ui-datepicker-title'>",_="";if(a||!g)_+="<span class='ui-datepicker-month'>"+o[t]+"</span>";else{for(h=s&&s.getFullYear()===i,l=n&&n.getFullYear()===i,_+="<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>",u=0;12>u;u++)(!h||u>=s.getMonth())&&(!l||n.getMonth()>=u)&&(_+="<option value='"+u+"'"+(u===t?" selected='selected'":"")+">"+r[u]+"</option>");_+="</select>"}if(y||(b+=_+(!a&&g&&v?"":"&#xa0;")),!e.yearshtml)if(e.yearshtml="",a||!v)b+="<span class='ui-datepicker-year'>"+i+"</span>";else{for(d=this._get(e,"yearRange").split(":"),c=(new Date).getFullYear(),p=function(e){var t=e.match(/c[+\-].*/)?i+parseInt(e.substring(1),10):e.match(/[+\-].*/)?c+parseInt(e,10):parseInt(e,10);return isNaN(t)?c:t},f=p(d[0]),m=Math.max(f,p(d[1]||"")),f=s?Math.max(f,s.getFullYear()):f,m=n?Math.min(m,n.getFullYear()):m,e.yearshtml+="<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";m>=f;f++)e.yearshtml+="<option value='"+f+"'"+(f===i?" selected='selected'":"")+">"+f+"</option>";e.yearshtml+="</select>",b+=e.yearshtml,e.yearshtml=null}return b+=this._get(e,"yearSuffix"),y&&(b+=(!a&&g&&v?"":"&#xa0;")+_),b+="</div>"},_adjustInstDate:function(e,t,i){var s=e.drawYear+("Y"===i?t:0),n=e.drawMonth+("M"===i?t:0),a=Math.min(e.selectedDay,this._getDaysInMonth(s,n))+("D"===i?t:0),o=this._restrictMinMax(e,this._daylightSavingAdjust(new Date(s,n,a)));e.selectedDay=o.getDate(),e.drawMonth=e.selectedMonth=o.getMonth(),e.drawYear=e.selectedYear=o.getFullYear(),("M"===i||"Y"===i)&&this._notifyChange(e)},_restrictMinMax:function(e,t){var i=this._getMinMaxDate(e,"min"),s=this._getMinMaxDate(e,"max"),n=i&&i>t?i:t;return s&&n>s?s:n},_notifyChange:function(e){var t=this._get(e,"onChangeMonthYear");t&&t.apply(e.input?e.input[0]:null,[e.selectedYear,e.selectedMonth+1,e])},_getNumberOfMonths:function(e){var t=this._get(e,"numberOfMonths");return null==t?[1,1]:"number"==typeof t?[1,t]:t},_getMinMaxDate:function(e,t){return this._determineDate(e,this._get(e,t+"Date"),null)},_getDaysInMonth:function(e,t){return 32-this._daylightSavingAdjust(new Date(e,t,32)).getDate()},_getFirstDayOfMonth:function(e,t){return new Date(e,t,1).getDay()},_canAdjustMonth:function(e,t,i,s){var n=this._getNumberOfMonths(e),a=this._daylightSavingAdjust(new Date(i,s+(0>t?t:n[0]*n[1]),1));return 0>t&&a.setDate(this._getDaysInMonth(a.getFullYear(),a.getMonth())),this._isInRange(e,a)},_isInRange:function(e,t){var i,s,n=this._getMinMaxDate(e,"min"),a=this._getMinMaxDate(e,"max"),o=null,r=null,h=this._get(e,"yearRange");return h&&(i=h.split(":"),s=(new Date).getFullYear(),o=parseInt(i[0],10),r=parseInt(i[1],10),i[0].match(/[+\-].*/)&&(o+=s),i[1].match(/[+\-].*/)&&(r+=s)),(!n||t.getTime()>=n.getTime())&&(!a||t.getTime()<=a.getTime())&&(!o||t.getFullYear()>=o)&&(!r||r>=t.getFullYear())},_getFormatConfig:function(e){var t=this._get(e,"shortYearCutoff");return t="string"!=typeof t?t:(new Date).getFullYear()%100+parseInt(t,10),{shortYearCutoff:t,dayNamesShort:this._get(e,"dayNamesShort"),dayNames:this._get(e,"dayNames"),monthNamesShort:this._get(e,"monthNamesShort"),monthNames:this._get(e,"monthNames")}},_formatDate:function(e,t,i,s){t||(e.currentDay=e.selectedDay,e.currentMonth=e.selectedMonth,e.currentYear=e.selectedYear);var n=t?"object"==typeof t?t:this._daylightSavingAdjust(new Date(s,i,t)):this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay));return this.formatDate(this._get(e,"dateFormat"),n,this._getFormatConfig(e))}}),e.fn.datepicker=function(t){if(!this.length)return this;e.datepicker.initialized||(e(document).mousedown(e.datepicker._checkExternalClick),e.datepicker.initialized=!0),0===e("#"+e.datepicker._mainDivId).length&&e("body").append(e.datepicker.dpDiv);var i=Array.prototype.slice.call(arguments,1);return"string"!=typeof t||"isDisabled"!==t&&"getDate"!==t&&"widget"!==t?"option"===t&&2===arguments.length&&"string"==typeof arguments[1]?e.datepicker["_"+t+"Datepicker"].apply(e.datepicker,[this[0]].concat(i)):this.each(function(){"string"==typeof t?e.datepicker["_"+t+"Datepicker"].apply(e.datepicker,[this].concat(i)):e.datepicker._attachDatepicker(this,t)}):e.datepicker["_"+t+"Datepicker"].apply(e.datepicker,[this[0]].concat(i))},e.datepicker=new n,e.datepicker.initialized=!1,e.datepicker.uuid=(new Date).getTime(),e.datepicker.version="1.11.4",e.datepicker,e.widget("ui.dialog",{version:"1.11.4",options:{appendTo:"body",autoOpen:!0,buttons:[],closeOnEscape:!0,closeText:"Close",dialogClass:"",draggable:!0,hide:null,height:"auto",maxHeight:null,maxWidth:null,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",of:window,collision:"fit",using:function(t){var i=e(this).css(t).offset().top;0>i&&e(this).css("top",t.top-i)}},resizable:!0,show:null,title:null,width:300,beforeClose:null,close:null,drag:null,dragStart:null,dragStop:null,focus:null,open:null,resize:null,resizeStart:null,resizeStop:null},sizeRelatedOptions:{buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},resizableRelatedOptions:{maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0},_create:function(){this.originalCss={display:this.element[0].style.display,width:this.element[0].style.width,minHeight:this.element[0].style.minHeight,maxHeight:this.element[0].style.maxHeight,height:this.element[0].style.height},this.originalPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)},this.originalTitle=this.element.attr("title"),this.options.title=this.options.title||this.originalTitle,this._createWrapper(),this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(this.uiDialog),this._createTitlebar(),this._createButtonPane(),this.options.draggable&&e.fn.draggable&&this._makeDraggable(),this.options.resizable&&e.fn.resizable&&this._makeResizable(),this._isOpen=!1,this._trackFocus()},_init:function(){this.options.autoOpen&&this.open()},_appendTo:function(){var t=this.options.appendTo;return t&&(t.jquery||t.nodeType)?e(t):this.document.find(t||"body").eq(0)},_destroy:function(){var e,t=this.originalPosition;this._untrackInstance(),this._destroyOverlay(),this.element.removeUniqueId().removeClass("ui-dialog-content ui-widget-content").css(this.originalCss).detach(),this.uiDialog.stop(!0,!0).remove(),this.originalTitle&&this.element.attr("title",this.originalTitle),e=t.parent.children().eq(t.index),e.length&&e[0]!==this.element[0]?e.before(this.element):t.parent.append(this.element)},widget:function(){return this.uiDialog},disable:e.noop,enable:e.noop,close:function(t){var i,s=this;if(this._isOpen&&this._trigger("beforeClose",t)!==!1){if(this._isOpen=!1,this._focusedElement=null,this._destroyOverlay(),this._untrackInstance(),!this.opener.filter(":focusable").focus().length)try{i=this.document[0].activeElement,i&&"body"!==i.nodeName.toLowerCase()&&e(i).blur()}catch(n){}this._hide(this.uiDialog,this.options.hide,function(){s._trigger("close",t)})}},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(t,i){var s=!1,n=this.uiDialog.siblings(".ui-front:visible").map(function(){return+e(this).css("z-index")}).get(),a=Math.max.apply(null,n);return a>=+this.uiDialog.css("z-index")&&(this.uiDialog.css("z-index",a+1),s=!0),s&&!i&&this._trigger("focus",t),s},open:function(){var t=this;
return this._isOpen?(this._moveToTop()&&this._focusTabbable(),void 0):(this._isOpen=!0,this.opener=e(this.document[0].activeElement),this._size(),this._position(),this._createOverlay(),this._moveToTop(null,!0),this.overlay&&this.overlay.css("z-index",this.uiDialog.css("z-index")-1),this._show(this.uiDialog,this.options.show,function(){t._focusTabbable(),t._trigger("focus")}),this._makeFocusTarget(),this._trigger("open"),void 0)},_focusTabbable:function(){var e=this._focusedElement;e||(e=this.element.find("[autofocus]")),e.length||(e=this.element.find(":tabbable")),e.length||(e=this.uiDialogButtonPane.find(":tabbable")),e.length||(e=this.uiDialogTitlebarClose.filter(":tabbable")),e.length||(e=this.uiDialog),e.eq(0).focus()},_keepFocus:function(t){function i(){var t=this.document[0].activeElement,i=this.uiDialog[0]===t||e.contains(this.uiDialog[0],t);i||this._focusTabbable()}t.preventDefault(),i.call(this),this._delay(i)},_createWrapper:function(){this.uiDialog=e("<div>").addClass("ui-dialog ui-widget ui-widget-content ui-corner-all ui-front "+this.options.dialogClass).hide().attr({tabIndex:-1,role:"dialog"}).appendTo(this._appendTo()),this._on(this.uiDialog,{keydown:function(t){if(this.options.closeOnEscape&&!t.isDefaultPrevented()&&t.keyCode&&t.keyCode===e.ui.keyCode.ESCAPE)return t.preventDefault(),this.close(t),void 0;if(t.keyCode===e.ui.keyCode.TAB&&!t.isDefaultPrevented()){var i=this.uiDialog.find(":tabbable"),s=i.filter(":first"),n=i.filter(":last");t.target!==n[0]&&t.target!==this.uiDialog[0]||t.shiftKey?t.target!==s[0]&&t.target!==this.uiDialog[0]||!t.shiftKey||(this._delay(function(){n.focus()}),t.preventDefault()):(this._delay(function(){s.focus()}),t.preventDefault())}},mousedown:function(e){this._moveToTop(e)&&this._focusTabbable()}}),this.element.find("[aria-describedby]").length||this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})},_createTitlebar:function(){var t;this.uiDialogTitlebar=e("<div>").addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(this.uiDialog),this._on(this.uiDialogTitlebar,{mousedown:function(t){e(t.target).closest(".ui-dialog-titlebar-close")||this.uiDialog.focus()}}),this.uiDialogTitlebarClose=e("<button type='button'></button>").button({label:this.options.closeText,icons:{primary:"ui-icon-closethick"},text:!1}).addClass("ui-dialog-titlebar-close").appendTo(this.uiDialogTitlebar),this._on(this.uiDialogTitlebarClose,{click:function(e){e.preventDefault(),this.close(e)}}),t=e("<span>").uniqueId().addClass("ui-dialog-title").prependTo(this.uiDialogTitlebar),this._title(t),this.uiDialog.attr({"aria-labelledby":t.attr("id")})},_title:function(e){this.options.title||e.html("&#160;"),e.text(this.options.title)},_createButtonPane:function(){this.uiDialogButtonPane=e("<div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),this.uiButtonSet=e("<div>").addClass("ui-dialog-buttonset").appendTo(this.uiDialogButtonPane),this._createButtons()},_createButtons:function(){var t=this,i=this.options.buttons;return this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),e.isEmptyObject(i)||e.isArray(i)&&!i.length?(this.uiDialog.removeClass("ui-dialog-buttons"),void 0):(e.each(i,function(i,s){var n,a;s=e.isFunction(s)?{click:s,text:i}:s,s=e.extend({type:"button"},s),n=s.click,s.click=function(){n.apply(t.element[0],arguments)},a={icons:s.icons,text:s.showText},delete s.icons,delete s.showText,e("<button></button>",s).button(a).appendTo(t.uiButtonSet)}),this.uiDialog.addClass("ui-dialog-buttons"),this.uiDialogButtonPane.appendTo(this.uiDialog),void 0)},_makeDraggable:function(){function t(e){return{position:e.position,offset:e.offset}}var i=this,s=this.options;this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(s,n){e(this).addClass("ui-dialog-dragging"),i._blockFrames(),i._trigger("dragStart",s,t(n))},drag:function(e,s){i._trigger("drag",e,t(s))},stop:function(n,a){var o=a.offset.left-i.document.scrollLeft(),r=a.offset.top-i.document.scrollTop();s.position={my:"left top",at:"left"+(o>=0?"+":"")+o+" "+"top"+(r>=0?"+":"")+r,of:i.window},e(this).removeClass("ui-dialog-dragging"),i._unblockFrames(),i._trigger("dragStop",n,t(a))}})},_makeResizable:function(){function t(e){return{originalPosition:e.originalPosition,originalSize:e.originalSize,position:e.position,size:e.size}}var i=this,s=this.options,n=s.resizable,a=this.uiDialog.css("position"),o="string"==typeof n?n:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:s.maxWidth,maxHeight:s.maxHeight,minWidth:s.minWidth,minHeight:this._minHeight(),handles:o,start:function(s,n){e(this).addClass("ui-dialog-resizing"),i._blockFrames(),i._trigger("resizeStart",s,t(n))},resize:function(e,s){i._trigger("resize",e,t(s))},stop:function(n,a){var o=i.uiDialog.offset(),r=o.left-i.document.scrollLeft(),h=o.top-i.document.scrollTop();s.height=i.uiDialog.height(),s.width=i.uiDialog.width(),s.position={my:"left top",at:"left"+(r>=0?"+":"")+r+" "+"top"+(h>=0?"+":"")+h,of:i.window},e(this).removeClass("ui-dialog-resizing"),i._unblockFrames(),i._trigger("resizeStop",n,t(a))}}).css("position",a)},_trackFocus:function(){this._on(this.widget(),{focusin:function(t){this._makeFocusTarget(),this._focusedElement=e(t.target)}})},_makeFocusTarget:function(){this._untrackInstance(),this._trackingInstances().unshift(this)},_untrackInstance:function(){var t=this._trackingInstances(),i=e.inArray(this,t);-1!==i&&t.splice(i,1)},_trackingInstances:function(){var e=this.document.data("ui-dialog-instances");return e||(e=[],this.document.data("ui-dialog-instances",e)),e},_minHeight:function(){var e=this.options;return"auto"===e.height?e.minHeight:Math.min(e.minHeight,e.height)},_position:function(){var e=this.uiDialog.is(":visible");e||this.uiDialog.show(),this.uiDialog.position(this.options.position),e||this.uiDialog.hide()},_setOptions:function(t){var i=this,s=!1,n={};e.each(t,function(e,t){i._setOption(e,t),e in i.sizeRelatedOptions&&(s=!0),e in i.resizableRelatedOptions&&(n[e]=t)}),s&&(this._size(),this._position()),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option",n)},_setOption:function(e,t){var i,s,n=this.uiDialog;"dialogClass"===e&&n.removeClass(this.options.dialogClass).addClass(t),"disabled"!==e&&(this._super(e,t),"appendTo"===e&&this.uiDialog.appendTo(this._appendTo()),"buttons"===e&&this._createButtons(),"closeText"===e&&this.uiDialogTitlebarClose.button({label:""+t}),"draggable"===e&&(i=n.is(":data(ui-draggable)"),i&&!t&&n.draggable("destroy"),!i&&t&&this._makeDraggable()),"position"===e&&this._position(),"resizable"===e&&(s=n.is(":data(ui-resizable)"),s&&!t&&n.resizable("destroy"),s&&"string"==typeof t&&n.resizable("option","handles",t),s||t===!1||this._makeResizable()),"title"===e&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title")))},_size:function(){var e,t,i,s=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0}),s.minWidth>s.width&&(s.width=s.minWidth),e=this.uiDialog.css({height:"auto",width:s.width}).outerHeight(),t=Math.max(0,s.minHeight-e),i="number"==typeof s.maxHeight?Math.max(0,s.maxHeight-e):"none","auto"===s.height?this.element.css({minHeight:t,maxHeight:i,height:"auto"}):this.element.height(Math.max(0,s.height-e)),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map(function(){var t=e(this);return e("<div>").css({position:"absolute",width:t.outerWidth(),height:t.outerHeight()}).appendTo(t.parent()).offset(t.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_allowInteraction:function(t){return e(t.target).closest(".ui-dialog").length?!0:!!e(t.target).closest(".ui-datepicker").length},_createOverlay:function(){if(this.options.modal){var t=!0;this._delay(function(){t=!1}),this.document.data("ui-dialog-overlays")||this._on(this.document,{focusin:function(e){t||this._allowInteraction(e)||(e.preventDefault(),this._trackingInstances()[0]._focusTabbable())}}),this.overlay=e("<div>").addClass("ui-widget-overlay ui-front").appendTo(this._appendTo()),this._on(this.overlay,{mousedown:"_keepFocus"}),this.document.data("ui-dialog-overlays",(this.document.data("ui-dialog-overlays")||0)+1)}},_destroyOverlay:function(){if(this.options.modal&&this.overlay){var e=this.document.data("ui-dialog-overlays")-1;e?this.document.data("ui-dialog-overlays",e):this.document.unbind("focusin").removeData("ui-dialog-overlays"),this.overlay.remove(),this.overlay=null}}}),e.widget("ui.progressbar",{version:"1.11.4",options:{max:100,value:0,change:null,complete:null},min:0,_create:function(){this.oldValue=this.options.value=this._constrainedValue(),this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min}),this.valueDiv=e("<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>").appendTo(this.element),this._refreshValue()},_destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.valueDiv.remove()},value:function(e){return void 0===e?this.options.value:(this.options.value=this._constrainedValue(e),this._refreshValue(),void 0)},_constrainedValue:function(e){return void 0===e&&(e=this.options.value),this.indeterminate=e===!1,"number"!=typeof e&&(e=0),this.indeterminate?!1:Math.min(this.options.max,Math.max(this.min,e))},_setOptions:function(e){var t=e.value;delete e.value,this._super(e),this.options.value=this._constrainedValue(t),this._refreshValue()},_setOption:function(e,t){"max"===e&&(t=Math.max(this.min,t)),"disabled"===e&&this.element.toggleClass("ui-state-disabled",!!t).attr("aria-disabled",t),this._super(e,t)},_percentage:function(){return this.indeterminate?100:100*(this.options.value-this.min)/(this.options.max-this.min)},_refreshValue:function(){var t=this.options.value,i=this._percentage();this.valueDiv.toggle(this.indeterminate||t>this.min).toggleClass("ui-corner-right",t===this.options.max).width(i.toFixed(0)+"%"),this.element.toggleClass("ui-progressbar-indeterminate",this.indeterminate),this.indeterminate?(this.element.removeAttr("aria-valuenow"),this.overlayDiv||(this.overlayDiv=e("<div class='ui-progressbar-overlay'></div>").appendTo(this.valueDiv))):(this.element.attr({"aria-valuemax":this.options.max,"aria-valuenow":t}),this.overlayDiv&&(this.overlayDiv.remove(),this.overlayDiv=null)),this.oldValue!==t&&(this.oldValue=t,this._trigger("change")),t===this.options.max&&this._trigger("complete")}}),e.widget("ui.selectmenu",{version:"1.11.4",defaultElement:"<select>",options:{appendTo:null,disabled:null,icons:{button:"ui-icon-triangle-1-s"},position:{my:"left top",at:"left bottom",collision:"none"},width:null,change:null,close:null,focus:null,open:null,select:null},_create:function(){var e=this.element.uniqueId().attr("id");this.ids={element:e,button:e+"-button",menu:e+"-menu"},this._drawButton(),this._drawMenu(),this.options.disabled&&this.disable()},_drawButton:function(){var t=this;this.label=e("label[for='"+this.ids.element+"']").attr("for",this.ids.button),this._on(this.label,{click:function(e){this.button.focus(),e.preventDefault()}}),this.element.hide(),this.button=e("<span>",{"class":"ui-selectmenu-button ui-widget ui-state-default ui-corner-all",tabindex:this.options.disabled?-1:0,id:this.ids.button,role:"combobox","aria-expanded":"false","aria-autocomplete":"list","aria-owns":this.ids.menu,"aria-haspopup":"true"}).insertAfter(this.element),e("<span>",{"class":"ui-icon "+this.options.icons.button}).prependTo(this.button),this.buttonText=e("<span>",{"class":"ui-selectmenu-text"}).appendTo(this.button),this._setText(this.buttonText,this.element.find("option:selected").text()),this._resizeButton(),this._on(this.button,this._buttonEvents),this.button.one("focusin",function(){t.menuItems||t._refreshMenu()}),this._hoverable(this.button),this._focusable(this.button)},_drawMenu:function(){var t=this;this.menu=e("<ul>",{"aria-hidden":"true","aria-labelledby":this.ids.button,id:this.ids.menu}),this.menuWrap=e("<div>",{"class":"ui-selectmenu-menu ui-front"}).append(this.menu).appendTo(this._appendTo()),this.menuInstance=this.menu.menu({role:"listbox",select:function(e,i){e.preventDefault(),t._setSelection(),t._select(i.item.data("ui-selectmenu-item"),e)},focus:function(e,i){var s=i.item.data("ui-selectmenu-item");null!=t.focusIndex&&s.index!==t.focusIndex&&(t._trigger("focus",e,{item:s}),t.isOpen||t._select(s,e)),t.focusIndex=s.index,t.button.attr("aria-activedescendant",t.menuItems.eq(s.index).attr("id"))}}).menu("instance"),this.menu.addClass("ui-corner-bottom").removeClass("ui-corner-all"),this.menuInstance._off(this.menu,"mouseleave"),this.menuInstance._closeOnDocumentClick=function(){return!1},this.menuInstance._isDivider=function(){return!1}},refresh:function(){this._refreshMenu(),this._setText(this.buttonText,this._getSelectedItem().text()),this.options.width||this._resizeButton()},_refreshMenu:function(){this.menu.empty();var e,t=this.element.find("option");t.length&&(this._parseOptions(t),this._renderMenu(this.menu,this.items),this.menuInstance.refresh(),this.menuItems=this.menu.find("li").not(".ui-selectmenu-optgroup"),e=this._getSelectedItem(),this.menuInstance.focus(null,e),this._setAria(e.data("ui-selectmenu-item")),this._setOption("disabled",this.element.prop("disabled")))},open:function(e){this.options.disabled||(this.menuItems?(this.menu.find(".ui-state-focus").removeClass("ui-state-focus"),this.menuInstance.focus(null,this._getSelectedItem())):this._refreshMenu(),this.isOpen=!0,this._toggleAttr(),this._resizeMenu(),this._position(),this._on(this.document,this._documentClick),this._trigger("open",e))},_position:function(){this.menuWrap.position(e.extend({of:this.button},this.options.position))},close:function(e){this.isOpen&&(this.isOpen=!1,this._toggleAttr(),this.range=null,this._off(this.document),this._trigger("close",e))},widget:function(){return this.button},menuWidget:function(){return this.menu},_renderMenu:function(t,i){var s=this,n="";e.each(i,function(i,a){a.optgroup!==n&&(e("<li>",{"class":"ui-selectmenu-optgroup ui-menu-divider"+(a.element.parent("optgroup").prop("disabled")?" ui-state-disabled":""),text:a.optgroup}).appendTo(t),n=a.optgroup),s._renderItemData(t,a)})},_renderItemData:function(e,t){return this._renderItem(e,t).data("ui-selectmenu-item",t)},_renderItem:function(t,i){var s=e("<li>");return i.disabled&&s.addClass("ui-state-disabled"),this._setText(s,i.label),s.appendTo(t)},_setText:function(e,t){t?e.text(t):e.html("&#160;")},_move:function(e,t){var i,s,n=".ui-menu-item";this.isOpen?i=this.menuItems.eq(this.focusIndex):(i=this.menuItems.eq(this.element[0].selectedIndex),n+=":not(.ui-state-disabled)"),s="first"===e||"last"===e?i["first"===e?"prevAll":"nextAll"](n).eq(-1):i[e+"All"](n).eq(0),s.length&&this.menuInstance.focus(t,s)},_getSelectedItem:function(){return this.menuItems.eq(this.element[0].selectedIndex)},_toggle:function(e){this[this.isOpen?"close":"open"](e)},_setSelection:function(){var e;this.range&&(window.getSelection?(e=window.getSelection(),e.removeAllRanges(),e.addRange(this.range)):this.range.select(),this.button.focus())},_documentClick:{mousedown:function(t){this.isOpen&&(e(t.target).closest(".ui-selectmenu-menu, #"+this.ids.button).length||this.close(t))}},_buttonEvents:{mousedown:function(){var e;window.getSelection?(e=window.getSelection(),e.rangeCount&&(this.range=e.getRangeAt(0))):this.range=document.selection.createRange()},click:function(e){this._setSelection(),this._toggle(e)},keydown:function(t){var i=!0;switch(t.keyCode){case e.ui.keyCode.TAB:case e.ui.keyCode.ESCAPE:this.close(t),i=!1;break;case e.ui.keyCode.ENTER:this.isOpen&&this._selectFocusedItem(t);break;case e.ui.keyCode.UP:t.altKey?this._toggle(t):this._move("prev",t);break;case e.ui.keyCode.DOWN:t.altKey?this._toggle(t):this._move("next",t);break;case e.ui.keyCode.SPACE:this.isOpen?this._selectFocusedItem(t):this._toggle(t);break;case e.ui.keyCode.LEFT:this._move("prev",t);break;case e.ui.keyCode.RIGHT:this._move("next",t);break;case e.ui.keyCode.HOME:case e.ui.keyCode.PAGE_UP:this._move("first",t);break;case e.ui.keyCode.END:case e.ui.keyCode.PAGE_DOWN:this._move("last",t);break;default:this.menu.trigger(t),i=!1}i&&t.preventDefault()}},_selectFocusedItem:function(e){var t=this.menuItems.eq(this.focusIndex);t.hasClass("ui-state-disabled")||this._select(t.data("ui-selectmenu-item"),e)},_select:function(e,t){var i=this.element[0].selectedIndex;this.element[0].selectedIndex=e.index,this._setText(this.buttonText,e.label),this._setAria(e),this._trigger("select",t,{item:e}),e.index!==i&&this._trigger("change",t,{item:e}),this.close(t)},_setAria:function(e){var t=this.menuItems.eq(e.index).attr("id");this.button.attr({"aria-labelledby":t,"aria-activedescendant":t}),this.menu.attr("aria-activedescendant",t)},_setOption:function(e,t){"icons"===e&&this.button.find("span.ui-icon").removeClass(this.options.icons.button).addClass(t.button),this._super(e,t),"appendTo"===e&&this.menuWrap.appendTo(this._appendTo()),"disabled"===e&&(this.menuInstance.option("disabled",t),this.button.toggleClass("ui-state-disabled",t).attr("aria-disabled",t),this.element.prop("disabled",t),t?(this.button.attr("tabindex",-1),this.close()):this.button.attr("tabindex",0)),"width"===e&&this._resizeButton()},_appendTo:function(){var t=this.options.appendTo;return t&&(t=t.jquery||t.nodeType?e(t):this.document.find(t).eq(0)),t&&t[0]||(t=this.element.closest(".ui-front")),t.length||(t=this.document[0].body),t},_toggleAttr:function(){this.button.toggleClass("ui-corner-top",this.isOpen).toggleClass("ui-corner-all",!this.isOpen).attr("aria-expanded",this.isOpen),this.menuWrap.toggleClass("ui-selectmenu-open",this.isOpen),this.menu.attr("aria-hidden",!this.isOpen)},_resizeButton:function(){var e=this.options.width;e||(e=this.element.show().outerWidth(),this.element.hide()),this.button.outerWidth(e)},_resizeMenu:function(){this.menu.outerWidth(Math.max(this.button.outerWidth(),this.menu.width("").outerWidth()+1))},_getCreateOptions:function(){return{disabled:this.element.prop("disabled")}},_parseOptions:function(t){var i=[];t.each(function(t,s){var n=e(s),a=n.parent("optgroup");i.push({element:n,index:t,value:n.val(),label:n.text(),optgroup:a.attr("label")||"",disabled:a.prop("disabled")||n.prop("disabled")})}),this.items=i},_destroy:function(){this.menuWrap.remove(),this.button.remove(),this.element.show(),this.element.removeUniqueId(),this.label.attr("for",this.ids.element)}}),e.widget("ui.slider",e.ui.mouse,{version:"1.11.4",widgetEventPrefix:"slide",options:{animate:!1,distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},numPages:5,_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this._calculateNewMax(),this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget"+" ui-widget-content"+" ui-corner-all"),this._refresh(),this._setOption("disabled",this.options.disabled),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var t,i,s=this.options,n=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),a="<span class='ui-slider-handle ui-state-default ui-corner-all' tabindex='0'></span>",o=[];for(i=s.values&&s.values.length||1,n.length>i&&(n.slice(i).remove(),n=n.slice(0,i)),t=n.length;i>t;t++)o.push(a);this.handles=n.add(e(o.join("")).appendTo(this.element)),this.handle=this.handles.eq(0),this.handles.each(function(t){e(this).data("ui-slider-handle-index",t)})},_createRange:function(){var t=this.options,i="";t.range?(t.range===!0&&(t.values?t.values.length&&2!==t.values.length?t.values=[t.values[0],t.values[0]]:e.isArray(t.values)&&(t.values=t.values.slice(0)):t.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?this.range.removeClass("ui-slider-range-min ui-slider-range-max").css({left:"",bottom:""}):(this.range=e("<div></div>").appendTo(this.element),i="ui-slider-range ui-widget-header ui-corner-all"),this.range.addClass(i+("min"===t.range||"max"===t.range?" ui-slider-range-"+t.range:""))):(this.range&&this.range.remove(),this.range=null)},_setupEvents:function(){this._off(this.handles),this._on(this.handles,this._handleEvents),this._hoverable(this.handles),this._focusable(this.handles)},_destroy:function(){this.handles.remove(),this.range&&this.range.remove(),this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-widget ui-widget-content ui-corner-all"),this._mouseDestroy()},_mouseCapture:function(t){var i,s,n,a,o,r,h,l,u=this,d=this.options;return d.disabled?!1:(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),i={x:t.pageX,y:t.pageY},s=this._normValueFromMouse(i),n=this._valueMax()-this._valueMin()+1,this.handles.each(function(t){var i=Math.abs(s-u.values(t));(n>i||n===i&&(t===u._lastChangedValue||u.values(t)===d.min))&&(n=i,a=e(this),o=t)}),r=this._start(t,o),r===!1?!1:(this._mouseSliding=!0,this._handleIndex=o,a.addClass("ui-state-active").focus(),h=a.offset(),l=!e(t.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=l?{left:0,top:0}:{left:t.pageX-h.left-a.width()/2,top:t.pageY-h.top-a.height()/2-(parseInt(a.css("borderTopWidth"),10)||0)-(parseInt(a.css("borderBottomWidth"),10)||0)+(parseInt(a.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(t,o,s),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(e){var t={x:e.pageX,y:e.pageY},i=this._normValueFromMouse(t);return this._slide(e,this._handleIndex,i),!1},_mouseStop:function(e){return this.handles.removeClass("ui-state-active"),this._mouseSliding=!1,this._stop(e,this._handleIndex),this._change(e,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(e){var t,i,s,n,a;return"horizontal"===this.orientation?(t=this.elementSize.width,i=e.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(t=this.elementSize.height,i=e.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),s=i/t,s>1&&(s=1),0>s&&(s=0),"vertical"===this.orientation&&(s=1-s),n=this._valueMax()-this._valueMin(),a=this._valueMin()+s*n,this._trimAlignValue(a)},_start:function(e,t){var i={handle:this.handles[t],value:this.value()};return this.options.values&&this.options.values.length&&(i.value=this.values(t),i.values=this.values()),this._trigger("start",e,i)},_slide:function(e,t,i){var s,n,a;this.options.values&&this.options.values.length?(s=this.values(t?0:1),2===this.options.values.length&&this.options.range===!0&&(0===t&&i>s||1===t&&s>i)&&(i=s),i!==this.values(t)&&(n=this.values(),n[t]=i,a=this._trigger("slide",e,{handle:this.handles[t],value:i,values:n}),s=this.values(t?0:1),a!==!1&&this.values(t,i))):i!==this.value()&&(a=this._trigger("slide",e,{handle:this.handles[t],value:i}),a!==!1&&this.value(i))},_stop:function(e,t){var i={handle:this.handles[t],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(t),i.values=this.values()),this._trigger("stop",e,i)},_change:function(e,t){if(!this._keySliding&&!this._mouseSliding){var i={handle:this.handles[t],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(t),i.values=this.values()),this._lastChangedValue=t,this._trigger("change",e,i)}},value:function(e){return arguments.length?(this.options.value=this._trimAlignValue(e),this._refreshValue(),this._change(null,0),void 0):this._value()},values:function(t,i){var s,n,a;if(arguments.length>1)return this.options.values[t]=this._trimAlignValue(i),this._refreshValue(),this._change(null,t),void 0;if(!arguments.length)return this._values();if(!e.isArray(arguments[0]))return this.options.values&&this.options.values.length?this._values(t):this.value();for(s=this.options.values,n=arguments[0],a=0;s.length>a;a+=1)s[a]=this._trimAlignValue(n[a]),this._change(null,a);this._refreshValue()},_setOption:function(t,i){var s,n=0;switch("range"===t&&this.options.range===!0&&("min"===i?(this.options.value=this._values(0),this.options.values=null):"max"===i&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),e.isArray(this.options.values)&&(n=this.options.values.length),"disabled"===t&&this.element.toggleClass("ui-state-disabled",!!i),this._super(t,i),t){case"orientation":this._detectOrientation(),this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation),this._refreshValue(),this.handles.css("horizontal"===i?"bottom":"left","");break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),s=0;n>s;s+=1)this._change(null,s);this._animateOff=!1;break;case"step":case"min":case"max":this._animateOff=!0,this._calculateNewMax(),this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_value:function(){var e=this.options.value;return e=this._trimAlignValue(e)},_values:function(e){var t,i,s;if(arguments.length)return t=this.options.values[e],t=this._trimAlignValue(t);if(this.options.values&&this.options.values.length){for(i=this.options.values.slice(),s=0;i.length>s;s+=1)i[s]=this._trimAlignValue(i[s]);return i}return[]},_trimAlignValue:function(e){if(this._valueMin()>=e)return this._valueMin();if(e>=this._valueMax())return this._valueMax();var t=this.options.step>0?this.options.step:1,i=(e-this._valueMin())%t,s=e-i;return 2*Math.abs(i)>=t&&(s+=i>0?t:-t),parseFloat(s.toFixed(5))},_calculateNewMax:function(){var e=this.options.max,t=this._valueMin(),i=this.options.step,s=Math.floor(+(e-t).toFixed(this._precision())/i)*i;e=s+t,this.max=parseFloat(e.toFixed(this._precision()))},_precision:function(){var e=this._precisionOf(this.options.step);return null!==this.options.min&&(e=Math.max(e,this._precisionOf(this.options.min))),e},_precisionOf:function(e){var t=""+e,i=t.indexOf(".");return-1===i?0:t.length-i-1},_valueMin:function(){return this.options.min},_valueMax:function(){return this.max},_refreshValue:function(){var t,i,s,n,a,o=this.options.range,r=this.options,h=this,l=this._animateOff?!1:r.animate,u={};this.options.values&&this.options.values.length?this.handles.each(function(s){i=100*((h.values(s)-h._valueMin())/(h._valueMax()-h._valueMin())),u["horizontal"===h.orientation?"left":"bottom"]=i+"%",e(this).stop(1,1)[l?"animate":"css"](u,r.animate),h.options.range===!0&&("horizontal"===h.orientation?(0===s&&h.range.stop(1,1)[l?"animate":"css"]({left:i+"%"},r.animate),1===s&&h.range[l?"animate":"css"]({width:i-t+"%"},{queue:!1,duration:r.animate})):(0===s&&h.range.stop(1,1)[l?"animate":"css"]({bottom:i+"%"},r.animate),1===s&&h.range[l?"animate":"css"]({height:i-t+"%"},{queue:!1,duration:r.animate}))),t=i}):(s=this.value(),n=this._valueMin(),a=this._valueMax(),i=a!==n?100*((s-n)/(a-n)):0,u["horizontal"===this.orientation?"left":"bottom"]=i+"%",this.handle.stop(1,1)[l?"animate":"css"](u,r.animate),"min"===o&&"horizontal"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({width:i+"%"},r.animate),"max"===o&&"horizontal"===this.orientation&&this.range[l?"animate":"css"]({width:100-i+"%"},{queue:!1,duration:r.animate}),"min"===o&&"vertical"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({height:i+"%"},r.animate),"max"===o&&"vertical"===this.orientation&&this.range[l?"animate":"css"]({height:100-i+"%"},{queue:!1,duration:r.animate}))},_handleEvents:{keydown:function(t){var i,s,n,a,o=e(t.target).data("ui-slider-handle-index");switch(t.keyCode){case e.ui.keyCode.HOME:case e.ui.keyCode.END:case e.ui.keyCode.PAGE_UP:case e.ui.keyCode.PAGE_DOWN:case e.ui.keyCode.UP:case e.ui.keyCode.RIGHT:case e.ui.keyCode.DOWN:case e.ui.keyCode.LEFT:if(t.preventDefault(),!this._keySliding&&(this._keySliding=!0,e(t.target).addClass("ui-state-active"),i=this._start(t,o),i===!1))return}switch(a=this.options.step,s=n=this.options.values&&this.options.values.length?this.values(o):this.value(),t.keyCode){case e.ui.keyCode.HOME:n=this._valueMin();break;case e.ui.keyCode.END:n=this._valueMax();break;case e.ui.keyCode.PAGE_UP:n=this._trimAlignValue(s+(this._valueMax()-this._valueMin())/this.numPages);break;case e.ui.keyCode.PAGE_DOWN:n=this._trimAlignValue(s-(this._valueMax()-this._valueMin())/this.numPages);break;case e.ui.keyCode.UP:case e.ui.keyCode.RIGHT:if(s===this._valueMax())return;n=this._trimAlignValue(s+a);break;case e.ui.keyCode.DOWN:case e.ui.keyCode.LEFT:if(s===this._valueMin())return;n=this._trimAlignValue(s-a)}this._slide(t,o,n)},keyup:function(t){var i=e(t.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(t,i),this._change(t,i),e(t.target).removeClass("ui-state-active"))}}}),e.widget("ui.spinner",{version:"1.11.4",defaultElement:"<input>",widgetEventPrefix:"spin",options:{culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-n"},incremental:!0,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption("max",this.options.max),this._setOption("min",this.options.min),this._setOption("step",this.options.step),""!==this.value()&&this._value(this.element.val(),!0),this._draw(),this._on(this._events),this._refresh(),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_getCreateOptions:function(){var t={},i=this.element;return e.each(["min","max","step"],function(e,s){var n=i.attr(s);void 0!==n&&n.length&&(t[s]=n)}),t},_events:{keydown:function(e){this._start(e)&&this._keydown(e)&&e.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(e){return this.cancelBlur?(delete this.cancelBlur,void 0):(this._stop(),this._refresh(),this.previous!==this.element.val()&&this._trigger("change",e),void 0)},mousewheel:function(e,t){if(t){if(!this.spinning&&!this._start(e))return!1;this._spin((t>0?1:-1)*this.options.step,e),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(e)},100),e.preventDefault()}},"mousedown .ui-spinner-button":function(t){function i(){var e=this.element[0]===this.document[0].activeElement;e||(this.element.focus(),this.previous=s,this._delay(function(){this.previous=s}))}var s;s=this.element[0]===this.document[0].activeElement?this.previous:this.element.val(),t.preventDefault(),i.call(this),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,i.call(this)}),this._start(t)!==!1&&this._repeat(null,e(t.currentTarget).hasClass("ui-spinner-up")?1:-1,t)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(t){return e(t.currentTarget).hasClass("ui-state-active")?this._start(t)===!1?!1:(this._repeat(null,e(t.currentTarget).hasClass("ui-spinner-up")?1:-1,t),void 0):void 0},"mouseleave .ui-spinner-button":"_stop"},_draw:function(){var e=this.uiSpinner=this.element.addClass("ui-spinner-input").attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml());this.element.attr("role","spinbutton"),this.buttons=e.find(".ui-spinner-button").attr("tabIndex",-1).button().removeClass("ui-corner-all"),this.buttons.height()>Math.ceil(.5*e.height())&&e.height()>0&&e.height(e.height()),this.options.disabled&&this.disable()
},_keydown:function(t){var i=this.options,s=e.ui.keyCode;switch(t.keyCode){case s.UP:return this._repeat(null,1,t),!0;case s.DOWN:return this._repeat(null,-1,t),!0;case s.PAGE_UP:return this._repeat(null,i.page,t),!0;case s.PAGE_DOWN:return this._repeat(null,-i.page,t),!0}return!1},_uiSpinnerHtml:function(){return"<span class='ui-spinner ui-widget ui-widget-content ui-corner-all'></span>"},_buttonHtml:function(){return"<a class='ui-spinner-button ui-spinner-up ui-corner-tr'><span class='ui-icon "+this.options.icons.up+"'>&#9650;</span>"+"</a>"+"<a class='ui-spinner-button ui-spinner-down ui-corner-br'>"+"<span class='ui-icon "+this.options.icons.down+"'>&#9660;</span>"+"</a>"},_start:function(e){return this.spinning||this._trigger("start",e)!==!1?(this.counter||(this.counter=1),this.spinning=!0,!0):!1},_repeat:function(e,t,i){e=e||500,clearTimeout(this.timer),this.timer=this._delay(function(){this._repeat(40,t,i)},e),this._spin(t*this.options.step,i)},_spin:function(e,t){var i=this.value()||0;this.counter||(this.counter=1),i=this._adjustValue(i+e*this._increment(this.counter)),this.spinning&&this._trigger("spin",t,{value:i})===!1||(this._value(i),this.counter++)},_increment:function(t){var i=this.options.incremental;return i?e.isFunction(i)?i(t):Math.floor(t*t*t/5e4-t*t/500+17*t/200+1):1},_precision:function(){var e=this._precisionOf(this.options.step);return null!==this.options.min&&(e=Math.max(e,this._precisionOf(this.options.min))),e},_precisionOf:function(e){var t=""+e,i=t.indexOf(".");return-1===i?0:t.length-i-1},_adjustValue:function(e){var t,i,s=this.options;return t=null!==s.min?s.min:0,i=e-t,i=Math.round(i/s.step)*s.step,e=t+i,e=parseFloat(e.toFixed(this._precision())),null!==s.max&&e>s.max?s.max:null!==s.min&&s.min>e?s.min:e},_stop:function(e){this.spinning&&(clearTimeout(this.timer),clearTimeout(this.mousewheelTimer),this.counter=0,this.spinning=!1,this._trigger("stop",e))},_setOption:function(e,t){if("culture"===e||"numberFormat"===e){var i=this._parse(this.element.val());return this.options[e]=t,this.element.val(this._format(i)),void 0}("max"===e||"min"===e||"step"===e)&&"string"==typeof t&&(t=this._parse(t)),"icons"===e&&(this.buttons.first().find(".ui-icon").removeClass(this.options.icons.up).addClass(t.up),this.buttons.last().find(".ui-icon").removeClass(this.options.icons.down).addClass(t.down)),this._super(e,t),"disabled"===e&&(this.widget().toggleClass("ui-state-disabled",!!t),this.element.prop("disabled",!!t),this.buttons.button(t?"disable":"enable"))},_setOptions:h(function(e){this._super(e)}),_parse:function(e){return"string"==typeof e&&""!==e&&(e=window.Globalize&&this.options.numberFormat?Globalize.parseFloat(e,10,this.options.culture):+e),""===e||isNaN(e)?null:e},_format:function(e){return""===e?"":window.Globalize&&this.options.numberFormat?Globalize.format(e,this.options.numberFormat,this.options.culture):e},_refresh:function(){this.element.attr({"aria-valuemin":this.options.min,"aria-valuemax":this.options.max,"aria-valuenow":this._parse(this.element.val())})},isValid:function(){var e=this.value();return null===e?!1:e===this._adjustValue(e)},_value:function(e,t){var i;""!==e&&(i=this._parse(e),null!==i&&(t||(i=this._adjustValue(i)),e=this._format(i))),this.element.val(e),this._refresh()},_destroy:function(){this.element.removeClass("ui-spinner-input").prop("disabled",!1).removeAttr("autocomplete").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.uiSpinner.replaceWith(this.element)},stepUp:h(function(e){this._stepUp(e)}),_stepUp:function(e){this._start()&&(this._spin((e||1)*this.options.step),this._stop())},stepDown:h(function(e){this._stepDown(e)}),_stepDown:function(e){this._start()&&(this._spin((e||1)*-this.options.step),this._stop())},pageUp:h(function(e){this._stepUp((e||1)*this.options.page)}),pageDown:h(function(e){this._stepDown((e||1)*this.options.page)}),value:function(e){return arguments.length?(h(this._value).call(this,e),void 0):this._parse(this.element.val())},widget:function(){return this.uiSpinner}}),e.widget("ui.tabs",{version:"1.11.4",delay:300,options:{active:null,collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_isLocal:function(){var e=/#.*$/;return function(t){var i,s;t=t.cloneNode(!1),i=t.href.replace(e,""),s=location.href.replace(e,"");try{i=decodeURIComponent(i)}catch(n){}try{s=decodeURIComponent(s)}catch(n){}return t.hash.length>1&&i===s}}(),_create:function(){var t=this,i=this.options;this.running=!1,this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all").toggleClass("ui-tabs-collapsible",i.collapsible),this._processTabs(),i.active=this._initialActive(),e.isArray(i.disabled)&&(i.disabled=e.unique(i.disabled.concat(e.map(this.tabs.filter(".ui-state-disabled"),function(e){return t.tabs.index(e)}))).sort()),this.active=this.options.active!==!1&&this.anchors.length?this._findActive(i.active):e(),this._refresh(),this.active.length&&this.load(i.active)},_initialActive:function(){var t=this.options.active,i=this.options.collapsible,s=location.hash.substring(1);return null===t&&(s&&this.tabs.each(function(i,n){return e(n).attr("aria-controls")===s?(t=i,!1):void 0}),null===t&&(t=this.tabs.index(this.tabs.filter(".ui-tabs-active"))),(null===t||-1===t)&&(t=this.tabs.length?0:!1)),t!==!1&&(t=this.tabs.index(this.tabs.eq(t)),-1===t&&(t=i?!1:0)),!i&&t===!1&&this.anchors.length&&(t=0),t},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):e()}},_tabKeydown:function(t){var i=e(this.document[0].activeElement).closest("li"),s=this.tabs.index(i),n=!0;if(!this._handlePageNav(t)){switch(t.keyCode){case e.ui.keyCode.RIGHT:case e.ui.keyCode.DOWN:s++;break;case e.ui.keyCode.UP:case e.ui.keyCode.LEFT:n=!1,s--;break;case e.ui.keyCode.END:s=this.anchors.length-1;break;case e.ui.keyCode.HOME:s=0;break;case e.ui.keyCode.SPACE:return t.preventDefault(),clearTimeout(this.activating),this._activate(s),void 0;case e.ui.keyCode.ENTER:return t.preventDefault(),clearTimeout(this.activating),this._activate(s===this.options.active?!1:s),void 0;default:return}t.preventDefault(),clearTimeout(this.activating),s=this._focusNextTab(s,n),t.ctrlKey||t.metaKey||(i.attr("aria-selected","false"),this.tabs.eq(s).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",s)},this.delay))}},_panelKeydown:function(t){this._handlePageNav(t)||t.ctrlKey&&t.keyCode===e.ui.keyCode.UP&&(t.preventDefault(),this.active.focus())},_handlePageNav:function(t){return t.altKey&&t.keyCode===e.ui.keyCode.PAGE_UP?(this._activate(this._focusNextTab(this.options.active-1,!1)),!0):t.altKey&&t.keyCode===e.ui.keyCode.PAGE_DOWN?(this._activate(this._focusNextTab(this.options.active+1,!0)),!0):void 0},_findNextTab:function(t,i){function s(){return t>n&&(t=0),0>t&&(t=n),t}for(var n=this.tabs.length-1;-1!==e.inArray(s(),this.options.disabled);)t=i?t+1:t-1;return t},_focusNextTab:function(e,t){return e=this._findNextTab(e,t),this.tabs.eq(e).focus(),e},_setOption:function(e,t){return"active"===e?(this._activate(t),void 0):"disabled"===e?(this._setupDisabled(t),void 0):(this._super(e,t),"collapsible"===e&&(this.element.toggleClass("ui-tabs-collapsible",t),t||this.options.active!==!1||this._activate(0)),"event"===e&&this._setupEvents(t),"heightStyle"===e&&this._setupHeightStyle(t),void 0)},_sanitizeSelector:function(e){return e?e.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var t=this.options,i=this.tablist.children(":has(a[href])");t.disabled=e.map(i.filter(".ui-state-disabled"),function(e){return i.index(e)}),this._processTabs(),t.active!==!1&&this.anchors.length?this.active.length&&!e.contains(this.tablist[0],this.active[0])?this.tabs.length===t.disabled.length?(t.active=!1,this.active=e()):this._activate(this._findNextTab(Math.max(0,t.active-1),!1)):t.active=this.tabs.index(this.active):(t.active=!1,this.active=e()),this._refresh()},_refresh:function(){this._setupDisabled(this.options.disabled),this._setupEvents(this.options.event),this._setupHeightStyle(this.options.heightStyle),this.tabs.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-hidden":"true"}),this.active.length?(this.active.addClass("ui-tabs-active ui-state-active").attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}),this._getPanelForTab(this.active).show().attr({"aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var t=this,i=this.tabs,s=this.anchors,n=this.panels;this.tablist=this._getList().addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").attr("role","tablist").delegate("> li","mousedown"+this.eventNamespace,function(t){e(this).is(".ui-state-disabled")&&t.preventDefault()}).delegate(".ui-tabs-anchor","focus"+this.eventNamespace,function(){e(this).closest("li").is(".ui-state-disabled")&&this.blur()}),this.tabs=this.tablist.find("> li:has(a[href])").addClass("ui-state-default ui-corner-top").attr({role:"tab",tabIndex:-1}),this.anchors=this.tabs.map(function(){return e("a",this)[0]}).addClass("ui-tabs-anchor").attr({role:"presentation",tabIndex:-1}),this.panels=e(),this.anchors.each(function(i,s){var n,a,o,r=e(s).uniqueId().attr("id"),h=e(s).closest("li"),l=h.attr("aria-controls");t._isLocal(s)?(n=s.hash,o=n.substring(1),a=t.element.find(t._sanitizeSelector(n))):(o=h.attr("aria-controls")||e({}).uniqueId()[0].id,n="#"+o,a=t.element.find(n),a.length||(a=t._createPanel(o),a.insertAfter(t.panels[i-1]||t.tablist)),a.attr("aria-live","polite")),a.length&&(t.panels=t.panels.add(a)),l&&h.data("ui-tabs-aria-controls",l),h.attr({"aria-controls":o,"aria-labelledby":r}),a.attr("aria-labelledby",r)}),this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").attr("role","tabpanel"),i&&(this._off(i.not(this.tabs)),this._off(s.not(this.anchors)),this._off(n.not(this.panels)))},_getList:function(){return this.tablist||this.element.find("ol,ul").eq(0)},_createPanel:function(t){return e("<div>").attr("id",t).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").data("ui-tabs-destroy",!0)},_setupDisabled:function(t){e.isArray(t)&&(t.length?t.length===this.anchors.length&&(t=!0):t=!1);for(var i,s=0;i=this.tabs[s];s++)t===!0||-1!==e.inArray(s,t)?e(i).addClass("ui-state-disabled").attr("aria-disabled","true"):e(i).removeClass("ui-state-disabled").removeAttr("aria-disabled");this.options.disabled=t},_setupEvents:function(t){var i={};t&&e.each(t.split(" "),function(e,t){i[t]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(!0,this.anchors,{click:function(e){e.preventDefault()}}),this._on(this.anchors,i),this._on(this.tabs,{keydown:"_tabKeydown"}),this._on(this.panels,{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(t){var i,s=this.element.parent();"fill"===t?(i=s.height(),i-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each(function(){var t=e(this),s=t.css("position");"absolute"!==s&&"fixed"!==s&&(i-=t.outerHeight(!0))}),this.element.children().not(this.panels).each(function(){i-=e(this).outerHeight(!0)}),this.panels.each(function(){e(this).height(Math.max(0,i-e(this).innerHeight()+e(this).height()))}).css("overflow","auto")):"auto"===t&&(i=0,this.panels.each(function(){i=Math.max(i,e(this).height("").height())}).height(i))},_eventHandler:function(t){var i=this.options,s=this.active,n=e(t.currentTarget),a=n.closest("li"),o=a[0]===s[0],r=o&&i.collapsible,h=r?e():this._getPanelForTab(a),l=s.length?this._getPanelForTab(s):e(),u={oldTab:s,oldPanel:l,newTab:r?e():a,newPanel:h};t.preventDefault(),a.hasClass("ui-state-disabled")||a.hasClass("ui-tabs-loading")||this.running||o&&!i.collapsible||this._trigger("beforeActivate",t,u)===!1||(i.active=r?!1:this.tabs.index(a),this.active=o?e():a,this.xhr&&this.xhr.abort(),l.length||h.length||e.error("jQuery UI Tabs: Mismatching fragment identifier."),h.length&&this.load(this.tabs.index(a),t),this._toggle(t,u))},_toggle:function(t,i){function s(){a.running=!1,a._trigger("activate",t,i)}function n(){i.newTab.closest("li").addClass("ui-tabs-active ui-state-active"),o.length&&a.options.show?a._show(o,a.options.show,s):(o.show(),s())}var a=this,o=i.newPanel,r=i.oldPanel;this.running=!0,r.length&&this.options.hide?this._hide(r,this.options.hide,function(){i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),n()}):(i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),r.hide(),n()),r.attr("aria-hidden","true"),i.oldTab.attr({"aria-selected":"false","aria-expanded":"false"}),o.length&&r.length?i.oldTab.attr("tabIndex",-1):o.length&&this.tabs.filter(function(){return 0===e(this).attr("tabIndex")}).attr("tabIndex",-1),o.attr("aria-hidden","false"),i.newTab.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_activate:function(t){var i,s=this._findActive(t);s[0]!==this.active[0]&&(s.length||(s=this.active),i=s.find(".ui-tabs-anchor")[0],this._eventHandler({target:i,currentTarget:i,preventDefault:e.noop}))},_findActive:function(t){return t===!1?e():this.tabs.eq(t)},_getIndex:function(e){return"string"==typeof e&&(e=this.anchors.index(this.anchors.filter("[href$='"+e+"']"))),e},_destroy:function(){this.xhr&&this.xhr.abort(),this.element.removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible"),this.tablist.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").removeAttr("role"),this.anchors.removeClass("ui-tabs-anchor").removeAttr("role").removeAttr("tabIndex").removeUniqueId(),this.tablist.unbind(this.eventNamespace),this.tabs.add(this.panels).each(function(){e.data(this,"ui-tabs-destroy")?e(this).remove():e(this).removeClass("ui-state-default ui-state-active ui-state-disabled ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel").removeAttr("tabIndex").removeAttr("aria-live").removeAttr("aria-busy").removeAttr("aria-selected").removeAttr("aria-labelledby").removeAttr("aria-hidden").removeAttr("aria-expanded").removeAttr("role")}),this.tabs.each(function(){var t=e(this),i=t.data("ui-tabs-aria-controls");i?t.attr("aria-controls",i).removeData("ui-tabs-aria-controls"):t.removeAttr("aria-controls")}),this.panels.show(),"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(t){var i=this.options.disabled;i!==!1&&(void 0===t?i=!1:(t=this._getIndex(t),i=e.isArray(i)?e.map(i,function(e){return e!==t?e:null}):e.map(this.tabs,function(e,i){return i!==t?i:null})),this._setupDisabled(i))},disable:function(t){var i=this.options.disabled;if(i!==!0){if(void 0===t)i=!0;else{if(t=this._getIndex(t),-1!==e.inArray(t,i))return;i=e.isArray(i)?e.merge([t],i).sort():[t]}this._setupDisabled(i)}},load:function(t,i){t=this._getIndex(t);var s=this,n=this.tabs.eq(t),a=n.find(".ui-tabs-anchor"),o=this._getPanelForTab(n),r={tab:n,panel:o},h=function(e,t){"abort"===t&&s.panels.stop(!1,!0),n.removeClass("ui-tabs-loading"),o.removeAttr("aria-busy"),e===s.xhr&&delete s.xhr};this._isLocal(a[0])||(this.xhr=e.ajax(this._ajaxSettings(a,i,r)),this.xhr&&"canceled"!==this.xhr.statusText&&(n.addClass("ui-tabs-loading"),o.attr("aria-busy","true"),this.xhr.done(function(e,t,n){setTimeout(function(){o.html(e),s._trigger("load",i,r),h(n,t)},1)}).fail(function(e,t){setTimeout(function(){h(e,t)},1)})))},_ajaxSettings:function(t,i,s){var n=this;return{url:t.attr("href"),beforeSend:function(t,a){return n._trigger("beforeLoad",i,e.extend({jqXHR:t,ajaxSettings:a},s))}}},_getPanelForTab:function(t){var i=e(t).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+i))}}),e.widget("ui.tooltip",{version:"1.11.4",options:{content:function(){var t=e(this).attr("title")||"";return e("<a>").text(t).html()},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,tooltipClass:null,track:!1,close:null,open:null},_addDescribedBy:function(t,i){var s=(t.attr("aria-describedby")||"").split(/\s+/);s.push(i),t.data("ui-tooltip-id",i).attr("aria-describedby",e.trim(s.join(" ")))},_removeDescribedBy:function(t){var i=t.data("ui-tooltip-id"),s=(t.attr("aria-describedby")||"").split(/\s+/),n=e.inArray(i,s);-1!==n&&s.splice(n,1),t.removeData("ui-tooltip-id"),s=e.trim(s.join(" ")),s?t.attr("aria-describedby",s):t.removeAttr("aria-describedby")},_create:function(){this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.options.disabled&&this._disable(),this.liveRegion=e("<div>").attr({role:"log","aria-live":"assertive","aria-relevant":"additions"}).addClass("ui-helper-hidden-accessible").appendTo(this.document[0].body)},_setOption:function(t,i){var s=this;return"disabled"===t?(this[i?"_disable":"_enable"](),this.options[t]=i,void 0):(this._super(t,i),"content"===t&&e.each(this.tooltips,function(e,t){s._updateContent(t.element)}),void 0)},_disable:function(){var t=this;e.each(this.tooltips,function(i,s){var n=e.Event("blur");n.target=n.currentTarget=s.element[0],t.close(n,!0)}),this.element.find(this.options.items).addBack().each(function(){var t=e(this);t.is("[title]")&&t.data("ui-tooltip-title",t.attr("title")).removeAttr("title")})},_enable:function(){this.element.find(this.options.items).addBack().each(function(){var t=e(this);t.data("ui-tooltip-title")&&t.attr("title",t.data("ui-tooltip-title"))})},open:function(t){var i=this,s=e(t?t.target:this.element).closest(this.options.items);s.length&&!s.data("ui-tooltip-id")&&(s.attr("title")&&s.data("ui-tooltip-title",s.attr("title")),s.data("ui-tooltip-open",!0),t&&"mouseover"===t.type&&s.parents().each(function(){var t,s=e(this);s.data("ui-tooltip-open")&&(t=e.Event("blur"),t.target=t.currentTarget=this,i.close(t,!0)),s.attr("title")&&(s.uniqueId(),i.parents[this.id]={element:this,title:s.attr("title")},s.attr("title",""))}),this._registerCloseHandlers(t,s),this._updateContent(s,t))},_updateContent:function(e,t){var i,s=this.options.content,n=this,a=t?t.type:null;return"string"==typeof s?this._open(t,e,s):(i=s.call(e[0],function(i){n._delay(function(){e.data("ui-tooltip-open")&&(t&&(t.type=a),this._open(t,e,i))})}),i&&this._open(t,e,i),void 0)},_open:function(t,i,s){function n(e){l.of=e,o.is(":hidden")||o.position(l)}var a,o,r,h,l=e.extend({},this.options.position);if(s){if(a=this._find(i))return a.tooltip.find(".ui-tooltip-content").html(s),void 0;i.is("[title]")&&(t&&"mouseover"===t.type?i.attr("title",""):i.removeAttr("title")),a=this._tooltip(i),o=a.tooltip,this._addDescribedBy(i,o.attr("id")),o.find(".ui-tooltip-content").html(s),this.liveRegion.children().hide(),s.clone?(h=s.clone(),h.removeAttr("id").find("[id]").removeAttr("id")):h=s,e("<div>").html(h).appendTo(this.liveRegion),this.options.track&&t&&/^mouse/.test(t.type)?(this._on(this.document,{mousemove:n}),n(t)):o.position(e.extend({of:i},this.options.position)),o.hide(),this._show(o,this.options.show),this.options.show&&this.options.show.delay&&(r=this.delayedShow=setInterval(function(){o.is(":visible")&&(n(l.of),clearInterval(r))},e.fx.interval)),this._trigger("open",t,{tooltip:o})}},_registerCloseHandlers:function(t,i){var s={keyup:function(t){if(t.keyCode===e.ui.keyCode.ESCAPE){var s=e.Event(t);s.currentTarget=i[0],this.close(s,!0)}}};i[0]!==this.element[0]&&(s.remove=function(){this._removeTooltip(this._find(i).tooltip)}),t&&"mouseover"!==t.type||(s.mouseleave="close"),t&&"focusin"!==t.type||(s.focusout="close"),this._on(!0,i,s)},close:function(t){var i,s=this,n=e(t?t.currentTarget:this.element),a=this._find(n);return a?(i=a.tooltip,a.closing||(clearInterval(this.delayedShow),n.data("ui-tooltip-title")&&!n.attr("title")&&n.attr("title",n.data("ui-tooltip-title")),this._removeDescribedBy(n),a.hiding=!0,i.stop(!0),this._hide(i,this.options.hide,function(){s._removeTooltip(e(this))}),n.removeData("ui-tooltip-open"),this._off(n,"mouseleave focusout keyup"),n[0]!==this.element[0]&&this._off(n,"remove"),this._off(this.document,"mousemove"),t&&"mouseleave"===t.type&&e.each(this.parents,function(t,i){e(i.element).attr("title",i.title),delete s.parents[t]}),a.closing=!0,this._trigger("close",t,{tooltip:i}),a.hiding||(a.closing=!1)),void 0):(n.removeData("ui-tooltip-open"),void 0)},_tooltip:function(t){var i=e("<div>").attr("role","tooltip").addClass("ui-tooltip ui-widget ui-corner-all ui-widget-content "+(this.options.tooltipClass||"")),s=i.uniqueId().attr("id");return e("<div>").addClass("ui-tooltip-content").appendTo(i),i.appendTo(this.document[0].body),this.tooltips[s]={element:t,tooltip:i}},_find:function(e){var t=e.data("ui-tooltip-id");return t?this.tooltips[t]:null},_removeTooltip:function(e){e.remove(),delete this.tooltips[e.attr("id")]},_destroy:function(){var t=this;e.each(this.tooltips,function(i,s){var n=e.Event("blur"),a=s.element;n.target=n.currentTarget=a[0],t.close(n,!0),e("#"+i).remove(),a.data("ui-tooltip-title")&&(a.attr("title")||a.attr("title",a.data("ui-tooltip-title")),a.removeData("ui-tooltip-title"))}),this.liveRegion.remove()}});var y="ui-effects-",b=e;e.effects={effect:{}},function(e,t){function i(e,t,i){var s=d[t.type]||{};return null==e?i||!t.def?null:t.def:(e=s.floor?~~e:parseFloat(e),isNaN(e)?t.def:s.mod?(e+s.mod)%s.mod:0>e?0:e>s.max?s.max:e)}function s(i){var s=l(),n=s._rgba=[];return i=i.toLowerCase(),f(h,function(e,a){var o,r=a.re.exec(i),h=r&&a.parse(r),l=a.space||"rgba";return h?(o=s[l](h),s[u[l].cache]=o[u[l].cache],n=s._rgba=o._rgba,!1):t}),n.length?("0,0,0,0"===n.join()&&e.extend(n,a.transparent),s):a[i]}function n(e,t,i){return i=(i+1)%1,1>6*i?e+6*(t-e)*i:1>2*i?t:2>3*i?e+6*(t-e)*(2/3-i):e}var a,o="backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",r=/^([\-+])=\s*(\d+\.?\d*)/,h=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(e){return[e[1],e[2],e[3],e[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(e){return[2.55*e[1],2.55*e[2],2.55*e[3],e[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(e){return[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(e){return[parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16),parseInt(e[3]+e[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(e){return[e[1],e[2]/100,e[3]/100,e[4]]}}],l=e.Color=function(t,i,s,n){return new e.Color.fn.parse(t,i,s,n)},u={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},d={"byte":{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},c=l.support={},p=e("<p>")[0],f=e.each;p.style.cssText="background-color:rgba(1,1,1,.5)",c.rgba=p.style.backgroundColor.indexOf("rgba")>-1,f(u,function(e,t){t.cache="_"+e,t.props.alpha={idx:3,type:"percent",def:1}}),l.fn=e.extend(l.prototype,{parse:function(n,o,r,h){if(n===t)return this._rgba=[null,null,null,null],this;(n.jquery||n.nodeType)&&(n=e(n).css(o),o=t);var d=this,c=e.type(n),p=this._rgba=[];return o!==t&&(n=[n,o,r,h],c="array"),"string"===c?this.parse(s(n)||a._default):"array"===c?(f(u.rgba.props,function(e,t){p[t.idx]=i(n[t.idx],t)}),this):"object"===c?(n instanceof l?f(u,function(e,t){n[t.cache]&&(d[t.cache]=n[t.cache].slice())}):f(u,function(t,s){var a=s.cache;f(s.props,function(e,t){if(!d[a]&&s.to){if("alpha"===e||null==n[e])return;d[a]=s.to(d._rgba)}d[a][t.idx]=i(n[e],t,!0)}),d[a]&&0>e.inArray(null,d[a].slice(0,3))&&(d[a][3]=1,s.from&&(d._rgba=s.from(d[a])))}),this):t},is:function(e){var i=l(e),s=!0,n=this;return f(u,function(e,a){var o,r=i[a.cache];return r&&(o=n[a.cache]||a.to&&a.to(n._rgba)||[],f(a.props,function(e,i){return null!=r[i.idx]?s=r[i.idx]===o[i.idx]:t})),s}),s},_space:function(){var e=[],t=this;return f(u,function(i,s){t[s.cache]&&e.push(i)}),e.pop()},transition:function(e,t){var s=l(e),n=s._space(),a=u[n],o=0===this.alpha()?l("transparent"):this,r=o[a.cache]||a.to(o._rgba),h=r.slice();return s=s[a.cache],f(a.props,function(e,n){var a=n.idx,o=r[a],l=s[a],u=d[n.type]||{};null!==l&&(null===o?h[a]=l:(u.mod&&(l-o>u.mod/2?o+=u.mod:o-l>u.mod/2&&(o-=u.mod)),h[a]=i((l-o)*t+o,n)))}),this[n](h)},blend:function(t){if(1===this._rgba[3])return this;var i=this._rgba.slice(),s=i.pop(),n=l(t)._rgba;return l(e.map(i,function(e,t){return(1-s)*n[t]+s*e}))},toRgbaString:function(){var t="rgba(",i=e.map(this._rgba,function(e,t){return null==e?t>2?1:0:e});return 1===i[3]&&(i.pop(),t="rgb("),t+i.join()+")"},toHslaString:function(){var t="hsla(",i=e.map(this.hsla(),function(e,t){return null==e&&(e=t>2?1:0),t&&3>t&&(e=Math.round(100*e)+"%"),e});return 1===i[3]&&(i.pop(),t="hsl("),t+i.join()+")"},toHexString:function(t){var i=this._rgba.slice(),s=i.pop();return t&&i.push(~~(255*s)),"#"+e.map(i,function(e){return e=(e||0).toString(16),1===e.length?"0"+e:e}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),l.fn.parse.prototype=l.fn,u.hsla.to=function(e){if(null==e[0]||null==e[1]||null==e[2])return[null,null,null,e[3]];var t,i,s=e[0]/255,n=e[1]/255,a=e[2]/255,o=e[3],r=Math.max(s,n,a),h=Math.min(s,n,a),l=r-h,u=r+h,d=.5*u;return t=h===r?0:s===r?60*(n-a)/l+360:n===r?60*(a-s)/l+120:60*(s-n)/l+240,i=0===l?0:.5>=d?l/u:l/(2-u),[Math.round(t)%360,i,d,null==o?1:o]},u.hsla.from=function(e){if(null==e[0]||null==e[1]||null==e[2])return[null,null,null,e[3]];var t=e[0]/360,i=e[1],s=e[2],a=e[3],o=.5>=s?s*(1+i):s+i-s*i,r=2*s-o;return[Math.round(255*n(r,o,t+1/3)),Math.round(255*n(r,o,t)),Math.round(255*n(r,o,t-1/3)),a]},f(u,function(s,n){var a=n.props,o=n.cache,h=n.to,u=n.from;l.fn[s]=function(s){if(h&&!this[o]&&(this[o]=h(this._rgba)),s===t)return this[o].slice();var n,r=e.type(s),d="array"===r||"object"===r?s:arguments,c=this[o].slice();return f(a,function(e,t){var s=d["object"===r?e:t.idx];null==s&&(s=c[t.idx]),c[t.idx]=i(s,t)}),u?(n=l(u(c)),n[o]=c,n):l(c)},f(a,function(t,i){l.fn[t]||(l.fn[t]=function(n){var a,o=e.type(n),h="alpha"===t?this._hsla?"hsla":"rgba":s,l=this[h](),u=l[i.idx];return"undefined"===o?u:("function"===o&&(n=n.call(this,u),o=e.type(n)),null==n&&i.empty?this:("string"===o&&(a=r.exec(n),a&&(n=u+parseFloat(a[2])*("+"===a[1]?1:-1))),l[i.idx]=n,this[h](l)))})})}),l.hook=function(t){var i=t.split(" ");f(i,function(t,i){e.cssHooks[i]={set:function(t,n){var a,o,r="";if("transparent"!==n&&("string"!==e.type(n)||(a=s(n)))){if(n=l(a||n),!c.rgba&&1!==n._rgba[3]){for(o="backgroundColor"===i?t.parentNode:t;(""===r||"transparent"===r)&&o&&o.style;)try{r=e.css(o,"backgroundColor"),o=o.parentNode}catch(h){}n=n.blend(r&&"transparent"!==r?r:"_default")}n=n.toRgbaString()}try{t.style[i]=n}catch(h){}}},e.fx.step[i]=function(t){t.colorInit||(t.start=l(t.elem,i),t.end=l(t.end),t.colorInit=!0),e.cssHooks[i].set(t.elem,t.start.transition(t.end,t.pos))}})},l.hook(o),e.cssHooks.borderColor={expand:function(e){var t={};return f(["Top","Right","Bottom","Left"],function(i,s){t["border"+s+"Color"]=e}),t}},a=e.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}}(b),function(){function t(t){var i,s,n=t.ownerDocument.defaultView?t.ownerDocument.defaultView.getComputedStyle(t,null):t.currentStyle,a={};if(n&&n.length&&n[0]&&n[n[0]])for(s=n.length;s--;)i=n[s],"string"==typeof n[i]&&(a[e.camelCase(i)]=n[i]);else for(i in n)"string"==typeof n[i]&&(a[i]=n[i]);return a}function i(t,i){var s,a,o={};for(s in i)a=i[s],t[s]!==a&&(n[s]||(e.fx.step[s]||!isNaN(parseFloat(a)))&&(o[s]=a));return o}var s=["add","remove","toggle"],n={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};e.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(t,i){e.fx.step[i]=function(e){("none"!==e.end&&!e.setAttr||1===e.pos&&!e.setAttr)&&(b.style(e.elem,i,e.end),e.setAttr=!0)}}),e.fn.addBack||(e.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),e.effects.animateClass=function(n,a,o,r){var h=e.speed(a,o,r);return this.queue(function(){var a,o=e(this),r=o.attr("class")||"",l=h.children?o.find("*").addBack():o;l=l.map(function(){var i=e(this);return{el:i,start:t(this)}}),a=function(){e.each(s,function(e,t){n[t]&&o[t+"Class"](n[t])})},a(),l=l.map(function(){return this.end=t(this.el[0]),this.diff=i(this.start,this.end),this}),o.attr("class",r),l=l.map(function(){var t=this,i=e.Deferred(),s=e.extend({},h,{queue:!1,complete:function(){i.resolve(t)}});return this.el.animate(this.diff,s),i.promise()}),e.when.apply(e,l.get()).done(function(){a(),e.each(arguments,function(){var t=this.el;e.each(this.diff,function(e){t.css(e,"")})}),h.complete.call(o[0])})})},e.fn.extend({addClass:function(t){return function(i,s,n,a){return s?e.effects.animateClass.call(this,{add:i},s,n,a):t.apply(this,arguments)}}(e.fn.addClass),removeClass:function(t){return function(i,s,n,a){return arguments.length>1?e.effects.animateClass.call(this,{remove:i},s,n,a):t.apply(this,arguments)}}(e.fn.removeClass),toggleClass:function(t){return function(i,s,n,a,o){return"boolean"==typeof s||void 0===s?n?e.effects.animateClass.call(this,s?{add:i}:{remove:i},n,a,o):t.apply(this,arguments):e.effects.animateClass.call(this,{toggle:i},s,n,a)}}(e.fn.toggleClass),switchClass:function(t,i,s,n,a){return e.effects.animateClass.call(this,{add:i,remove:t},s,n,a)}})}(),function(){function t(t,i,s,n){return e.isPlainObject(t)&&(i=t,t=t.effect),t={effect:t},null==i&&(i={}),e.isFunction(i)&&(n=i,s=null,i={}),("number"==typeof i||e.fx.speeds[i])&&(n=s,s=i,i={}),e.isFunction(s)&&(n=s,s=null),i&&e.extend(t,i),s=s||i.duration,t.duration=e.fx.off?0:"number"==typeof s?s:s in e.fx.speeds?e.fx.speeds[s]:e.fx.speeds._default,t.complete=n||i.complete,t}function i(t){return!t||"number"==typeof t||e.fx.speeds[t]?!0:"string"!=typeof t||e.effects.effect[t]?e.isFunction(t)?!0:"object"!=typeof t||t.effect?!1:!0:!0}e.extend(e.effects,{version:"1.11.4",save:function(e,t){for(var i=0;t.length>i;i++)null!==t[i]&&e.data(y+t[i],e[0].style[t[i]])},restore:function(e,t){var i,s;for(s=0;t.length>s;s++)null!==t[s]&&(i=e.data(y+t[s]),void 0===i&&(i=""),e.css(t[s],i))},setMode:function(e,t){return"toggle"===t&&(t=e.is(":hidden")?"show":"hide"),t},getBaseline:function(e,t){var i,s;switch(e[0]){case"top":i=0;break;case"middle":i=.5;break;case"bottom":i=1;break;default:i=e[0]/t.height}switch(e[1]){case"left":s=0;break;case"center":s=.5;break;case"right":s=1;break;default:s=e[1]/t.width}return{x:s,y:i}},createWrapper:function(t){if(t.parent().is(".ui-effects-wrapper"))return t.parent();var i={width:t.outerWidth(!0),height:t.outerHeight(!0),"float":t.css("float")},s=e("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),n={width:t.width(),height:t.height()},a=document.activeElement;try{a.id}catch(o){a=document.body}return t.wrap(s),(t[0]===a||e.contains(t[0],a))&&e(a).focus(),s=t.parent(),"static"===t.css("position")?(s.css({position:"relative"}),t.css({position:"relative"})):(e.extend(i,{position:t.css("position"),zIndex:t.css("z-index")}),e.each(["top","left","bottom","right"],function(e,s){i[s]=t.css(s),isNaN(parseInt(i[s],10))&&(i[s]="auto")}),t.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),t.css(n),s.css(i).show()},removeWrapper:function(t){var i=document.activeElement;
return t.parent().is(".ui-effects-wrapper")&&(t.parent().replaceWith(t),(t[0]===i||e.contains(t[0],i))&&e(i).focus()),t},setTransition:function(t,i,s,n){return n=n||{},e.each(i,function(e,i){var a=t.cssUnit(i);a[0]>0&&(n[i]=a[0]*s+a[1])}),n}}),e.fn.extend({effect:function(){function i(t){function i(){e.isFunction(a)&&a.call(n[0]),e.isFunction(t)&&t()}var n=e(this),a=s.complete,r=s.mode;(n.is(":hidden")?"hide"===r:"show"===r)?(n[r](),i()):o.call(n[0],s,i)}var s=t.apply(this,arguments),n=s.mode,a=s.queue,o=e.effects.effect[s.effect];return e.fx.off||!o?n?this[n](s.duration,s.complete):this.each(function(){s.complete&&s.complete.call(this)}):a===!1?this.each(i):this.queue(a||"fx",i)},show:function(e){return function(s){if(i(s))return e.apply(this,arguments);var n=t.apply(this,arguments);return n.mode="show",this.effect.call(this,n)}}(e.fn.show),hide:function(e){return function(s){if(i(s))return e.apply(this,arguments);var n=t.apply(this,arguments);return n.mode="hide",this.effect.call(this,n)}}(e.fn.hide),toggle:function(e){return function(s){if(i(s)||"boolean"==typeof s)return e.apply(this,arguments);var n=t.apply(this,arguments);return n.mode="toggle",this.effect.call(this,n)}}(e.fn.toggle),cssUnit:function(t){var i=this.css(t),s=[];return e.each(["em","px","%","pt"],function(e,t){i.indexOf(t)>0&&(s=[parseFloat(i),t])}),s}})}(),function(){var t={};e.each(["Quad","Cubic","Quart","Quint","Expo"],function(e,i){t[i]=function(t){return Math.pow(t,e+2)}}),e.extend(t,{Sine:function(e){return 1-Math.cos(e*Math.PI/2)},Circ:function(e){return 1-Math.sqrt(1-e*e)},Elastic:function(e){return 0===e||1===e?e:-Math.pow(2,8*(e-1))*Math.sin((80*(e-1)-7.5)*Math.PI/15)},Back:function(e){return e*e*(3*e-2)},Bounce:function(e){for(var t,i=4;((t=Math.pow(2,--i))-1)/11>e;);return 1/Math.pow(4,3-i)-7.5625*Math.pow((3*t-2)/22-e,2)}}),e.each(t,function(t,i){e.easing["easeIn"+t]=i,e.easing["easeOut"+t]=function(e){return 1-i(1-e)},e.easing["easeInOut"+t]=function(e){return.5>e?i(2*e)/2:1-i(-2*e+2)/2}})}(),e.effects,e.effects.effect.blind=function(t,i){var s,n,a,o=e(this),r=/up|down|vertical/,h=/up|left|vertical|horizontal/,l=["position","top","bottom","left","right","height","width"],u=e.effects.setMode(o,t.mode||"hide"),d=t.direction||"up",c=r.test(d),p=c?"height":"width",f=c?"top":"left",m=h.test(d),g={},v="show"===u;o.parent().is(".ui-effects-wrapper")?e.effects.save(o.parent(),l):e.effects.save(o,l),o.show(),s=e.effects.createWrapper(o).css({overflow:"hidden"}),n=s[p](),a=parseFloat(s.css(f))||0,g[p]=v?n:0,m||(o.css(c?"bottom":"right",0).css(c?"top":"left","auto").css({position:"absolute"}),g[f]=v?a:n+a),v&&(s.css(p,0),m||s.css(f,a+n)),s.animate(g,{duration:t.duration,easing:t.easing,queue:!1,complete:function(){"hide"===u&&o.hide(),e.effects.restore(o,l),e.effects.removeWrapper(o),i()}})},e.effects.effect.bounce=function(t,i){var s,n,a,o=e(this),r=["position","top","bottom","left","right","height","width"],h=e.effects.setMode(o,t.mode||"effect"),l="hide"===h,u="show"===h,d=t.direction||"up",c=t.distance,p=t.times||5,f=2*p+(u||l?1:0),m=t.duration/f,g=t.easing,v="up"===d||"down"===d?"top":"left",y="up"===d||"left"===d,b=o.queue(),_=b.length;for((u||l)&&r.push("opacity"),e.effects.save(o,r),o.show(),e.effects.createWrapper(o),c||(c=o["top"===v?"outerHeight":"outerWidth"]()/3),u&&(a={opacity:1},a[v]=0,o.css("opacity",0).css(v,y?2*-c:2*c).animate(a,m,g)),l&&(c/=Math.pow(2,p-1)),a={},a[v]=0,s=0;p>s;s++)n={},n[v]=(y?"-=":"+=")+c,o.animate(n,m,g).animate(a,m,g),c=l?2*c:c/2;l&&(n={opacity:0},n[v]=(y?"-=":"+=")+c,o.animate(n,m,g)),o.queue(function(){l&&o.hide(),e.effects.restore(o,r),e.effects.removeWrapper(o),i()}),_>1&&b.splice.apply(b,[1,0].concat(b.splice(_,f+1))),o.dequeue()},e.effects.effect.clip=function(t,i){var s,n,a,o=e(this),r=["position","top","bottom","left","right","height","width"],h=e.effects.setMode(o,t.mode||"hide"),l="show"===h,u=t.direction||"vertical",d="vertical"===u,c=d?"height":"width",p=d?"top":"left",f={};e.effects.save(o,r),o.show(),s=e.effects.createWrapper(o).css({overflow:"hidden"}),n="IMG"===o[0].tagName?s:o,a=n[c](),l&&(n.css(c,0),n.css(p,a/2)),f[c]=l?a:0,f[p]=l?0:a/2,n.animate(f,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){l||o.hide(),e.effects.restore(o,r),e.effects.removeWrapper(o),i()}})},e.effects.effect.drop=function(t,i){var s,n=e(this),a=["position","top","bottom","left","right","opacity","height","width"],o=e.effects.setMode(n,t.mode||"hide"),r="show"===o,h=t.direction||"left",l="up"===h||"down"===h?"top":"left",u="up"===h||"left"===h?"pos":"neg",d={opacity:r?1:0};e.effects.save(n,a),n.show(),e.effects.createWrapper(n),s=t.distance||n["top"===l?"outerHeight":"outerWidth"](!0)/2,r&&n.css("opacity",0).css(l,"pos"===u?-s:s),d[l]=(r?"pos"===u?"+=":"-=":"pos"===u?"-=":"+=")+s,n.animate(d,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){"hide"===o&&n.hide(),e.effects.restore(n,a),e.effects.removeWrapper(n),i()}})},e.effects.effect.explode=function(t,i){function s(){b.push(this),b.length===d*c&&n()}function n(){p.css({visibility:"visible"}),e(b).remove(),m||p.hide(),i()}var a,o,r,h,l,u,d=t.pieces?Math.round(Math.sqrt(t.pieces)):3,c=d,p=e(this),f=e.effects.setMode(p,t.mode||"hide"),m="show"===f,g=p.show().css("visibility","hidden").offset(),v=Math.ceil(p.outerWidth()/c),y=Math.ceil(p.outerHeight()/d),b=[];for(a=0;d>a;a++)for(h=g.top+a*y,u=a-(d-1)/2,o=0;c>o;o++)r=g.left+o*v,l=o-(c-1)/2,p.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-o*v,top:-a*y}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:v,height:y,left:r+(m?l*v:0),top:h+(m?u*y:0),opacity:m?0:1}).animate({left:r+(m?0:l*v),top:h+(m?0:u*y),opacity:m?1:0},t.duration||500,t.easing,s)},e.effects.effect.fade=function(t,i){var s=e(this),n=e.effects.setMode(s,t.mode||"toggle");s.animate({opacity:n},{queue:!1,duration:t.duration,easing:t.easing,complete:i})},e.effects.effect.fold=function(t,i){var s,n,a=e(this),o=["position","top","bottom","left","right","height","width"],r=e.effects.setMode(a,t.mode||"hide"),h="show"===r,l="hide"===r,u=t.size||15,d=/([0-9]+)%/.exec(u),c=!!t.horizFirst,p=h!==c,f=p?["width","height"]:["height","width"],m=t.duration/2,g={},v={};e.effects.save(a,o),a.show(),s=e.effects.createWrapper(a).css({overflow:"hidden"}),n=p?[s.width(),s.height()]:[s.height(),s.width()],d&&(u=parseInt(d[1],10)/100*n[l?0:1]),h&&s.css(c?{height:0,width:u}:{height:u,width:0}),g[f[0]]=h?n[0]:u,v[f[1]]=h?n[1]:0,s.animate(g,m,t.easing).animate(v,m,t.easing,function(){l&&a.hide(),e.effects.restore(a,o),e.effects.removeWrapper(a),i()})},e.effects.effect.highlight=function(t,i){var s=e(this),n=["backgroundImage","backgroundColor","opacity"],a=e.effects.setMode(s,t.mode||"show"),o={backgroundColor:s.css("backgroundColor")};"hide"===a&&(o.opacity=0),e.effects.save(s,n),s.show().css({backgroundImage:"none",backgroundColor:t.color||"#ffff99"}).animate(o,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){"hide"===a&&s.hide(),e.effects.restore(s,n),i()}})},e.effects.effect.size=function(t,i){var s,n,a,o=e(this),r=["position","top","bottom","left","right","width","height","overflow","opacity"],h=["position","top","bottom","left","right","overflow","opacity"],l=["width","height","overflow"],u=["fontSize"],d=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],c=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],p=e.effects.setMode(o,t.mode||"effect"),f=t.restore||"effect"!==p,m=t.scale||"both",g=t.origin||["middle","center"],v=o.css("position"),y=f?r:h,b={height:0,width:0,outerHeight:0,outerWidth:0};"show"===p&&o.show(),s={height:o.height(),width:o.width(),outerHeight:o.outerHeight(),outerWidth:o.outerWidth()},"toggle"===t.mode&&"show"===p?(o.from=t.to||b,o.to=t.from||s):(o.from=t.from||("show"===p?b:s),o.to=t.to||("hide"===p?b:s)),a={from:{y:o.from.height/s.height,x:o.from.width/s.width},to:{y:o.to.height/s.height,x:o.to.width/s.width}},("box"===m||"both"===m)&&(a.from.y!==a.to.y&&(y=y.concat(d),o.from=e.effects.setTransition(o,d,a.from.y,o.from),o.to=e.effects.setTransition(o,d,a.to.y,o.to)),a.from.x!==a.to.x&&(y=y.concat(c),o.from=e.effects.setTransition(o,c,a.from.x,o.from),o.to=e.effects.setTransition(o,c,a.to.x,o.to))),("content"===m||"both"===m)&&a.from.y!==a.to.y&&(y=y.concat(u).concat(l),o.from=e.effects.setTransition(o,u,a.from.y,o.from),o.to=e.effects.setTransition(o,u,a.to.y,o.to)),e.effects.save(o,y),o.show(),e.effects.createWrapper(o),o.css("overflow","hidden").css(o.from),g&&(n=e.effects.getBaseline(g,s),o.from.top=(s.outerHeight-o.outerHeight())*n.y,o.from.left=(s.outerWidth-o.outerWidth())*n.x,o.to.top=(s.outerHeight-o.to.outerHeight)*n.y,o.to.left=(s.outerWidth-o.to.outerWidth)*n.x),o.css(o.from),("content"===m||"both"===m)&&(d=d.concat(["marginTop","marginBottom"]).concat(u),c=c.concat(["marginLeft","marginRight"]),l=r.concat(d).concat(c),o.find("*[width]").each(function(){var i=e(this),s={height:i.height(),width:i.width(),outerHeight:i.outerHeight(),outerWidth:i.outerWidth()};f&&e.effects.save(i,l),i.from={height:s.height*a.from.y,width:s.width*a.from.x,outerHeight:s.outerHeight*a.from.y,outerWidth:s.outerWidth*a.from.x},i.to={height:s.height*a.to.y,width:s.width*a.to.x,outerHeight:s.height*a.to.y,outerWidth:s.width*a.to.x},a.from.y!==a.to.y&&(i.from=e.effects.setTransition(i,d,a.from.y,i.from),i.to=e.effects.setTransition(i,d,a.to.y,i.to)),a.from.x!==a.to.x&&(i.from=e.effects.setTransition(i,c,a.from.x,i.from),i.to=e.effects.setTransition(i,c,a.to.x,i.to)),i.css(i.from),i.animate(i.to,t.duration,t.easing,function(){f&&e.effects.restore(i,l)})})),o.animate(o.to,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){0===o.to.opacity&&o.css("opacity",o.from.opacity),"hide"===p&&o.hide(),e.effects.restore(o,y),f||("static"===v?o.css({position:"relative",top:o.to.top,left:o.to.left}):e.each(["top","left"],function(e,t){o.css(t,function(t,i){var s=parseInt(i,10),n=e?o.to.left:o.to.top;return"auto"===i?n+"px":s+n+"px"})})),e.effects.removeWrapper(o),i()}})},e.effects.effect.scale=function(t,i){var s=e(this),n=e.extend(!0,{},t),a=e.effects.setMode(s,t.mode||"effect"),o=parseInt(t.percent,10)||(0===parseInt(t.percent,10)?0:"hide"===a?0:100),r=t.direction||"both",h=t.origin,l={height:s.height(),width:s.width(),outerHeight:s.outerHeight(),outerWidth:s.outerWidth()},u={y:"horizontal"!==r?o/100:1,x:"vertical"!==r?o/100:1};n.effect="size",n.queue=!1,n.complete=i,"effect"!==a&&(n.origin=h||["middle","center"],n.restore=!0),n.from=t.from||("show"===a?{height:0,width:0,outerHeight:0,outerWidth:0}:l),n.to={height:l.height*u.y,width:l.width*u.x,outerHeight:l.outerHeight*u.y,outerWidth:l.outerWidth*u.x},n.fade&&("show"===a&&(n.from.opacity=0,n.to.opacity=1),"hide"===a&&(n.from.opacity=1,n.to.opacity=0)),s.effect(n)},e.effects.effect.puff=function(t,i){var s=e(this),n=e.effects.setMode(s,t.mode||"hide"),a="hide"===n,o=parseInt(t.percent,10)||150,r=o/100,h={height:s.height(),width:s.width(),outerHeight:s.outerHeight(),outerWidth:s.outerWidth()};e.extend(t,{effect:"scale",queue:!1,fade:!0,mode:n,complete:i,percent:a?o:100,from:a?h:{height:h.height*r,width:h.width*r,outerHeight:h.outerHeight*r,outerWidth:h.outerWidth*r}}),s.effect(t)},e.effects.effect.pulsate=function(t,i){var s,n=e(this),a=e.effects.setMode(n,t.mode||"show"),o="show"===a,r="hide"===a,h=o||"hide"===a,l=2*(t.times||5)+(h?1:0),u=t.duration/l,d=0,c=n.queue(),p=c.length;for((o||!n.is(":visible"))&&(n.css("opacity",0).show(),d=1),s=1;l>s;s++)n.animate({opacity:d},u,t.easing),d=1-d;n.animate({opacity:d},u,t.easing),n.queue(function(){r&&n.hide(),i()}),p>1&&c.splice.apply(c,[1,0].concat(c.splice(p,l+1))),n.dequeue()},e.effects.effect.shake=function(t,i){var s,n=e(this),a=["position","top","bottom","left","right","height","width"],o=e.effects.setMode(n,t.mode||"effect"),r=t.direction||"left",h=t.distance||20,l=t.times||3,u=2*l+1,d=Math.round(t.duration/u),c="up"===r||"down"===r?"top":"left",p="up"===r||"left"===r,f={},m={},g={},v=n.queue(),y=v.length;for(e.effects.save(n,a),n.show(),e.effects.createWrapper(n),f[c]=(p?"-=":"+=")+h,m[c]=(p?"+=":"-=")+2*h,g[c]=(p?"-=":"+=")+2*h,n.animate(f,d,t.easing),s=1;l>s;s++)n.animate(m,d,t.easing).animate(g,d,t.easing);n.animate(m,d,t.easing).animate(f,d/2,t.easing).queue(function(){"hide"===o&&n.hide(),e.effects.restore(n,a),e.effects.removeWrapper(n),i()}),y>1&&v.splice.apply(v,[1,0].concat(v.splice(y,u+1))),n.dequeue()},e.effects.effect.slide=function(t,i){var s,n=e(this),a=["position","top","bottom","left","right","width","height"],o=e.effects.setMode(n,t.mode||"show"),r="show"===o,h=t.direction||"left",l="up"===h||"down"===h?"top":"left",u="up"===h||"left"===h,d={};e.effects.save(n,a),n.show(),s=t.distance||n["top"===l?"outerHeight":"outerWidth"](!0),e.effects.createWrapper(n).css({overflow:"hidden"}),r&&n.css(l,u?isNaN(s)?"-"+s:-s:s),d[l]=(r?u?"+=":"-=":u?"-=":"+=")+s,n.animate(d,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){"hide"===o&&n.hide(),e.effects.restore(n,a),e.effects.removeWrapper(n),i()}})},e.effects.effect.transfer=function(t,i){var s=e(this),n=e(t.to),a="fixed"===n.css("position"),o=e("body"),r=a?o.scrollTop():0,h=a?o.scrollLeft():0,l=n.offset(),u={top:l.top-r,left:l.left-h,height:n.innerHeight(),width:n.innerWidth()},d=s.offset(),c=e("<div class='ui-effects-transfer'></div>").appendTo(document.body).addClass(t.className).css({top:d.top-r,left:d.left-h,height:s.innerHeight(),width:s.innerWidth(),position:a?"fixed":"absolute"}).animate(u,t.duration,t.easing,function(){c.remove(),i()})}});
//
//../pacotes/jquery/malihu-custom-scrollbar-plugin/3.1.5/jquery.mCustomScrollbar.concat.min.js
/* == jquery mousewheel plugin == Version: 3.1.13, License: MIT License (MIT) */
!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?module.exports=a:a(jQuery)}(function(a){function b(b){var g=b||window.event,h=i.call(arguments,1),j=0,l=0,m=0,n=0,o=0,p=0;if(b=a.event.fix(g),b.type="mousewheel","detail"in g&&(m=-1*g.detail),"wheelDelta"in g&&(m=g.wheelDelta),"wheelDeltaY"in g&&(m=g.wheelDeltaY),"wheelDeltaX"in g&&(l=-1*g.wheelDeltaX),"axis"in g&&g.axis===g.HORIZONTAL_AXIS&&(l=-1*m,m=0),j=0===m?l:m,"deltaY"in g&&(m=-1*g.deltaY,j=m),"deltaX"in g&&(l=g.deltaX,0===m&&(j=-1*l)),0!==m||0!==l){if(1===g.deltaMode){var q=a.data(this,"mousewheel-line-height");j*=q,m*=q,l*=q}else if(2===g.deltaMode){var r=a.data(this,"mousewheel-page-height");j*=r,m*=r,l*=r}if(n=Math.max(Math.abs(m),Math.abs(l)),(!f||f>n)&&(f=n,d(g,n)&&(f/=40)),d(g,n)&&(j/=40,l/=40,m/=40),j=Math[j>=1?"floor":"ceil"](j/f),l=Math[l>=1?"floor":"ceil"](l/f),m=Math[m>=1?"floor":"ceil"](m/f),k.settings.normalizeOffset&&this.getBoundingClientRect){var s=this.getBoundingClientRect();o=b.clientX-s.left,p=b.clientY-s.top}return b.deltaX=l,b.deltaY=m,b.deltaFactor=f,b.offsetX=o,b.offsetY=p,b.deltaMode=0,h.unshift(b,j,l,m),e&&clearTimeout(e),e=setTimeout(c,200),(a.event.dispatch||a.event.handle).apply(this,h)}}function c(){f=null}function d(a,b){return k.settings.adjustOldDeltas&&"mousewheel"===a.type&&b%120===0}var e,f,g=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],h="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],i=Array.prototype.slice;if(a.event.fixHooks)for(var j=g.length;j;)a.event.fixHooks[g[--j]]=a.event.mouseHooks;var k=a.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var c=h.length;c;)this.addEventListener(h[--c],b,!1);else this.onmousewheel=b;a.data(this,"mousewheel-line-height",k.getLineHeight(this)),a.data(this,"mousewheel-page-height",k.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var c=h.length;c;)this.removeEventListener(h[--c],b,!1);else this.onmousewheel=null;a.removeData(this,"mousewheel-line-height"),a.removeData(this,"mousewheel-page-height")},getLineHeight:function(b){var c=a(b),d=c["offsetParent"in a.fn?"offsetParent":"parent"]();return d.length||(d=a("body")),parseInt(d.css("fontSize"),10)||parseInt(c.css("fontSize"),10)||16},getPageHeight:function(b){return a(b).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})});!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?module.exports=a:a(jQuery)}(function(a){function b(b){var g=b||window.event,h=i.call(arguments,1),j=0,l=0,m=0,n=0,o=0,p=0;if(b=a.event.fix(g),b.type="mousewheel","detail"in g&&(m=-1*g.detail),"wheelDelta"in g&&(m=g.wheelDelta),"wheelDeltaY"in g&&(m=g.wheelDeltaY),"wheelDeltaX"in g&&(l=-1*g.wheelDeltaX),"axis"in g&&g.axis===g.HORIZONTAL_AXIS&&(l=-1*m,m=0),j=0===m?l:m,"deltaY"in g&&(m=-1*g.deltaY,j=m),"deltaX"in g&&(l=g.deltaX,0===m&&(j=-1*l)),0!==m||0!==l){if(1===g.deltaMode){var q=a.data(this,"mousewheel-line-height");j*=q,m*=q,l*=q}else if(2===g.deltaMode){var r=a.data(this,"mousewheel-page-height");j*=r,m*=r,l*=r}if(n=Math.max(Math.abs(m),Math.abs(l)),(!f||f>n)&&(f=n,d(g,n)&&(f/=40)),d(g,n)&&(j/=40,l/=40,m/=40),j=Math[j>=1?"floor":"ceil"](j/f),l=Math[l>=1?"floor":"ceil"](l/f),m=Math[m>=1?"floor":"ceil"](m/f),k.settings.normalizeOffset&&this.getBoundingClientRect){var s=this.getBoundingClientRect();o=b.clientX-s.left,p=b.clientY-s.top}return b.deltaX=l,b.deltaY=m,b.deltaFactor=f,b.offsetX=o,b.offsetY=p,b.deltaMode=0,h.unshift(b,j,l,m),e&&clearTimeout(e),e=setTimeout(c,200),(a.event.dispatch||a.event.handle).apply(this,h)}}function c(){f=null}function d(a,b){return k.settings.adjustOldDeltas&&"mousewheel"===a.type&&b%120===0}var e,f,g=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],h="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],i=Array.prototype.slice;if(a.event.fixHooks)for(var j=g.length;j;)a.event.fixHooks[g[--j]]=a.event.mouseHooks;var k=a.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var c=h.length;c;)this.addEventListener(h[--c],b,!1);else this.onmousewheel=b;a.data(this,"mousewheel-line-height",k.getLineHeight(this)),a.data(this,"mousewheel-page-height",k.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var c=h.length;c;)this.removeEventListener(h[--c],b,!1);else this.onmousewheel=null;a.removeData(this,"mousewheel-line-height"),a.removeData(this,"mousewheel-page-height")},getLineHeight:function(b){var c=a(b),d=c["offsetParent"in a.fn?"offsetParent":"parent"]();return d.length||(d=a("body")),parseInt(d.css("fontSize"),10)||parseInt(c.css("fontSize"),10)||16},getPageHeight:function(b){return a(b).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})});
/* == malihu jquery custom scrollbar plugin == Version: 3.1.5, License: MIT License (MIT) */
!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"undefined"!=typeof module&&module.exports?module.exports=e:e(jQuery,window,document)}(function(e){!function(t){var o="function"==typeof define&&define.amd,a="undefined"!=typeof module&&module.exports,n="https:"==document.location.protocol?"https:":"http:",i="cdnjs.cloudflare.com/ajax/libs/jquery-mousewheel/3.1.13/jquery.mousewheel.min.js";o||(a?require("jquery-mousewheel")(e):e.event.special.mousewheel||e("head").append(decodeURI("%3Cscript src="+n+"//"+i+"%3E%3C/script%3E"))),t()}(function(){var t,o="mCustomScrollbar",a="mCS",n=".mCustomScrollbar",i={setTop:0,setLeft:0,axis:"y",scrollbarPosition:"inside",scrollInertia:950,autoDraggerLength:!0,alwaysShowScrollbar:0,snapOffset:0,mouseWheel:{enable:!0,scrollAmount:"auto",axis:"y",deltaFactor:"auto",disableOver:["select","option","keygen","datalist","textarea"]},scrollButtons:{scrollType:"stepless",scrollAmount:"auto"},keyboard:{enable:!0,scrollType:"stepless",scrollAmount:"auto"},contentTouchScroll:25,documentTouchScroll:!0,advanced:{autoScrollOnFocus:"input,textarea,select,button,datalist,keygen,a[tabindex],area,object,[contenteditable='true']",updateOnContentResize:!0,updateOnImageLoad:"auto",autoUpdateTimeout:60},theme:"light",callbacks:{onTotalScrollOffset:0,onTotalScrollBackOffset:0,alwaysTriggerOffsets:!0}},r=0,l={},s=window.attachEvent&&!window.addEventListener?1:0,c=!1,d=["mCSB_dragger_onDrag","mCSB_scrollTools_onDrag","mCS_img_loaded","mCS_disabled","mCS_destroyed","mCS_no_scrollbar","mCS-autoHide","mCS-dir-rtl","mCS_no_scrollbar_y","mCS_no_scrollbar_x","mCS_y_hidden","mCS_x_hidden","mCSB_draggerContainer","mCSB_buttonUp","mCSB_buttonDown","mCSB_buttonLeft","mCSB_buttonRight"],u={init:function(t){var t=e.extend(!0,{},i,t),o=f.call(this);if(t.live){var s=t.liveSelector||this.selector||n,c=e(s);if("off"===t.live)return void m(s);l[s]=setTimeout(function(){c.mCustomScrollbar(t),"once"===t.live&&c.length&&m(s)},500)}else m(s);return t.setWidth=t.set_width?t.set_width:t.setWidth,t.setHeight=t.set_height?t.set_height:t.setHeight,t.axis=t.horizontalScroll?"x":p(t.axis),t.scrollInertia=t.scrollInertia>0&&t.scrollInertia<17?17:t.scrollInertia,"object"!=typeof t.mouseWheel&&1==t.mouseWheel&&(t.mouseWheel={enable:!0,scrollAmount:"auto",axis:"y",preventDefault:!1,deltaFactor:"auto",normalizeDelta:!1,invert:!1}),t.mouseWheel.scrollAmount=t.mouseWheelPixels?t.mouseWheelPixels:t.mouseWheel.scrollAmount,t.mouseWheel.normalizeDelta=t.advanced.normalizeMouseWheelDelta?t.advanced.normalizeMouseWheelDelta:t.mouseWheel.normalizeDelta,t.scrollButtons.scrollType=g(t.scrollButtons.scrollType),h(t),e(o).each(function(){var o=e(this);if(!o.data(a)){o.data(a,{idx:++r,opt:t,scrollRatio:{y:null,x:null},overflowed:null,contentReset:{y:null,x:null},bindEvents:!1,tweenRunning:!1,sequential:{},langDir:o.css("direction"),cbOffsets:null,trigger:null,poll:{size:{o:0,n:0},img:{o:0,n:0},change:{o:0,n:0}}});var n=o.data(a),i=n.opt,l=o.data("mcs-axis"),s=o.data("mcs-scrollbar-position"),c=o.data("mcs-theme");l&&(i.axis=l),s&&(i.scrollbarPosition=s),c&&(i.theme=c,h(i)),v.call(this),n&&i.callbacks.onCreate&&"function"==typeof i.callbacks.onCreate&&i.callbacks.onCreate.call(this),e("#mCSB_"+n.idx+"_container img:not(."+d[2]+")").addClass(d[2]),u.update.call(null,o)}})},update:function(t,o){var n=t||f.call(this);return e(n).each(function(){var t=e(this);if(t.data(a)){var n=t.data(a),i=n.opt,r=e("#mCSB_"+n.idx+"_container"),l=e("#mCSB_"+n.idx),s=[e("#mCSB_"+n.idx+"_dragger_vertical"),e("#mCSB_"+n.idx+"_dragger_horizontal")];if(!r.length)return;n.tweenRunning&&Q(t),o&&n&&i.callbacks.onBeforeUpdate&&"function"==typeof i.callbacks.onBeforeUpdate&&i.callbacks.onBeforeUpdate.call(this),t.hasClass(d[3])&&t.removeClass(d[3]),t.hasClass(d[4])&&t.removeClass(d[4]),l.css("max-height","none"),l.height()!==t.height()&&l.css("max-height",t.height()),_.call(this),"y"===i.axis||i.advanced.autoExpandHorizontalScroll||r.css("width",x(r)),n.overflowed=y.call(this),M.call(this),i.autoDraggerLength&&S.call(this),b.call(this),T.call(this);var c=[Math.abs(r[0].offsetTop),Math.abs(r[0].offsetLeft)];"x"!==i.axis&&(n.overflowed[0]?s[0].height()>s[0].parent().height()?B.call(this):(G(t,c[0].toString(),{dir:"y",dur:0,overwrite:"none"}),n.contentReset.y=null):(B.call(this),"y"===i.axis?k.call(this):"yx"===i.axis&&n.overflowed[1]&&G(t,c[1].toString(),{dir:"x",dur:0,overwrite:"none"}))),"y"!==i.axis&&(n.overflowed[1]?s[1].width()>s[1].parent().width()?B.call(this):(G(t,c[1].toString(),{dir:"x",dur:0,overwrite:"none"}),n.contentReset.x=null):(B.call(this),"x"===i.axis?k.call(this):"yx"===i.axis&&n.overflowed[0]&&G(t,c[0].toString(),{dir:"y",dur:0,overwrite:"none"}))),o&&n&&(2===o&&i.callbacks.onImageLoad&&"function"==typeof i.callbacks.onImageLoad?i.callbacks.onImageLoad.call(this):3===o&&i.callbacks.onSelectorChange&&"function"==typeof i.callbacks.onSelectorChange?i.callbacks.onSelectorChange.call(this):i.callbacks.onUpdate&&"function"==typeof i.callbacks.onUpdate&&i.callbacks.onUpdate.call(this)),N.call(this)}})},scrollTo:function(t,o){if("undefined"!=typeof t&&null!=t){var n=f.call(this);return e(n).each(function(){var n=e(this);if(n.data(a)){var i=n.data(a),r=i.opt,l={trigger:"external",scrollInertia:r.scrollInertia,scrollEasing:"mcsEaseInOut",moveDragger:!1,timeout:60,callbacks:!0,onStart:!0,onUpdate:!0,onComplete:!0},s=e.extend(!0,{},l,o),c=Y.call(this,t),d=s.scrollInertia>0&&s.scrollInertia<17?17:s.scrollInertia;c[0]=X.call(this,c[0],"y"),c[1]=X.call(this,c[1],"x"),s.moveDragger&&(c[0]*=i.scrollRatio.y,c[1]*=i.scrollRatio.x),s.dur=ne()?0:d,setTimeout(function(){null!==c[0]&&"undefined"!=typeof c[0]&&"x"!==r.axis&&i.overflowed[0]&&(s.dir="y",s.overwrite="all",G(n,c[0].toString(),s)),null!==c[1]&&"undefined"!=typeof c[1]&&"y"!==r.axis&&i.overflowed[1]&&(s.dir="x",s.overwrite="none",G(n,c[1].toString(),s))},s.timeout)}})}},stop:function(){var t=f.call(this);return e(t).each(function(){var t=e(this);t.data(a)&&Q(t)})},disable:function(t){var o=f.call(this);return e(o).each(function(){var o=e(this);if(o.data(a)){o.data(a);N.call(this,"remove"),k.call(this),t&&B.call(this),M.call(this,!0),o.addClass(d[3])}})},destroy:function(){var t=f.call(this);return e(t).each(function(){var n=e(this);if(n.data(a)){var i=n.data(a),r=i.opt,l=e("#mCSB_"+i.idx),s=e("#mCSB_"+i.idx+"_container"),c=e(".mCSB_"+i.idx+"_scrollbar");r.live&&m(r.liveSelector||e(t).selector),N.call(this,"remove"),k.call(this),B.call(this),n.removeData(a),$(this,"mcs"),c.remove(),s.find("img."+d[2]).removeClass(d[2]),l.replaceWith(s.contents()),n.removeClass(o+" _"+a+"_"+i.idx+" "+d[6]+" "+d[7]+" "+d[5]+" "+d[3]).addClass(d[4])}})}},f=function(){return"object"!=typeof e(this)||e(this).length<1?n:this},h=function(t){var o=["rounded","rounded-dark","rounded-dots","rounded-dots-dark"],a=["rounded-dots","rounded-dots-dark","3d","3d-dark","3d-thick","3d-thick-dark","inset","inset-dark","inset-2","inset-2-dark","inset-3","inset-3-dark"],n=["minimal","minimal-dark"],i=["minimal","minimal-dark"],r=["minimal","minimal-dark"];t.autoDraggerLength=e.inArray(t.theme,o)>-1?!1:t.autoDraggerLength,t.autoExpandScrollbar=e.inArray(t.theme,a)>-1?!1:t.autoExpandScrollbar,t.scrollButtons.enable=e.inArray(t.theme,n)>-1?!1:t.scrollButtons.enable,t.autoHideScrollbar=e.inArray(t.theme,i)>-1?!0:t.autoHideScrollbar,t.scrollbarPosition=e.inArray(t.theme,r)>-1?"outside":t.scrollbarPosition},m=function(e){l[e]&&(clearTimeout(l[e]),$(l,e))},p=function(e){return"yx"===e||"xy"===e||"auto"===e?"yx":"x"===e||"horizontal"===e?"x":"y"},g=function(e){return"stepped"===e||"pixels"===e||"step"===e||"click"===e?"stepped":"stepless"},v=function(){var t=e(this),n=t.data(a),i=n.opt,r=i.autoExpandScrollbar?" "+d[1]+"_expand":"",l=["<div id='mCSB_"+n.idx+"_scrollbar_vertical' class='mCSB_scrollTools mCSB_"+n.idx+"_scrollbar mCS-"+i.theme+" mCSB_scrollTools_vertical"+r+"'><div class='"+d[12]+"'><div id='mCSB_"+n.idx+"_dragger_vertical' class='mCSB_dragger' style='position:absolute;'><div class='mCSB_dragger_bar' /></div><div class='mCSB_draggerRail' /></div></div>","<div id='mCSB_"+n.idx+"_scrollbar_horizontal' class='mCSB_scrollTools mCSB_"+n.idx+"_scrollbar mCS-"+i.theme+" mCSB_scrollTools_horizontal"+r+"'><div class='"+d[12]+"'><div id='mCSB_"+n.idx+"_dragger_horizontal' class='mCSB_dragger' style='position:absolute;'><div class='mCSB_dragger_bar' /></div><div class='mCSB_draggerRail' /></div></div>"],s="yx"===i.axis?"mCSB_vertical_horizontal":"x"===i.axis?"mCSB_horizontal":"mCSB_vertical",c="yx"===i.axis?l[0]+l[1]:"x"===i.axis?l[1]:l[0],u="yx"===i.axis?"<div id='mCSB_"+n.idx+"_container_wrapper' class='mCSB_container_wrapper' />":"",f=i.autoHideScrollbar?" "+d[6]:"",h="x"!==i.axis&&"rtl"===n.langDir?" "+d[7]:"";i.setWidth&&t.css("width",i.setWidth),i.setHeight&&t.css("height",i.setHeight),i.setLeft="y"!==i.axis&&"rtl"===n.langDir?"989999px":i.setLeft,t.addClass(o+" _"+a+"_"+n.idx+f+h).wrapInner("<div id='mCSB_"+n.idx+"' class='mCustomScrollBox mCS-"+i.theme+" "+s+"'><div id='mCSB_"+n.idx+"_container' class='mCSB_container' style='position:relative; top:"+i.setTop+"; left:"+i.setLeft+";' dir='"+n.langDir+"' /></div>");var m=e("#mCSB_"+n.idx),p=e("#mCSB_"+n.idx+"_container");"y"===i.axis||i.advanced.autoExpandHorizontalScroll||p.css("width",x(p)),"outside"===i.scrollbarPosition?("static"===t.css("position")&&t.css("position","relative"),t.css("overflow","visible"),m.addClass("mCSB_outside").after(c)):(m.addClass("mCSB_inside").append(c),p.wrap(u)),w.call(this);var g=[e("#mCSB_"+n.idx+"_dragger_vertical"),e("#mCSB_"+n.idx+"_dragger_horizontal")];g[0].css("min-height",g[0].height()),g[1].css("min-width",g[1].width())},x=function(t){var o=[t[0].scrollWidth,Math.max.apply(Math,t.children().map(function(){return e(this).outerWidth(!0)}).get())],a=t.parent().width();return o[0]>a?o[0]:o[1]>a?o[1]:"100%"},_=function(){var t=e(this),o=t.data(a),n=o.opt,i=e("#mCSB_"+o.idx+"_container");if(n.advanced.autoExpandHorizontalScroll&&"y"!==n.axis){i.css({width:"auto","min-width":0,"overflow-x":"scroll"});var r=Math.ceil(i[0].scrollWidth);3===n.advanced.autoExpandHorizontalScroll||2!==n.advanced.autoExpandHorizontalScroll&&r>i.parent().width()?i.css({width:r,"min-width":"100%","overflow-x":"inherit"}):i.css({"overflow-x":"inherit",position:"absolute"}).wrap("<div class='mCSB_h_wrapper' style='position:relative; left:0; width:999999px;' />").css({width:Math.ceil(i[0].getBoundingClientRect().right+.4)-Math.floor(i[0].getBoundingClientRect().left),"min-width":"100%",position:"relative"}).unwrap()}},w=function(){var t=e(this),o=t.data(a),n=o.opt,i=e(".mCSB_"+o.idx+"_scrollbar:first"),r=oe(n.scrollButtons.tabindex)?"tabindex='"+n.scrollButtons.tabindex+"'":"",l=["<a href='#' class='"+d[13]+"' "+r+" />","<a href='#' class='"+d[14]+"' "+r+" />","<a href='#' class='"+d[15]+"' "+r+" />","<a href='#' class='"+d[16]+"' "+r+" />"],s=["x"===n.axis?l[2]:l[0],"x"===n.axis?l[3]:l[1],l[2],l[3]];n.scrollButtons.enable&&i.prepend(s[0]).append(s[1]).next(".mCSB_scrollTools").prepend(s[2]).append(s[3])},S=function(){var t=e(this),o=t.data(a),n=e("#mCSB_"+o.idx),i=e("#mCSB_"+o.idx+"_container"),r=[e("#mCSB_"+o.idx+"_dragger_vertical"),e("#mCSB_"+o.idx+"_dragger_horizontal")],l=[n.height()/i.outerHeight(!1),n.width()/i.outerWidth(!1)],c=[parseInt(r[0].css("min-height")),Math.round(l[0]*r[0].parent().height()),parseInt(r[1].css("min-width")),Math.round(l[1]*r[1].parent().width())],d=s&&c[1]<c[0]?c[0]:c[1],u=s&&c[3]<c[2]?c[2]:c[3];r[0].css({height:d,"max-height":r[0].parent().height()-10}).find(".mCSB_dragger_bar").css({"line-height":c[0]+"px"}),r[1].css({width:u,"max-width":r[1].parent().width()-10})},b=function(){var t=e(this),o=t.data(a),n=e("#mCSB_"+o.idx),i=e("#mCSB_"+o.idx+"_container"),r=[e("#mCSB_"+o.idx+"_dragger_vertical"),e("#mCSB_"+o.idx+"_dragger_horizontal")],l=[i.outerHeight(!1)-n.height(),i.outerWidth(!1)-n.width()],s=[l[0]/(r[0].parent().height()-r[0].height()),l[1]/(r[1].parent().width()-r[1].width())];o.scrollRatio={y:s[0],x:s[1]}},C=function(e,t,o){var a=o?d[0]+"_expanded":"",n=e.closest(".mCSB_scrollTools");"active"===t?(e.toggleClass(d[0]+" "+a),n.toggleClass(d[1]),e[0]._draggable=e[0]._draggable?0:1):e[0]._draggable||("hide"===t?(e.removeClass(d[0]),n.removeClass(d[1])):(e.addClass(d[0]),n.addClass(d[1])))},y=function(){var t=e(this),o=t.data(a),n=e("#mCSB_"+o.idx),i=e("#mCSB_"+o.idx+"_container"),r=null==o.overflowed?i.height():i.outerHeight(!1),l=null==o.overflowed?i.width():i.outerWidth(!1),s=i[0].scrollHeight,c=i[0].scrollWidth;return s>r&&(r=s),c>l&&(l=c),[r>n.height(),l>n.width()]},B=function(){var t=e(this),o=t.data(a),n=o.opt,i=e("#mCSB_"+o.idx),r=e("#mCSB_"+o.idx+"_container"),l=[e("#mCSB_"+o.idx+"_dragger_vertical"),e("#mCSB_"+o.idx+"_dragger_horizontal")];if(Q(t),("x"!==n.axis&&!o.overflowed[0]||"y"===n.axis&&o.overflowed[0])&&(l[0].add(r).css("top",0),G(t,"_resetY")),"y"!==n.axis&&!o.overflowed[1]||"x"===n.axis&&o.overflowed[1]){var s=dx=0;"rtl"===o.langDir&&(s=i.width()-r.outerWidth(!1),dx=Math.abs(s/o.scrollRatio.x)),r.css("left",s),l[1].css("left",dx),G(t,"_resetX")}},T=function(){function t(){r=setTimeout(function(){e.event.special.mousewheel?(clearTimeout(r),W.call(o[0])):t()},100)}var o=e(this),n=o.data(a),i=n.opt;if(!n.bindEvents){if(I.call(this),i.contentTouchScroll&&D.call(this),E.call(this),i.mouseWheel.enable){var r;t()}P.call(this),U.call(this),i.advanced.autoScrollOnFocus&&H.call(this),i.scrollButtons.enable&&F.call(this),i.keyboard.enable&&q.call(this),n.bindEvents=!0}},k=function(){var t=e(this),o=t.data(a),n=o.opt,i=a+"_"+o.idx,r=".mCSB_"+o.idx+"_scrollbar",l=e("#mCSB_"+o.idx+",#mCSB_"+o.idx+"_container,#mCSB_"+o.idx+"_container_wrapper,"+r+" ."+d[12]+",#mCSB_"+o.idx+"_dragger_vertical,#mCSB_"+o.idx+"_dragger_horizontal,"+r+">a"),s=e("#mCSB_"+o.idx+"_container");n.advanced.releaseDraggableSelectors&&l.add(e(n.advanced.releaseDraggableSelectors)),n.advanced.extraDraggableSelectors&&l.add(e(n.advanced.extraDraggableSelectors)),o.bindEvents&&(e(document).add(e(!A()||top.document)).unbind("."+i),l.each(function(){e(this).unbind("."+i)}),clearTimeout(t[0]._focusTimeout),$(t[0],"_focusTimeout"),clearTimeout(o.sequential.step),$(o.sequential,"step"),clearTimeout(s[0].onCompleteTimeout),$(s[0],"onCompleteTimeout"),o.bindEvents=!1)},M=function(t){var o=e(this),n=o.data(a),i=n.opt,r=e("#mCSB_"+n.idx+"_container_wrapper"),l=r.length?r:e("#mCSB_"+n.idx+"_container"),s=[e("#mCSB_"+n.idx+"_scrollbar_vertical"),e("#mCSB_"+n.idx+"_scrollbar_horizontal")],c=[s[0].find(".mCSB_dragger"),s[1].find(".mCSB_dragger")];"x"!==i.axis&&(n.overflowed[0]&&!t?(s[0].add(c[0]).add(s[0].children("a")).css("display","block"),l.removeClass(d[8]+" "+d[10])):(i.alwaysShowScrollbar?(2!==i.alwaysShowScrollbar&&c[0].css("display","none"),l.removeClass(d[10])):(s[0].css("display","none"),l.addClass(d[10])),l.addClass(d[8]))),"y"!==i.axis&&(n.overflowed[1]&&!t?(s[1].add(c[1]).add(s[1].children("a")).css("display","block"),l.removeClass(d[9]+" "+d[11])):(i.alwaysShowScrollbar?(2!==i.alwaysShowScrollbar&&c[1].css("display","none"),l.removeClass(d[11])):(s[1].css("display","none"),l.addClass(d[11])),l.addClass(d[9]))),n.overflowed[0]||n.overflowed[1]?o.removeClass(d[5]):o.addClass(d[5])},O=function(t){var o=t.type,a=t.target.ownerDocument!==document&&null!==frameElement?[e(frameElement).offset().top,e(frameElement).offset().left]:null,n=A()&&t.target.ownerDocument!==top.document&&null!==frameElement?[e(t.view.frameElement).offset().top,e(t.view.frameElement).offset().left]:[0,0];switch(o){case"pointerdown":case"MSPointerDown":case"pointermove":case"MSPointerMove":case"pointerup":case"MSPointerUp":return a?[t.originalEvent.pageY-a[0]+n[0],t.originalEvent.pageX-a[1]+n[1],!1]:[t.originalEvent.pageY,t.originalEvent.pageX,!1];case"touchstart":case"touchmove":case"touchend":var i=t.originalEvent.touches[0]||t.originalEvent.changedTouches[0],r=t.originalEvent.touches.length||t.originalEvent.changedTouches.length;return t.target.ownerDocument!==document?[i.screenY,i.screenX,r>1]:[i.pageY,i.pageX,r>1];default:return a?[t.pageY-a[0]+n[0],t.pageX-a[1]+n[1],!1]:[t.pageY,t.pageX,!1]}},I=function(){function t(e,t,a,n){if(h[0].idleTimer=d.scrollInertia<233?250:0,o.attr("id")===f[1])var i="x",s=(o[0].offsetLeft-t+n)*l.scrollRatio.x;else var i="y",s=(o[0].offsetTop-e+a)*l.scrollRatio.y;G(r,s.toString(),{dir:i,drag:!0})}var o,n,i,r=e(this),l=r.data(a),d=l.opt,u=a+"_"+l.idx,f=["mCSB_"+l.idx+"_dragger_vertical","mCSB_"+l.idx+"_dragger_horizontal"],h=e("#mCSB_"+l.idx+"_container"),m=e("#"+f[0]+",#"+f[1]),p=d.advanced.releaseDraggableSelectors?m.add(e(d.advanced.releaseDraggableSelectors)):m,g=d.advanced.extraDraggableSelectors?e(!A()||top.document).add(e(d.advanced.extraDraggableSelectors)):e(!A()||top.document);m.bind("contextmenu."+u,function(e){e.preventDefault()}).bind("mousedown."+u+" touchstart."+u+" pointerdown."+u+" MSPointerDown."+u,function(t){if(t.stopImmediatePropagation(),t.preventDefault(),ee(t)){c=!0,s&&(document.onselectstart=function(){return!1}),L.call(h,!1),Q(r),o=e(this);var a=o.offset(),l=O(t)[0]-a.top,u=O(t)[1]-a.left,f=o.height()+a.top,m=o.width()+a.left;f>l&&l>0&&m>u&&u>0&&(n=l,i=u),C(o,"active",d.autoExpandScrollbar)}}).bind("touchmove."+u,function(e){e.stopImmediatePropagation(),e.preventDefault();var a=o.offset(),r=O(e)[0]-a.top,l=O(e)[1]-a.left;t(n,i,r,l)}),e(document).add(g).bind("mousemove."+u+" pointermove."+u+" MSPointerMove."+u,function(e){if(o){var a=o.offset(),r=O(e)[0]-a.top,l=O(e)[1]-a.left;if(n===r&&i===l)return;t(n,i,r,l)}}).add(p).bind("mouseup."+u+" touchend."+u+" pointerup."+u+" MSPointerUp."+u,function(){o&&(C(o,"active",d.autoExpandScrollbar),o=null),c=!1,s&&(document.onselectstart=null),L.call(h,!0)})},D=function(){function o(e){if(!te(e)||c||O(e)[2])return void(t=0);t=1,b=0,C=0,d=1,y.removeClass("mCS_touch_action");var o=I.offset();u=O(e)[0]-o.top,f=O(e)[1]-o.left,z=[O(e)[0],O(e)[1]]}function n(e){if(te(e)&&!c&&!O(e)[2]&&(T.documentTouchScroll||e.preventDefault(),e.stopImmediatePropagation(),(!C||b)&&d)){g=K();var t=M.offset(),o=O(e)[0]-t.top,a=O(e)[1]-t.left,n="mcsLinearOut";if(E.push(o),W.push(a),z[2]=Math.abs(O(e)[0]-z[0]),z[3]=Math.abs(O(e)[1]-z[1]),B.overflowed[0])var i=D[0].parent().height()-D[0].height(),r=u-o>0&&o-u>-(i*B.scrollRatio.y)&&(2*z[3]<z[2]||"yx"===T.axis);if(B.overflowed[1])var l=D[1].parent().width()-D[1].width(),h=f-a>0&&a-f>-(l*B.scrollRatio.x)&&(2*z[2]<z[3]||"yx"===T.axis);r||h?(U||e.preventDefault(),b=1):(C=1,y.addClass("mCS_touch_action")),U&&e.preventDefault(),w="yx"===T.axis?[u-o,f-a]:"x"===T.axis?[null,f-a]:[u-o,null],I[0].idleTimer=250,B.overflowed[0]&&s(w[0],R,n,"y","all",!0),B.overflowed[1]&&s(w[1],R,n,"x",L,!0)}}function i(e){if(!te(e)||c||O(e)[2])return void(t=0);t=1,e.stopImmediatePropagation(),Q(y),p=K();var o=M.offset();h=O(e)[0]-o.top,m=O(e)[1]-o.left,E=[],W=[]}function r(e){if(te(e)&&!c&&!O(e)[2]){d=0,e.stopImmediatePropagation(),b=0,C=0,v=K();var t=M.offset(),o=O(e)[0]-t.top,a=O(e)[1]-t.left;if(!(v-g>30)){_=1e3/(v-p);var n="mcsEaseOut",i=2.5>_,r=i?[E[E.length-2],W[W.length-2]]:[0,0];x=i?[o-r[0],a-r[1]]:[o-h,a-m];var u=[Math.abs(x[0]),Math.abs(x[1])];_=i?[Math.abs(x[0]/4),Math.abs(x[1]/4)]:[_,_];var f=[Math.abs(I[0].offsetTop)-x[0]*l(u[0]/_[0],_[0]),Math.abs(I[0].offsetLeft)-x[1]*l(u[1]/_[1],_[1])];w="yx"===T.axis?[f[0],f[1]]:"x"===T.axis?[null,f[1]]:[f[0],null],S=[4*u[0]+T.scrollInertia,4*u[1]+T.scrollInertia];var y=parseInt(T.contentTouchScroll)||0;w[0]=u[0]>y?w[0]:0,w[1]=u[1]>y?w[1]:0,B.overflowed[0]&&s(w[0],S[0],n,"y",L,!1),B.overflowed[1]&&s(w[1],S[1],n,"x",L,!1)}}}function l(e,t){var o=[1.5*t,2*t,t/1.5,t/2];return e>90?t>4?o[0]:o[3]:e>60?t>3?o[3]:o[2]:e>30?t>8?o[1]:t>6?o[0]:t>4?t:o[2]:t>8?t:o[3]}function s(e,t,o,a,n,i){e&&G(y,e.toString(),{dur:t,scrollEasing:o,dir:a,overwrite:n,drag:i})}var d,u,f,h,m,p,g,v,x,_,w,S,b,C,y=e(this),B=y.data(a),T=B.opt,k=a+"_"+B.idx,M=e("#mCSB_"+B.idx),I=e("#mCSB_"+B.idx+"_container"),D=[e("#mCSB_"+B.idx+"_dragger_vertical"),e("#mCSB_"+B.idx+"_dragger_horizontal")],E=[],W=[],R=0,L="yx"===T.axis?"none":"all",z=[],P=I.find("iframe"),H=["touchstart."+k+" pointerdown."+k+" MSPointerDown."+k,"touchmove."+k+" pointermove."+k+" MSPointerMove."+k,"touchend."+k+" pointerup."+k+" MSPointerUp."+k],U=void 0!==document.body.style.touchAction&&""!==document.body.style.touchAction;I.bind(H[0],function(e){o(e)}).bind(H[1],function(e){n(e)}),M.bind(H[0],function(e){i(e)}).bind(H[2],function(e){r(e)}),P.length&&P.each(function(){e(this).bind("load",function(){A(this)&&e(this.contentDocument||this.contentWindow.document).bind(H[0],function(e){o(e),i(e)}).bind(H[1],function(e){n(e)}).bind(H[2],function(e){r(e)})})})},E=function(){function o(){return window.getSelection?window.getSelection().toString():document.selection&&"Control"!=document.selection.type?document.selection.createRange().text:0}function n(e,t,o){d.type=o&&i?"stepped":"stepless",d.scrollAmount=10,j(r,e,t,"mcsLinearOut",o?60:null)}var i,r=e(this),l=r.data(a),s=l.opt,d=l.sequential,u=a+"_"+l.idx,f=e("#mCSB_"+l.idx+"_container"),h=f.parent();f.bind("mousedown."+u,function(){t||i||(i=1,c=!0)}).add(document).bind("mousemove."+u,function(e){if(!t&&i&&o()){var a=f.offset(),r=O(e)[0]-a.top+f[0].offsetTop,c=O(e)[1]-a.left+f[0].offsetLeft;r>0&&r<h.height()&&c>0&&c<h.width()?d.step&&n("off",null,"stepped"):("x"!==s.axis&&l.overflowed[0]&&(0>r?n("on",38):r>h.height()&&n("on",40)),"y"!==s.axis&&l.overflowed[1]&&(0>c?n("on",37):c>h.width()&&n("on",39)))}}).bind("mouseup."+u+" dragend."+u,function(){t||(i&&(i=0,n("off",null)),c=!1)})},W=function(){function t(t,a){if(Q(o),!z(o,t.target)){var r="auto"!==i.mouseWheel.deltaFactor?parseInt(i.mouseWheel.deltaFactor):s&&t.deltaFactor<100?100:t.deltaFactor||100,d=i.scrollInertia;if("x"===i.axis||"x"===i.mouseWheel.axis)var u="x",f=[Math.round(r*n.scrollRatio.x),parseInt(i.mouseWheel.scrollAmount)],h="auto"!==i.mouseWheel.scrollAmount?f[1]:f[0]>=l.width()?.9*l.width():f[0],m=Math.abs(e("#mCSB_"+n.idx+"_container")[0].offsetLeft),p=c[1][0].offsetLeft,g=c[1].parent().width()-c[1].width(),v="y"===i.mouseWheel.axis?t.deltaY||a:t.deltaX;else var u="y",f=[Math.round(r*n.scrollRatio.y),parseInt(i.mouseWheel.scrollAmount)],h="auto"!==i.mouseWheel.scrollAmount?f[1]:f[0]>=l.height()?.9*l.height():f[0],m=Math.abs(e("#mCSB_"+n.idx+"_container")[0].offsetTop),p=c[0][0].offsetTop,g=c[0].parent().height()-c[0].height(),v=t.deltaY||a;"y"===u&&!n.overflowed[0]||"x"===u&&!n.overflowed[1]||((i.mouseWheel.invert||t.webkitDirectionInvertedFromDevice)&&(v=-v),i.mouseWheel.normalizeDelta&&(v=0>v?-1:1),(v>0&&0!==p||0>v&&p!==g||i.mouseWheel.preventDefault)&&(t.stopImmediatePropagation(),t.preventDefault()),t.deltaFactor<5&&!i.mouseWheel.normalizeDelta&&(h=t.deltaFactor,d=17),G(o,(m-v*h).toString(),{dir:u,dur:d}))}}if(e(this).data(a)){var o=e(this),n=o.data(a),i=n.opt,r=a+"_"+n.idx,l=e("#mCSB_"+n.idx),c=[e("#mCSB_"+n.idx+"_dragger_vertical"),e("#mCSB_"+n.idx+"_dragger_horizontal")],d=e("#mCSB_"+n.idx+"_container").find("iframe");d.length&&d.each(function(){e(this).bind("load",function(){A(this)&&e(this.contentDocument||this.contentWindow.document).bind("mousewheel."+r,function(e,o){t(e,o)})})}),l.bind("mousewheel."+r,function(e,o){t(e,o)})}},R=new Object,A=function(t){var o=!1,a=!1,n=null;if(void 0===t?a="#empty":void 0!==e(t).attr("id")&&(a=e(t).attr("id")),a!==!1&&void 0!==R[a])return R[a];if(t){try{var i=t.contentDocument||t.contentWindow.document;n=i.body.innerHTML}catch(r){}o=null!==n}else{try{var i=top.document;n=i.body.innerHTML}catch(r){}o=null!==n}return a!==!1&&(R[a]=o),o},L=function(e){var t=this.find("iframe");if(t.length){var o=e?"auto":"none";t.css("pointer-events",o)}},z=function(t,o){var n=o.nodeName.toLowerCase(),i=t.data(a).opt.mouseWheel.disableOver,r=["select","textarea"];return e.inArray(n,i)>-1&&!(e.inArray(n,r)>-1&&!e(o).is(":focus"))},P=function(){var t,o=e(this),n=o.data(a),i=a+"_"+n.idx,r=e("#mCSB_"+n.idx+"_container"),l=r.parent(),s=e(".mCSB_"+n.idx+"_scrollbar ."+d[12]);s.bind("mousedown."+i+" touchstart."+i+" pointerdown."+i+" MSPointerDown."+i,function(o){c=!0,e(o.target).hasClass("mCSB_dragger")||(t=1)}).bind("touchend."+i+" pointerup."+i+" MSPointerUp."+i,function(){c=!1}).bind("click."+i,function(a){if(t&&(t=0,e(a.target).hasClass(d[12])||e(a.target).hasClass("mCSB_draggerRail"))){Q(o);var i=e(this),s=i.find(".mCSB_dragger");if(i.parent(".mCSB_scrollTools_horizontal").length>0){if(!n.overflowed[1])return;var c="x",u=a.pageX>s.offset().left?-1:1,f=Math.abs(r[0].offsetLeft)-u*(.9*l.width())}else{if(!n.overflowed[0])return;var c="y",u=a.pageY>s.offset().top?-1:1,f=Math.abs(r[0].offsetTop)-u*(.9*l.height())}G(o,f.toString(),{dir:c,scrollEasing:"mcsEaseInOut"})}})},H=function(){var t=e(this),o=t.data(a),n=o.opt,i=a+"_"+o.idx,r=e("#mCSB_"+o.idx+"_container"),l=r.parent();r.bind("focusin."+i,function(){var o=e(document.activeElement),a=r.find(".mCustomScrollBox").length,i=0;o.is(n.advanced.autoScrollOnFocus)&&(Q(t),clearTimeout(t[0]._focusTimeout),t[0]._focusTimer=a?(i+17)*a:0,t[0]._focusTimeout=setTimeout(function(){var e=[ae(o)[0],ae(o)[1]],a=[r[0].offsetTop,r[0].offsetLeft],s=[a[0]+e[0]>=0&&a[0]+e[0]<l.height()-o.outerHeight(!1),a[1]+e[1]>=0&&a[0]+e[1]<l.width()-o.outerWidth(!1)],c="yx"!==n.axis||s[0]||s[1]?"all":"none";"x"===n.axis||s[0]||G(t,e[0].toString(),{dir:"y",scrollEasing:"mcsEaseInOut",overwrite:c,dur:i}),"y"===n.axis||s[1]||G(t,e[1].toString(),{dir:"x",scrollEasing:"mcsEaseInOut",overwrite:c,dur:i})},t[0]._focusTimer))})},U=function(){var t=e(this),o=t.data(a),n=a+"_"+o.idx,i=e("#mCSB_"+o.idx+"_container").parent();i.bind("scroll."+n,function(){0===i.scrollTop()&&0===i.scrollLeft()||e(".mCSB_"+o.idx+"_scrollbar").css("visibility","hidden")})},F=function(){var t=e(this),o=t.data(a),n=o.opt,i=o.sequential,r=a+"_"+o.idx,l=".mCSB_"+o.idx+"_scrollbar",s=e(l+">a");s.bind("contextmenu."+r,function(e){e.preventDefault()}).bind("mousedown."+r+" touchstart."+r+" pointerdown."+r+" MSPointerDown."+r+" mouseup."+r+" touchend."+r+" pointerup."+r+" MSPointerUp."+r+" mouseout."+r+" pointerout."+r+" MSPointerOut."+r+" click."+r,function(a){function r(e,o){i.scrollAmount=n.scrollButtons.scrollAmount,j(t,e,o)}if(a.preventDefault(),ee(a)){var l=e(this).attr("class");switch(i.type=n.scrollButtons.scrollType,a.type){case"mousedown":case"touchstart":case"pointerdown":case"MSPointerDown":if("stepped"===i.type)return;c=!0,o.tweenRunning=!1,r("on",l);break;case"mouseup":case"touchend":case"pointerup":case"MSPointerUp":case"mouseout":case"pointerout":case"MSPointerOut":if("stepped"===i.type)return;c=!1,i.dir&&r("off",l);break;case"click":if("stepped"!==i.type||o.tweenRunning)return;r("on",l)}}})},q=function(){function t(t){function a(e,t){r.type=i.keyboard.scrollType,r.scrollAmount=i.keyboard.scrollAmount,"stepped"===r.type&&n.tweenRunning||j(o,e,t)}switch(t.type){case"blur":n.tweenRunning&&r.dir&&a("off",null);break;case"keydown":case"keyup":var l=t.keyCode?t.keyCode:t.which,s="on";if("x"!==i.axis&&(38===l||40===l)||"y"!==i.axis&&(37===l||39===l)){if((38===l||40===l)&&!n.overflowed[0]||(37===l||39===l)&&!n.overflowed[1])return;"keyup"===t.type&&(s="off"),e(document.activeElement).is(u)||(t.preventDefault(),t.stopImmediatePropagation(),a(s,l))}else if(33===l||34===l){if((n.overflowed[0]||n.overflowed[1])&&(t.preventDefault(),t.stopImmediatePropagation()),"keyup"===t.type){Q(o);var f=34===l?-1:1;if("x"===i.axis||"yx"===i.axis&&n.overflowed[1]&&!n.overflowed[0])var h="x",m=Math.abs(c[0].offsetLeft)-f*(.9*d.width());else var h="y",m=Math.abs(c[0].offsetTop)-f*(.9*d.height());G(o,m.toString(),{dir:h,scrollEasing:"mcsEaseInOut"})}}else if((35===l||36===l)&&!e(document.activeElement).is(u)&&((n.overflowed[0]||n.overflowed[1])&&(t.preventDefault(),t.stopImmediatePropagation()),"keyup"===t.type)){if("x"===i.axis||"yx"===i.axis&&n.overflowed[1]&&!n.overflowed[0])var h="x",m=35===l?Math.abs(d.width()-c.outerWidth(!1)):0;else var h="y",m=35===l?Math.abs(d.height()-c.outerHeight(!1)):0;G(o,m.toString(),{dir:h,scrollEasing:"mcsEaseInOut"})}}}var o=e(this),n=o.data(a),i=n.opt,r=n.sequential,l=a+"_"+n.idx,s=e("#mCSB_"+n.idx),c=e("#mCSB_"+n.idx+"_container"),d=c.parent(),u="input,textarea,select,datalist,keygen,[contenteditable='true']",f=c.find("iframe"),h=["blur."+l+" keydown."+l+" keyup."+l];f.length&&f.each(function(){e(this).bind("load",function(){A(this)&&e(this.contentDocument||this.contentWindow.document).bind(h[0],function(e){t(e)})})}),s.attr("tabindex","0").bind(h[0],function(e){t(e)})},j=function(t,o,n,i,r){function l(e){u.snapAmount&&(f.scrollAmount=u.snapAmount instanceof Array?"x"===f.dir[0]?u.snapAmount[1]:u.snapAmount[0]:u.snapAmount);var o="stepped"!==f.type,a=r?r:e?o?p/1.5:g:1e3/60,n=e?o?7.5:40:2.5,s=[Math.abs(h[0].offsetTop),Math.abs(h[0].offsetLeft)],d=[c.scrollRatio.y>10?10:c.scrollRatio.y,c.scrollRatio.x>10?10:c.scrollRatio.x],m="x"===f.dir[0]?s[1]+f.dir[1]*(d[1]*n):s[0]+f.dir[1]*(d[0]*n),v="x"===f.dir[0]?s[1]+f.dir[1]*parseInt(f.scrollAmount):s[0]+f.dir[1]*parseInt(f.scrollAmount),x="auto"!==f.scrollAmount?v:m,_=i?i:e?o?"mcsLinearOut":"mcsEaseInOut":"mcsLinear",w=!!e;return e&&17>a&&(x="x"===f.dir[0]?s[1]:s[0]),G(t,x.toString(),{dir:f.dir[0],scrollEasing:_,dur:a,onComplete:w}),e?void(f.dir=!1):(clearTimeout(f.step),void(f.step=setTimeout(function(){l()},a)))}function s(){clearTimeout(f.step),$(f,"step"),Q(t)}var c=t.data(a),u=c.opt,f=c.sequential,h=e("#mCSB_"+c.idx+"_container"),m="stepped"===f.type,p=u.scrollInertia<26?26:u.scrollInertia,g=u.scrollInertia<1?17:u.scrollInertia;switch(o){case"on":if(f.dir=[n===d[16]||n===d[15]||39===n||37===n?"x":"y",n===d[13]||n===d[15]||38===n||37===n?-1:1],Q(t),oe(n)&&"stepped"===f.type)return;l(m);break;case"off":s(),(m||c.tweenRunning&&f.dir)&&l(!0)}},Y=function(t){var o=e(this).data(a).opt,n=[];return"function"==typeof t&&(t=t()),t instanceof Array?n=t.length>1?[t[0],t[1]]:"x"===o.axis?[null,t[0]]:[t[0],null]:(n[0]=t.y?t.y:t.x||"x"===o.axis?null:t,n[1]=t.x?t.x:t.y||"y"===o.axis?null:t),"function"==typeof n[0]&&(n[0]=n[0]()),"function"==typeof n[1]&&(n[1]=n[1]()),n},X=function(t,o){if(null!=t&&"undefined"!=typeof t){var n=e(this),i=n.data(a),r=i.opt,l=e("#mCSB_"+i.idx+"_container"),s=l.parent(),c=typeof t;o||(o="x"===r.axis?"x":"y");var d="x"===o?l.outerWidth(!1)-s.width():l.outerHeight(!1)-s.height(),f="x"===o?l[0].offsetLeft:l[0].offsetTop,h="x"===o?"left":"top";switch(c){case"function":return t();case"object":var m=t.jquery?t:e(t);if(!m.length)return;return"x"===o?ae(m)[1]:ae(m)[0];case"string":case"number":if(oe(t))return Math.abs(t);if(-1!==t.indexOf("%"))return Math.abs(d*parseInt(t)/100);if(-1!==t.indexOf("-="))return Math.abs(f-parseInt(t.split("-=")[1]));if(-1!==t.indexOf("+=")){var p=f+parseInt(t.split("+=")[1]);return p>=0?0:Math.abs(p)}if(-1!==t.indexOf("px")&&oe(t.split("px")[0]))return Math.abs(t.split("px")[0]);if("top"===t||"left"===t)return 0;if("bottom"===t)return Math.abs(s.height()-l.outerHeight(!1));if("right"===t)return Math.abs(s.width()-l.outerWidth(!1));if("first"===t||"last"===t){var m=l.find(":"+t);return"x"===o?ae(m)[1]:ae(m)[0]}return e(t).length?"x"===o?ae(e(t))[1]:ae(e(t))[0]:(l.css(h,t),void u.update.call(null,n[0]))}}},N=function(t){function o(){return clearTimeout(f[0].autoUpdate),0===l.parents("html").length?void(l=null):void(f[0].autoUpdate=setTimeout(function(){return c.advanced.updateOnSelectorChange&&(s.poll.change.n=i(),s.poll.change.n!==s.poll.change.o)?(s.poll.change.o=s.poll.change.n,void r(3)):c.advanced.updateOnContentResize&&(s.poll.size.n=l[0].scrollHeight+l[0].scrollWidth+f[0].offsetHeight+l[0].offsetHeight+l[0].offsetWidth,s.poll.size.n!==s.poll.size.o)?(s.poll.size.o=s.poll.size.n,void r(1)):!c.advanced.updateOnImageLoad||"auto"===c.advanced.updateOnImageLoad&&"y"===c.axis||(s.poll.img.n=f.find("img").length,s.poll.img.n===s.poll.img.o)?void((c.advanced.updateOnSelectorChange||c.advanced.updateOnContentResize||c.advanced.updateOnImageLoad)&&o()):(s.poll.img.o=s.poll.img.n,void f.find("img").each(function(){n(this)}))},c.advanced.autoUpdateTimeout))}function n(t){function o(e,t){return function(){
return t.apply(e,arguments)}}function a(){this.onload=null,e(t).addClass(d[2]),r(2)}if(e(t).hasClass(d[2]))return void r();var n=new Image;n.onload=o(n,a),n.src=t.src}function i(){c.advanced.updateOnSelectorChange===!0&&(c.advanced.updateOnSelectorChange="*");var e=0,t=f.find(c.advanced.updateOnSelectorChange);return c.advanced.updateOnSelectorChange&&t.length>0&&t.each(function(){e+=this.offsetHeight+this.offsetWidth}),e}function r(e){clearTimeout(f[0].autoUpdate),u.update.call(null,l[0],e)}var l=e(this),s=l.data(a),c=s.opt,f=e("#mCSB_"+s.idx+"_container");return t?(clearTimeout(f[0].autoUpdate),void $(f[0],"autoUpdate")):void o()},V=function(e,t,o){return Math.round(e/t)*t-o},Q=function(t){var o=t.data(a),n=e("#mCSB_"+o.idx+"_container,#mCSB_"+o.idx+"_container_wrapper,#mCSB_"+o.idx+"_dragger_vertical,#mCSB_"+o.idx+"_dragger_horizontal");n.each(function(){Z.call(this)})},G=function(t,o,n){function i(e){return s&&c.callbacks[e]&&"function"==typeof c.callbacks[e]}function r(){return[c.callbacks.alwaysTriggerOffsets||w>=S[0]+y,c.callbacks.alwaysTriggerOffsets||-B>=w]}function l(){var e=[h[0].offsetTop,h[0].offsetLeft],o=[x[0].offsetTop,x[0].offsetLeft],a=[h.outerHeight(!1),h.outerWidth(!1)],i=[f.height(),f.width()];t[0].mcs={content:h,top:e[0],left:e[1],draggerTop:o[0],draggerLeft:o[1],topPct:Math.round(100*Math.abs(e[0])/(Math.abs(a[0])-i[0])),leftPct:Math.round(100*Math.abs(e[1])/(Math.abs(a[1])-i[1])),direction:n.dir}}var s=t.data(a),c=s.opt,d={trigger:"internal",dir:"y",scrollEasing:"mcsEaseOut",drag:!1,dur:c.scrollInertia,overwrite:"all",callbacks:!0,onStart:!0,onUpdate:!0,onComplete:!0},n=e.extend(d,n),u=[n.dur,n.drag?0:n.dur],f=e("#mCSB_"+s.idx),h=e("#mCSB_"+s.idx+"_container"),m=h.parent(),p=c.callbacks.onTotalScrollOffset?Y.call(t,c.callbacks.onTotalScrollOffset):[0,0],g=c.callbacks.onTotalScrollBackOffset?Y.call(t,c.callbacks.onTotalScrollBackOffset):[0,0];if(s.trigger=n.trigger,0===m.scrollTop()&&0===m.scrollLeft()||(e(".mCSB_"+s.idx+"_scrollbar").css("visibility","visible"),m.scrollTop(0).scrollLeft(0)),"_resetY"!==o||s.contentReset.y||(i("onOverflowYNone")&&c.callbacks.onOverflowYNone.call(t[0]),s.contentReset.y=1),"_resetX"!==o||s.contentReset.x||(i("onOverflowXNone")&&c.callbacks.onOverflowXNone.call(t[0]),s.contentReset.x=1),"_resetY"!==o&&"_resetX"!==o){if(!s.contentReset.y&&t[0].mcs||!s.overflowed[0]||(i("onOverflowY")&&c.callbacks.onOverflowY.call(t[0]),s.contentReset.x=null),!s.contentReset.x&&t[0].mcs||!s.overflowed[1]||(i("onOverflowX")&&c.callbacks.onOverflowX.call(t[0]),s.contentReset.x=null),c.snapAmount){var v=c.snapAmount instanceof Array?"x"===n.dir?c.snapAmount[1]:c.snapAmount[0]:c.snapAmount;o=V(o,v,c.snapOffset)}switch(n.dir){case"x":var x=e("#mCSB_"+s.idx+"_dragger_horizontal"),_="left",w=h[0].offsetLeft,S=[f.width()-h.outerWidth(!1),x.parent().width()-x.width()],b=[o,0===o?0:o/s.scrollRatio.x],y=p[1],B=g[1],T=y>0?y/s.scrollRatio.x:0,k=B>0?B/s.scrollRatio.x:0;break;case"y":var x=e("#mCSB_"+s.idx+"_dragger_vertical"),_="top",w=h[0].offsetTop,S=[f.height()-h.outerHeight(!1),x.parent().height()-x.height()],b=[o,0===o?0:o/s.scrollRatio.y],y=p[0],B=g[0],T=y>0?y/s.scrollRatio.y:0,k=B>0?B/s.scrollRatio.y:0}b[1]<0||0===b[0]&&0===b[1]?b=[0,0]:b[1]>=S[1]?b=[S[0],S[1]]:b[0]=-b[0],t[0].mcs||(l(),i("onInit")&&c.callbacks.onInit.call(t[0])),clearTimeout(h[0].onCompleteTimeout),J(x[0],_,Math.round(b[1]),u[1],n.scrollEasing),!s.tweenRunning&&(0===w&&b[0]>=0||w===S[0]&&b[0]<=S[0])||J(h[0],_,Math.round(b[0]),u[0],n.scrollEasing,n.overwrite,{onStart:function(){n.callbacks&&n.onStart&&!s.tweenRunning&&(i("onScrollStart")&&(l(),c.callbacks.onScrollStart.call(t[0])),s.tweenRunning=!0,C(x),s.cbOffsets=r())},onUpdate:function(){n.callbacks&&n.onUpdate&&i("whileScrolling")&&(l(),c.callbacks.whileScrolling.call(t[0]))},onComplete:function(){if(n.callbacks&&n.onComplete){"yx"===c.axis&&clearTimeout(h[0].onCompleteTimeout);var e=h[0].idleTimer||0;h[0].onCompleteTimeout=setTimeout(function(){i("onScroll")&&(l(),c.callbacks.onScroll.call(t[0])),i("onTotalScroll")&&b[1]>=S[1]-T&&s.cbOffsets[0]&&(l(),c.callbacks.onTotalScroll.call(t[0])),i("onTotalScrollBack")&&b[1]<=k&&s.cbOffsets[1]&&(l(),c.callbacks.onTotalScrollBack.call(t[0])),s.tweenRunning=!1,h[0].idleTimer=0,C(x,"hide")},e)}}})}},J=function(e,t,o,a,n,i,r){function l(){S.stop||(x||m.call(),x=K()-v,s(),x>=S.time&&(S.time=x>S.time?x+f-(x-S.time):x+f-1,S.time<x+1&&(S.time=x+1)),S.time<a?S.id=h(l):g.call())}function s(){a>0?(S.currVal=u(S.time,_,b,a,n),w[t]=Math.round(S.currVal)+"px"):w[t]=o+"px",p.call()}function c(){f=1e3/60,S.time=x+f,h=window.requestAnimationFrame?window.requestAnimationFrame:function(e){return s(),setTimeout(e,.01)},S.id=h(l)}function d(){null!=S.id&&(window.requestAnimationFrame?window.cancelAnimationFrame(S.id):clearTimeout(S.id),S.id=null)}function u(e,t,o,a,n){switch(n){case"linear":case"mcsLinear":return o*e/a+t;case"mcsLinearOut":return e/=a,e--,o*Math.sqrt(1-e*e)+t;case"easeInOutSmooth":return e/=a/2,1>e?o/2*e*e+t:(e--,-o/2*(e*(e-2)-1)+t);case"easeInOutStrong":return e/=a/2,1>e?o/2*Math.pow(2,10*(e-1))+t:(e--,o/2*(-Math.pow(2,-10*e)+2)+t);case"easeInOut":case"mcsEaseInOut":return e/=a/2,1>e?o/2*e*e*e+t:(e-=2,o/2*(e*e*e+2)+t);case"easeOutSmooth":return e/=a,e--,-o*(e*e*e*e-1)+t;case"easeOutStrong":return o*(-Math.pow(2,-10*e/a)+1)+t;case"easeOut":case"mcsEaseOut":default:var i=(e/=a)*e,r=i*e;return t+o*(.499999999999997*r*i+-2.5*i*i+5.5*r+-6.5*i+4*e)}}e._mTween||(e._mTween={top:{},left:{}});var f,h,r=r||{},m=r.onStart||function(){},p=r.onUpdate||function(){},g=r.onComplete||function(){},v=K(),x=0,_=e.offsetTop,w=e.style,S=e._mTween[t];"left"===t&&(_=e.offsetLeft);var b=o-_;S.stop=0,"none"!==i&&d(),c()},K=function(){return window.performance&&window.performance.now?window.performance.now():window.performance&&window.performance.webkitNow?window.performance.webkitNow():Date.now?Date.now():(new Date).getTime()},Z=function(){var e=this;e._mTween||(e._mTween={top:{},left:{}});for(var t=["top","left"],o=0;o<t.length;o++){var a=t[o];e._mTween[a].id&&(window.requestAnimationFrame?window.cancelAnimationFrame(e._mTween[a].id):clearTimeout(e._mTween[a].id),e._mTween[a].id=null,e._mTween[a].stop=1)}},$=function(e,t){try{delete e[t]}catch(o){e[t]=null}},ee=function(e){return!(e.which&&1!==e.which)},te=function(e){var t=e.originalEvent.pointerType;return!(t&&"touch"!==t&&2!==t)},oe=function(e){return!isNaN(parseFloat(e))&&isFinite(e)},ae=function(e){var t=e.parents(".mCSB_container");return[e.offset().top-t.offset().top,e.offset().left-t.offset().left]},ne=function(){function e(){var e=["webkit","moz","ms","o"];if("hidden"in document)return"hidden";for(var t=0;t<e.length;t++)if(e[t]+"Hidden"in document)return e[t]+"Hidden";return null}var t=e();return t?document[t]:!1};e.fn[o]=function(t){return u[t]?u[t].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof t&&t?void e.error("Method "+t+" does not exist"):u.init.apply(this,arguments)},e[o]=function(t){return u[t]?u[t].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof t&&t?void e.error("Method "+t+" does not exist"):u.init.apply(this,arguments)},e[o].defaults=i,window[o]=!0,e(window).bind("load",function(){e(n)[o](),e.extend(e.expr[":"],{mcsInView:e.expr[":"].mcsInView||function(t){var o,a,n=e(t),i=n.parents(".mCSB_container");if(i.length)return o=i.parent(),a=[i[0].offsetTop,i[0].offsetLeft],a[0]+ae(n)[0]>=0&&a[0]+ae(n)[0]<o.height()-n.outerHeight(!1)&&a[1]+ae(n)[1]>=0&&a[1]+ae(n)[1]<o.width()-n.outerWidth(!1)},mcsInSight:e.expr[":"].mcsInSight||function(t,o,a){var n,i,r,l,s=e(t),c=s.parents(".mCSB_container"),d="exact"===a[3]?[[1,0],[1,0]]:[[.9,.1],[.6,.4]];if(c.length)return n=[s.outerHeight(!1),s.outerWidth(!1)],r=[c[0].offsetTop+ae(s)[0],c[0].offsetLeft+ae(s)[1]],i=[c.parent()[0].offsetHeight,c.parent()[0].offsetWidth],l=[n[0]<i[0]?d[0]:d[1],n[1]<i[1]?d[0]:d[1]],r[0]-i[0]*l[0][0]<0&&r[0]+n[0]-i[0]*l[0][1]>=0&&r[1]-i[1]*l[1][0]<0&&r[1]+n[1]-i[1]*l[1][1]>=0},mcsOverflow:e.expr[":"].mcsOverflow||function(t){var o=e(t).data(a);if(o)return o.overflowed[0]||o.overflowed[1]}})})})});
//
//../pacotes/bootstrap/js/bootstrap.min.js
/*!
* Bootstrap v3.3.6 (http://getbootstrap.com)
* Copyright 2011-2015 Twitter, Inc.
* Licensed under the MIT license
*/
if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";var b=a.fn.jquery.split(" ")[0].split(".");if(b[0]<2&&b[1]<9||1==b[0]&&9==b[1]&&b[2]<1||b[0]>2)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 3")}(jQuery),+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){return a(b.target).is(this)?b.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var c=a(this),e=c.data("bs.alert");e||c.data("bs.alert",e=new d(this)),"string"==typeof b&&e[b].call(c)})}var c='[data-dismiss="alert"]',d=function(b){a(b).on("click",c,this.close)};d.VERSION="3.3.6",d.TRANSITION_DURATION=150,d.prototype.close=function(b){function c(){g.detach().trigger("closed.bs.alert").remove()}var e=a(this),f=e.attr("data-target");f||(f=e.attr("href"),f=f&&f.replace(/.*(?=#[^\s]*$)/,""));var g=a(f);b&&b.preventDefault(),g.length||(g=e.closest(".alert")),g.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(g.removeClass("in"),a.support.transition&&g.hasClass("fade")?g.one("bsTransitionEnd",c).emulateTransitionEnd(d.TRANSITION_DURATION):c())};var e=a.fn.alert;a.fn.alert=b,a.fn.alert.Constructor=d,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.bs.alert.data-api",c,d.prototype.close)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof b&&b;e||d.data("bs.button",e=new c(this,f)),"toggle"==b?e.toggle():b&&e.setState(b)})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.isLoading=!1};c.VERSION="3.3.6",c.DEFAULTS={loadingText:"loading..."},c.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",null==f.resetText&&d.data("resetText",d[e]()),setTimeout(a.proxy(function(){d[e](null==f[b]?this.options[b]:f[b]),"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},c.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")?(c.prop("checked")&&(a=!1),b.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==c.prop("type")&&(c.prop("checked")!==this.$element.hasClass("active")&&(a=!1),this.$element.toggleClass("active")),c.prop("checked",this.$element.hasClass("active")),a&&c.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=b,a.fn.button.Constructor=c,a.fn.button.noConflict=function(){return a.fn.button=d,this},a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(c){var d=a(c.target);d.hasClass("btn")||(d=d.closest(".btn")),b.call(d,"toggle"),a(c.target).is('input[type="radio"]')||a(c.target).is('input[type="checkbox"]')||c.preventDefault()}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(b){a(b.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(b.type))})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b),g="string"==typeof b?b:f.slide;e||d.data("bs.carousel",e=new c(this,f)),"number"==typeof b?e.to(b):g?e[g]():f.interval&&e.pause().cycle()})}var c=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",a.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",a.proxy(this.pause,this)).on("mouseleave.bs.carousel",a.proxy(this.cycle,this))};c.VERSION="3.3.6",c.TRANSITION_DURATION=600,c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},c.prototype.keydown=function(a){if(!/input|textarea/i.test(a.target.tagName)){switch(a.which){case 37:this.prev();break;case 39:this.next();break;default:return}a.preventDefault()}},c.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},c.prototype.getItemIndex=function(a){return this.$items=a.parent().children(".item"),this.$items.index(a||this.$active)},c.prototype.getItemForDirection=function(a,b){var c=this.getItemIndex(b),d="prev"==a&&0===c||"next"==a&&c==this.$items.length-1;if(d&&!this.options.wrap)return b;var e="prev"==a?-1:1,f=(c+e)%this.$items.length;return this.$items.eq(f)},c.prototype.to=function(a){var b=this,c=this.getItemIndex(this.$active=this.$element.find(".item.active"));return a>this.$items.length-1||0>a?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){b.to(a)}):c==a?this.pause().cycle():this.slide(a>c?"next":"prev",this.$items.eq(a))},c.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){return this.sliding?void 0:this.slide("next")},c.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},c.prototype.slide=function(b,d){var e=this.$element.find(".item.active"),f=d||this.getItemForDirection(b,e),g=this.interval,h="next"==b?"left":"right",i=this;if(f.hasClass("active"))return this.sliding=!1;var j=f[0],k=a.Event("slide.bs.carousel",{relatedTarget:j,direction:h});if(this.$element.trigger(k),!k.isDefaultPrevented()){if(this.sliding=!0,g&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=a(this.$indicators.children()[this.getItemIndex(f)]);l&&l.addClass("active")}var m=a.Event("slid.bs.carousel",{relatedTarget:j,direction:h});return a.support.transition&&this.$element.hasClass("slide")?(f.addClass(b),f[0].offsetWidth,e.addClass(h),f.addClass(h),e.one("bsTransitionEnd",function(){f.removeClass([b,h].join(" ")).addClass("active"),e.removeClass(["active",h].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger(m)},0)}).emulateTransitionEnd(c.TRANSITION_DURATION)):(e.removeClass("active"),f.addClass("active"),this.sliding=!1,this.$element.trigger(m)),g&&this.cycle(),this}};var d=a.fn.carousel;a.fn.carousel=b,a.fn.carousel.Constructor=c,a.fn.carousel.noConflict=function(){return a.fn.carousel=d,this};var e=function(c){var d,e=a(this),f=a(e.attr("data-target")||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""));if(f.hasClass("carousel")){var g=a.extend({},f.data(),e.data()),h=e.attr("data-slide-to");h&&(g.interval=!1),b.call(f,g),h&&f.data("bs.carousel").to(h),c.preventDefault()}};a(document).on("click.bs.carousel.data-api","[data-slide]",e).on("click.bs.carousel.data-api","[data-slide-to]",e),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var c=a(this);b.call(c,c.data())})})}(jQuery),+function(a){"use strict";function b(b){var c,d=b.attr("data-target")||(c=b.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"");return a(d)}function c(b){return this.each(function(){var c=a(this),e=c.data("bs.collapse"),f=a.extend({},d.DEFAULTS,c.data(),"object"==typeof b&&b);!e&&f.toggle&&/show|hide/.test(b)&&(f.toggle=!1),e||c.data("bs.collapse",e=new d(this,f)),"string"==typeof b&&e[b]()})}var d=function(b,c){this.$element=a(b),this.options=a.extend({},d.DEFAULTS,c),this.$trigger=a('[data-toggle="collapse"][href="#'+b.id+'"],[data-toggle="collapse"][data-target="#'+b.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};d.VERSION="3.3.6",d.TRANSITION_DURATION=350,d.DEFAULTS={toggle:!0},d.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},d.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b,e=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(e&&e.length&&(b=e.data("bs.collapse"),b&&b.transitioning))){var f=a.Event("show.bs.collapse");if(this.$element.trigger(f),!f.isDefaultPrevented()){e&&e.length&&(c.call(e,"hide"),b||e.data("bs.collapse",null));var g=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[g](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var h=function(){this.$element.removeClass("collapsing").addClass("collapse in")[g](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return h.call(this);var i=a.camelCase(["scroll",g].join("-"));this.$element.one("bsTransitionEnd",a.proxy(h,this)).emulateTransitionEnd(d.TRANSITION_DURATION)[g](this.$element[0][i])}}}},d.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var e=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return a.support.transition?void this.$element[c](0).one("bsTransitionEnd",a.proxy(e,this)).emulateTransitionEnd(d.TRANSITION_DURATION):e.call(this)}}},d.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},d.prototype.getParent=function(){return a(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(a.proxy(function(c,d){var e=a(d);this.addAriaAndCollapsedClass(b(e),e)},this)).end()},d.prototype.addAriaAndCollapsedClass=function(a,b){var c=a.hasClass("in");a.attr("aria-expanded",c),b.toggleClass("collapsed",!c).attr("aria-expanded",c)};var e=a.fn.collapse;a.fn.collapse=c,a.fn.collapse.Constructor=d,a.fn.collapse.noConflict=function(){return a.fn.collapse=e,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(d){var e=a(this);e.attr("data-target")||d.preventDefault();var f=b(e),g=f.data("bs.collapse"),h=g?"toggle":e.data();c.call(f,h)})}(jQuery),+function(a){"use strict";function b(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}function c(c){c&&3===c.which||(a(e).remove(),a(f).each(function(){var d=a(this),e=b(d),f={relatedTarget:this};e.hasClass("open")&&(c&&"click"==c.type&&/input|textarea/i.test(c.target.tagName)&&a.contains(e[0],c.target)||(e.trigger(c=a.Event("hide.bs.dropdown",f)),c.isDefaultPrevented()||(d.attr("aria-expanded","false"),e.removeClass("open").trigger(a.Event("hidden.bs.dropdown",f)))))}))}function d(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new g(this)),"string"==typeof b&&d[b].call(c)})}var e=".dropdown-backdrop",f='[data-toggle="dropdown"]',g=function(b){a(b).on("click.bs.dropdown",this.toggle)};g.VERSION="3.3.6",g.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=b(e),g=f.hasClass("open");if(c(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(a(this)).on("click",c);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdown",h)),d.isDefaultPrevented())return;e.trigger("focus").attr("aria-expanded","true"),f.toggleClass("open").trigger(a.Event("shown.bs.dropdown",h))}return!1}},g.prototype.keydown=function(c){if(/(38|40|27|32)/.test(c.which)&&!/input|textarea/i.test(c.target.tagName)){var d=a(this);if(c.preventDefault(),c.stopPropagation(),!d.is(".disabled, :disabled")){var e=b(d),g=e.hasClass("open");if(!g&&27!=c.which||g&&27==c.which)return 27==c.which&&e.find(f).trigger("focus"),d.trigger("click");var h=" li:not(.disabled):visible a",i=e.find(".dropdown-menu"+h);if(i.length){var j=i.index(c.target);38==c.which&&j>0&&j--,40==c.which&&j<i.length-1&&j++,~j||(j=0),i.eq(j).trigger("focus")}}}};var h=a.fn.dropdown;a.fn.dropdown=d,a.fn.dropdown.Constructor=g,a.fn.dropdown.noConflict=function(){return a.fn.dropdown=h,this},a(document).on("click.bs.dropdown.data-api",c).on("click.bs.dropdown.data-api",".dropdown form",function(a){a.stopPropagation()}).on("click.bs.dropdown.data-api",f,g.prototype.toggle).on("keydown.bs.dropdown.data-api",f,g.prototype.keydown).on("keydown.bs.dropdown.data-api",".dropdown-menu",g.prototype.keydown)}(jQuery),+function(a){"use strict";function b(b,d){return this.each(function(){var e=a(this),f=e.data("bs.modal"),g=a.extend({},c.DEFAULTS,e.data(),"object"==typeof b&&b);f||e.data("bs.modal",f=new c(this,g)),"string"==typeof b?f[b](d):g.show&&f.show(d)})}var c=function(b,c){this.options=c,this.$body=a(document.body),this.$element=a(b),this.$dialog=this.$element.find(".modal-dialog"),this.$backdrop=null,this.isShown=null,this.originalBodyPad=null,this.scrollbarWidth=0,this.ignoreBackdropClick=!1,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,a.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};c.VERSION="3.3.6",c.TRANSITION_DURATION=300,c.BACKDROP_TRANSITION_DURATION=150,c.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},c.prototype.toggle=function(a){return this.isShown?this.hide():this.show(a)},c.prototype.show=function(b){var d=this,e=a.Event("show.bs.modal",{relatedTarget:b});this.$element.trigger(e),this.isShown||e.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass("modal-open"),this.escape(),this.resize(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',a.proxy(this.hide,this)),this.$dialog.on("mousedown.dismiss.bs.modal",function(){d.$element.one("mouseup.dismiss.bs.modal",function(b){a(b.target).is(d.$element)&&(d.ignoreBackdropClick=!0)})}),this.backdrop(function(){var e=a.support.transition&&d.$element.hasClass("fade");d.$element.parent().length||d.$element.appendTo(d.$body),d.$element.show().scrollTop(0),d.adjustDialog(),e&&d.$element[0].offsetWidth,d.$element.addClass("in"),d.enforceFocus();var f=a.Event("shown.bs.modal",{relatedTarget:b});e?d.$dialog.one("bsTransitionEnd",function(){d.$element.trigger("focus").trigger(f)}).emulateTransitionEnd(c.TRANSITION_DURATION):d.$element.trigger("focus").trigger(f)}))},c.prototype.hide=function(b){b&&b.preventDefault(),b=a.Event("hide.bs.modal"),this.$element.trigger(b),this.isShown&&!b.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),a(document).off("focusin.bs.modal"),this.$element.removeClass("in").off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"),this.$dialog.off("mousedown.dismiss.bs.modal"),a.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",a.proxy(this.hideModal,this)).emulateTransitionEnd(c.TRANSITION_DURATION):this.hideModal())},c.prototype.enforceFocus=function(){a(document).off("focusin.bs.modal").on("focusin.bs.modal",a.proxy(function(a){this.$element[0]===a.target||this.$element.has(a.target).length||this.$element.trigger("focus")},this))},c.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal",a.proxy(function(a){27==a.which&&this.hide()},this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")},c.prototype.resize=function(){this.isShown?a(window).on("resize.bs.modal",a.proxy(this.handleUpdate,this)):a(window).off("resize.bs.modal")},c.prototype.hideModal=function(){var a=this;this.$element.hide(),this.backdrop(function(){a.$body.removeClass("modal-open"),a.resetAdjustments(),a.resetScrollbar(),a.$element.trigger("hidden.bs.modal")})},c.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},c.prototype.backdrop=function(b){var d=this,e=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var f=a.support.transition&&e;if(this.$backdrop=a(document.createElement("div")).addClass("modal-backdrop "+e).appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",a.proxy(function(a){return this.ignoreBackdropClick?void(this.ignoreBackdropClick=!1):void(a.target===a.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus():this.hide()))},this)),f&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!b)return;f?this.$backdrop.one("bsTransitionEnd",b).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION):b()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var g=function(){d.removeBackdrop(),b&&b()};a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",g).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION):g()}else b&&b()},c.prototype.handleUpdate=function(){this.adjustDialog()},c.prototype.adjustDialog=function(){var a=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&a?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!a?this.scrollbarWidth:""})},c.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},c.prototype.checkScrollbar=function(){var a=window.innerWidth;if(!a){var b=document.documentElement.getBoundingClientRect();a=b.right-Math.abs(b.left)}this.bodyIsOverflowing=document.body.clientWidth<a,this.scrollbarWidth=this.measureScrollbar()},c.prototype.setScrollbar=function(){var a=parseInt(this.$body.css("padding-right")||0,10);this.originalBodyPad=document.body.style.paddingRight||"",this.bodyIsOverflowing&&this.$body.css("padding-right",a+this.scrollbarWidth)},c.prototype.resetScrollbar=function(){this.$body.css("padding-right",this.originalBodyPad)},c.prototype.measureScrollbar=function(){var a=document.createElement("div");a.className="modal-scrollbar-measure",this.$body.append(a);var b=a.offsetWidth-a.clientWidth;return this.$body[0].removeChild(a),b};var d=a.fn.modal;a.fn.modal=b,a.fn.modal.Constructor=c,a.fn.modal.noConflict=function(){return a.fn.modal=d,this},a(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(c){var d=a(this),e=d.attr("href"),f=a(d.attr("data-target")||e&&e.replace(/.*(?=#[^\s]+$)/,"")),g=f.data("bs.modal")?"toggle":a.extend({remote:!/#/.test(e)&&e},f.data(),d.data());d.is("a")&&c.preventDefault(),f.one("show.bs.modal",function(a){a.isDefaultPrevented()||f.one("hidden.bs.modal",function(){d.is(":visible")&&d.trigger("focus")})}),b.call(f,g,this)})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tooltip"),f="object"==typeof b&&b;(e||!/destroy|hide/.test(b))&&(e||d.data("bs.tooltip",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.type=null,this.options=null,this.enabled=null,this.timeout=null,this.hoverState=null,this.$element=null,this.inState=null,this.init("tooltip",a,b)};c.VERSION="3.3.6",c.TRANSITION_DURATION=150,c.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},c.prototype.init=function(b,c,d){if(this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.$viewport=this.options.viewport&&a(a.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},c.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},c.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusin"==b.type?"focus":"hover"]=!0),c.tip().hasClass("in")||"in"==c.hoverState?void(c.hoverState="in"):(clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show())},c.prototype.isInStateTrue=function(){for(var a in this.inState)if(this.inState[a])return!0;return!1},c.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusout"==b.type?"focus":"hover"]=!1),c.isInStateTrue()?void 0:(clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide())},c.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(b);var d=a.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(b.isDefaultPrevented()||!d)return;var e=this,f=this.tip(),g=this.getUID(this.type);this.setContent(),f.attr("id",g),this.$element.attr("aria-describedby",g),this.options.animation&&f.addClass("fade");var h="function"==typeof this.options.placement?this.options.placement.call(this,f[0],this.$element[0]):this.options.placement,i=/\s?auto?\s?/i,j=i.test(h);j&&(h=h.replace(i,"")||"top"),f.detach().css({top:0,left:0,display:"block"}).addClass(h).data("bs."+this.type,this),this.options.container?f.appendTo(this.options.container):f.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var k=this.getPosition(),l=f[0].offsetWidth,m=f[0].offsetHeight;if(j){var n=h,o=this.getPosition(this.$viewport);h="bottom"==h&&k.bottom+m>o.bottom?"top":"top"==h&&k.top-m<o.top?"bottom":"right"==h&&k.right+l>o.width?"left":"left"==h&&k.left-l<o.left?"right":h,f.removeClass(n).addClass(h)}var p=this.getCalculatedOffset(h,k,l,m);this.applyPlacement(p,h);var q=function(){var a=e.hoverState;e.$element.trigger("shown.bs."+e.type),e.hoverState=null,"out"==a&&e.leave(e)};a.support.transition&&this.$tip.hasClass("fade")?f.one("bsTransitionEnd",q).emulateTransitionEnd(c.TRANSITION_DURATION):q()}},c.prototype.applyPlacement=function(b,c){var d=this.tip(),e=d[0].offsetWidth,f=d[0].offsetHeight,g=parseInt(d.css("margin-top"),10),h=parseInt(d.css("margin-left"),10);isNaN(g)&&(g=0),isNaN(h)&&(h=0),b.top+=g,b.left+=h,a.offset.setOffset(d[0],a.extend({using:function(a){d.css({top:Math.round(a.top),left:Math.round(a.left)})}},b),0),d.addClass("in");var i=d[0].offsetWidth,j=d[0].offsetHeight;"top"==c&&j!=f&&(b.top=b.top+f-j);var k=this.getViewportAdjustedDelta(c,b,i,j);k.left?b.left+=k.left:b.top+=k.top;var l=/top|bottom/.test(c),m=l?2*k.left-e+i:2*k.top-f+j,n=l?"offsetWidth":"offsetHeight";d.offset(b),this.replaceArrow(m,d[0][n],l)},c.prototype.replaceArrow=function(a,b,c){this.arrow().css(c?"left":"top",50*(1-a/b)+"%").css(c?"top":"left","")},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle();a.find(".tooltip-inner")[this.options.html?"html":"text"](b),a.removeClass("fade in top bottom left right")},c.prototype.hide=function(b){function d(){"in"!=e.hoverState&&f.detach(),e.$element.removeAttr("aria-describedby").trigger("hidden.bs."+e.type),b&&b()}var e=this,f=a(this.$tip),g=a.Event("hide.bs."+this.type);return this.$element.trigger(g),g.isDefaultPrevented()?void 0:(f.removeClass("in"),a.support.transition&&f.hasClass("fade")?f.one("bsTransitionEnd",d).emulateTransitionEnd(c.TRANSITION_DURATION):d(),this.hoverState=null,this)},c.prototype.fixTitle=function(){var a=this.$element;(a.attr("title")||"string"!=typeof a.attr("data-original-title"))&&a.attr("data-original-title",a.attr("title")||"").attr("title","")},c.prototype.hasContent=function(){return this.getTitle()},c.prototype.getPosition=function(b){b=b||this.$element;var c=b[0],d="BODY"==c.tagName,e=c.getBoundingClientRect();null==e.width&&(e=a.extend({},e,{width:e.right-e.left,height:e.bottom-e.top}));var f=d?{top:0,left:0}:b.offset(),g={scroll:d?document.documentElement.scrollTop||document.body.scrollTop:b.scrollTop()},h=d?{width:a(window).width(),height:a(window).height()}:null;return a.extend({},e,g,h,f)},c.prototype.getCalculatedOffset=function(a,b,c,d){return"bottom"==a?{top:b.top+b.height,left:b.left+b.width/2-c/2}:"top"==a?{top:b.top-d,left:b.left+b.width/2-c/2}:"left"==a?{top:b.top+b.height/2-d/2,left:b.left-c}:{top:b.top+b.height/2-d/2,left:b.left+b.width}},c.prototype.getViewportAdjustedDelta=function(a,b,c,d){var e={top:0,left:0};if(!this.$viewport)return e;var f=this.options.viewport&&this.options.viewport.padding||0,g=this.getPosition(this.$viewport);if(/right|left/.test(a)){var h=b.top-f-g.scroll,i=b.top+f-g.scroll+d;h<g.top?e.top=g.top-h:i>g.top+g.height&&(e.top=g.top+g.height-i)}else{var j=b.left-f,k=b.left+f+c;j<g.left?e.left=g.left-j:k>g.right&&(e.left=g.left+g.width-k)}return e},c.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},c.prototype.getUID=function(a){do a+=~~(1e6*Math.random());while(document.getElementById(a));return a},c.prototype.tip=function(){if(!this.$tip&&(this.$tip=a(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.toggleEnabled=function(){this.enabled=!this.enabled},c.prototype.toggle=function(b){var c=this;b&&(c=a(b.currentTarget).data("bs."+this.type),c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c))),b?(c.inState.click=!c.inState.click,c.isInStateTrue()?c.enter(c):c.leave(c)):c.tip().hasClass("in")?c.leave(c):c.enter(c)},c.prototype.destroy=function(){var a=this;clearTimeout(this.timeout),this.hide(function(){a.$element.off("."+a.type).removeData("bs."+a.type),a.$tip&&a.$tip.detach(),a.$tip=null,a.$arrow=null,a.$viewport=null})};var d=a.fn.tooltip;a.fn.tooltip=b,a.fn.tooltip.Constructor=c,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=d,this}}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof b&&b;(e||!/destroy|hide/.test(b))&&(e||d.data("bs.popover",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");c.VERSION="3.3.6",c.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),c.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),c.prototype.constructor=c,c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},c.prototype.hasContent=function(){return this.getTitle()||this.getContent()},c.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var d=a.fn.popover;a.fn.popover=b,a.fn.popover.Constructor=c,a.fn.popover.noConflict=function(){return a.fn.popover=d,this}}(jQuery),+function(a){"use strict";function b(c,d){this.$body=a(document.body),this.$scrollElement=a(a(c).is(document.body)?window:c),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",a.proxy(this.process,this)),this.refresh(),this.process()}function c(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})}b.VERSION="3.3.6",b.DEFAULTS={offset:10},b.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},b.prototype.refresh=function(){var b=this,c="offset",d=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),a.isWindow(this.$scrollElement[0])||(c="position",d=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var b=a(this),e=b.data("target")||b.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[c]().top+d,e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){b.offsets.push(this[0]),b.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.getScrollHeight(),d=this.options.offset+c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(this.scrollHeight!=c&&this.refresh(),b>=d)return g!=(a=f[f.length-1])&&this.activate(a);if(g&&b<e[0])return this.activeTarget=null,this.clear();for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(void 0===e[a+1]||b<e[a+1])&&this.activate(f[a])},b.prototype.activate=function(b){this.activeTarget=b,this.clear();var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li").addClass("active");
d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")),d.trigger("activate.bs.scrollspy")},b.prototype.clear=function(){a(this.selector).parentsUntil(this.options.target,".active").removeClass("active")};var d=a.fn.scrollspy;a.fn.scrollspy=c,a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=d,this},a(window).on("load.bs.scrollspy.data-api",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);c.call(b,b.data())})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new c(this)),"string"==typeof b&&e[b]()})}var c=function(b){this.element=a(b)};c.VERSION="3.3.6",c.TRANSITION_DURATION=150,c.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.data("target");if(d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),!b.parent("li").hasClass("active")){var e=c.find(".active:last a"),f=a.Event("hide.bs.tab",{relatedTarget:b[0]}),g=a.Event("show.bs.tab",{relatedTarget:e[0]});if(e.trigger(f),b.trigger(g),!g.isDefaultPrevented()&&!f.isDefaultPrevented()){var h=a(d);this.activate(b.closest("li"),c),this.activate(h,h.parent(),function(){e.trigger({type:"hidden.bs.tab",relatedTarget:b[0]}),b.trigger({type:"shown.bs.tab",relatedTarget:e[0]})})}}},c.prototype.activate=function(b,d,e){function f(){g.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),b.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),h?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu").length&&b.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),e&&e()}var g=d.find("> .active"),h=e&&a.support.transition&&(g.length&&g.hasClass("fade")||!!d.find("> .fade").length);g.length&&h?g.one("bsTransitionEnd",f).emulateTransitionEnd(c.TRANSITION_DURATION):f(),g.removeClass("in")};var d=a.fn.tab;a.fn.tab=b,a.fn.tab.Constructor=c,a.fn.tab.noConflict=function(){return a.fn.tab=d,this};var e=function(c){c.preventDefault(),b.call(a(this),"show")};a(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',e).on("click.bs.tab.data-api",'[data-toggle="pill"]',e)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof b&&b;e||d.data("bs.affix",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.options=a.extend({},c.DEFAULTS,d),this.$target=a(this.options.target).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(b),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};c.VERSION="3.3.6",c.RESET="affix affix-top affix-bottom",c.DEFAULTS={offset:0,target:window},c.prototype.getState=function(a,b,c,d){var e=this.$target.scrollTop(),f=this.$element.offset(),g=this.$target.height();if(null!=c&&"top"==this.affixed)return c>e?"top":!1;if("bottom"==this.affixed)return null!=c?e+this.unpin<=f.top?!1:"bottom":a-d>=e+g?!1:"bottom";var h=null==this.affixed,i=h?e:f.top,j=h?g:b;return null!=c&&c>=e?"top":null!=d&&i+j>=a-d?"bottom":!1},c.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(c.RESET).addClass("affix");var a=this.$target.scrollTop(),b=this.$element.offset();return this.pinnedOffset=b.top-a},c.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},c.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b=this.$element.height(),d=this.options.offset,e=d.top,f=d.bottom,g=Math.max(a(document).height(),a(document.body).height());"object"!=typeof d&&(f=e=d),"function"==typeof e&&(e=d.top(this.$element)),"function"==typeof f&&(f=d.bottom(this.$element));var h=this.getState(g,b,e,f);if(this.affixed!=h){null!=this.unpin&&this.$element.css("top","");var i="affix"+(h?"-"+h:""),j=a.Event(i+".bs.affix");if(this.$element.trigger(j),j.isDefaultPrevented())return;this.affixed=h,this.unpin="bottom"==h?this.getPinnedOffset():null,this.$element.removeClass(c.RESET).addClass(i).trigger(i.replace("affix","affixed")+".bs.affix")}"bottom"==h&&this.$element.offset({top:g-b-f})}};var d=a.fn.affix;a.fn.affix=b,a.fn.affix.Constructor=c,a.fn.affix.noConflict=function(){return a.fn.affix=d,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var c=a(this),d=c.data();d.offset=d.offset||{},null!=d.offsetBottom&&(d.offset.bottom=d.offsetBottom),null!=d.offsetTop&&(d.offset.top=d.offsetTop),b.call(c,d)})})}(jQuery);
//
//compactados/material.js
(function($){$.expr[":"].notmdproc=function(obj){if($(obj).data("mdproc")){return false}else{return true}};function _isChar(evt){if(typeof evt.which=="undefined"){return true}else if(typeof evt.which=="number"&&evt.which>0){return(!evt.ctrlKey&&!evt.metaKey&&!evt.altKey&&evt.which!=8&&evt.which!=9&&evt.which!=13&&evt.which!=16&&evt.which!=17&&evt.which!=20&&evt.which!=27)}return false}function _addFormGroupFocus(element){var $element=$(element);if(!$element.prop('disabled')){$element.closest(".form-group").addClass("is-focused")}}function _toggleDisabledState($element,state){var $target;if($element.hasClass('checkbox-inline')||$element.hasClass('radio-inline')){$target=$element}else{$target=$element.closest('.checkbox').length?$element.closest('.checkbox'):$element.closest('.radio')}return $target.toggleClass('disabled',state)}function _toggleTypeFocus($input){var disabledToggleType=false;if($input.is($.material.options.checkboxElements)||$input.is($.material.options.radioElements)){disabledToggleType=true}$input.closest('label').hover(function(){var $i=$(this).find('input');var isDisabled=$i.prop('disabled');if(disabledToggleType){_toggleDisabledState($(this),isDisabled)}if(!isDisabled){_addFormGroupFocus($i)}},function(){_removeFormGroupFocus($(this).find('input'))})}function _removeFormGroupFocus(element){$(element).closest(".form-group").removeClass("is-focused")}$.material={"options":{"validate":true,"input":true,"ripples":true,"checkbox":true,"togglebutton":true,"radio":true,"arrive":true,"autofill":false,"withRipples":[".btn:not(.btn-link)",".card-image",".navbar a:not(.withoutripple)",".dropdown-menu a",".nav-tabs a:not(.withoutripple)",".withripple",".pagination li:not(.active):not(.disabled) a:not(.withoutripple)"].join(","),"inputElements":"input.form-control, textarea.form-control, select.form-control","checkboxElements":".checkbox > label > input[type=checkbox], label.checkbox-inline > input[type=checkbox]","togglebuttonElements":".togglebutton > label > input[type=checkbox]","radioElements":".radio > label > input[type=radio], label.radio-inline > input[type=radio]"},"checkbox":function(selector){var $input=$((selector)?selector:this.options.checkboxElements).filter(":notmdproc").data("mdproc",true).after("<span class='checkbox-material'><span class='check'></span></span>");_toggleTypeFocus($input)},"togglebutton":function(selector){var $input=$((selector)?selector:this.options.togglebuttonElements).filter(":notmdproc").data("mdproc",true).after("<span class='toggle'></span>");_toggleTypeFocus($input)},"radio":function(selector){var $input=$((selector)?selector:this.options.radioElements).filter(":notmdproc").data("mdproc",true).after("<span class='circle'></span><span class='check'></span>");_toggleTypeFocus($input)},"input":function(selector){$((selector)?selector:this.options.inputElements).filter(":notmdproc").data("mdproc",true).each(function(){var $input=$(this);var $formGroup=$input.closest(".form-group");if($formGroup.length===0&&$input.attr('type')!=="hidden"&&!$input.attr('hidden')){$input.wrap("<div class='form-group'></div>");$formGroup=$input.closest(".form-group")}if($input.attr("data-hint")){$input.after("<p class='help-block'>"+$input.attr("data-hint")+"</p>");$input.removeAttr("data-hint")}var legacySizes={"input-lg":"form-group-lg","input-sm":"form-group-sm"};$.each(legacySizes,function(legacySize,standardSize){if($input.hasClass(legacySize)){$input.removeClass(legacySize);$formGroup.addClass(standardSize)}});if($input.hasClass("floating-label")){var placeholder=$input.attr("placeholder");$input.attr("placeholder",null).removeClass("floating-label");var id=$input.attr("id");var forAttribute="";if(id){forAttribute="for='"+id+"'"}$formGroup.addClass("label-floating");$input.after("<label "+forAttribute+"class='control-label'>"+placeholder+"</label>")}if($input.val()===null||$input.val()=="undefined"||$input.val()===""){$formGroup.addClass("is-empty")}if($formGroup.find("input[type=file]").length>0){$formGroup.addClass("is-fileinput")}})},"attachInputEventHandlers":function(){var validate=this.options.validate;$(document).on("keydown paste",".form-control",function(e){if(_isChar(e)){$(this).closest(".form-group").removeClass("is-empty")}}).on("keyup change",".form-control",function(){var $input=$(this);var $formGroup=$input.closest(".form-group");var isValid=(typeof $input[0].checkValidity==="undefined"||$input[0].checkValidity());if($input.val()===""){$formGroup.addClass("is-empty")}else{$formGroup.removeClass("is-empty")}if(validate){if(isValid){$formGroup.removeClass("has-error")}else{$formGroup.addClass("has-error")}}}).on("focus",".form-control, .form-group.is-fileinput",function(){_addFormGroupFocus(this)}).on("blur",".form-control, .form-group.is-fileinput",function(){_removeFormGroupFocus(this)}).on("change",".form-group input",function(){var $input=$(this);if($input.attr("type")=="file"){return}var $formGroup=$input.closest(".form-group");var value=$input.val();if(value){$formGroup.removeClass("is-empty")}else{$formGroup.addClass("is-empty")}}).on("change",".form-group.is-fileinput input[type='file']",function(){var $input=$(this);var $formGroup=$input.closest(".form-group");var value="";$.each(this.files,function(i,file){value+=file.name+", "});value=value.substring(0,value.length-2);if(value){$formGroup.removeClass("is-empty")}else{$formGroup.addClass("is-empty")}$formGroup.find("input.form-control[readonly]").val(value)})},"ripples":function(selector){$((selector)?selector:this.options.withRipples).ripples()},"autofill":function(){var loading=setInterval(function(){$("input[type!=checkbox]").each(function(){var $this=$(this);if($this.val()&&$this.val()!==$this.attr("value")){$this.trigger("change")}})},100);setTimeout(function(){clearInterval(loading)},10000)},"attachAutofillEventHandlers":function(){var focused;$(document).on("focus","input",function(){var $inputs=$(this).parents("form").find("input").not("[type=file]");focused=setInterval(function(){$inputs.each(function(){var $this=$(this);if($this.val()!==$this.attr("value")){$this.trigger("change")}})},100)}).on("blur",".form-group input",function(){clearInterval(focused)})},"init":function(options){this.options=$.extend({},this.options,options);var $document=$(document);if($.fn.ripples&&this.options.ripples){this.ripples()}if(this.options.input){this.input();this.attachInputEventHandlers()}if(this.options.checkbox){this.checkbox()}if(this.options.togglebutton){this.togglebutton()}if(this.options.radio){this.radio()}if(this.options.autofill){this.autofill();this.attachAutofillEventHandlers()}if(document.arrive&&this.options.arrive){if($.fn.ripples&&this.options.ripples){$document.arrive(this.options.withRipples,function(){$.material.ripples($(this))})}if(this.options.input){$document.arrive(this.options.inputElements,function(){$.material.input($(this))})}if(this.options.checkbox){$document.arrive(this.options.checkboxElements,function(){$.material.checkbox($(this))})}if(this.options.radio){$document.arrive(this.options.radioElements,function(){$.material.radio($(this))})}if(this.options.togglebutton){$document.arrive(this.options.togglebuttonElements,function(){$.material.togglebutton($(this))})}}}}})(jQuery);
//
//compactados/wicket.js
(function(global){var beginsWith,endsWith,root,Wkt;root=this;Wkt=function(obj){if(obj instanceof Wkt)return obj;if(!(this instanceof Wkt))return new Wkt(obj);this._wrapped=obj};if(typeof exports!=='undefined'){if(typeof module!=='undefined'&&module.exports){exports=module.exports=Wkt}exports.Wkt=Wkt}else{root.Wkt=Wkt}beginsWith=function(str,sub){return str.substring(0,sub.length)===sub};endsWith=function(str,sub){return str.substring(str.length-sub.length)===sub};Wkt.delimiter=' ';Wkt.isArray=function(obj){return!!(obj&&obj.constructor===Array)};Wkt.trim=function(str,sub){sub=sub||' ';while(beginsWith(str,sub)){str=str.substring(1)}while(endsWith(str,sub)){str=str.substring(0,str.length-1)}return str};Wkt.Wkt=function(initializer){this.delimiter=Wkt.delimiter||' ';this.wrapVertices=true;this.regExes={'typeStr':/^\s*(\w+)\s*\(\s*(.*)\s*\)\s*$/,'spaces':/\s+|\+/,  			'numeric':/-*\d+(\.*\d+)?/,'comma':/\s*,\s*/,'parenComma':/\)\s*,\s*\(/,'coord':/-*\d+\.*\d+ -*\d+\.*\d+/,  			'doubleParenComma':/\)\s*\)\s*,\s*\(\s*\(/,'trimParens':/^\s*\(?(.*?)\)?\s*$/,'ogcTypes':/^(multi)?(point|line|polygon|box)?(string)?$/i,'crudeJson':/^{.*"(type|coordinates|geometries|features)":.*}$/};this.components=undefined;if(initializer&&typeof initializer==='string'){this.read(initializer)}else if(initializer&&typeof initializer!==undefined){this.fromObject(initializer)}};global.Wkt=Wkt;Wkt.Wkt.prototype.isCollection=function(){switch(this.type.slice(0,5)){case'multi':return true;case'polyg':return true;default:return false}};Wkt.Wkt.prototype.sameCoords=function(a,b){return(a.x===b.x&&a.y===b.y)};Wkt.Wkt.prototype.fromObject=function(obj){var result;if(obj.hasOwnProperty('type')&&obj.hasOwnProperty('coordinates')){result=this.fromJson(obj)}else{result=this.deconstruct.call(this,obj)}this.components=result.components;this.isRectangle=result.isRectangle||false;this.type=result.type;return this};Wkt.Wkt.prototype.toObject=function(config){var obj=this.construct[this.type].call(this,config);if(typeof obj==='object'&&!Wkt.isArray(obj)){obj.properties=this.properties}return obj};Wkt.Wkt.prototype.toString=function(config){return this.write()};Wkt.Wkt.prototype.fromJson=function(obj){var i,j,k,coords,iring,oring;this.type=obj.type.toLowerCase();this.components=[];if(obj.hasOwnProperty('geometry')){this.fromJson(obj.geometry);this.properties=obj.properties;return this}coords=obj.coordinates;if(!Wkt.isArray(coords[0])){this.components.push({x:coords[0],y:coords[1]})}else{for(i in coords){if(coords.hasOwnProperty(i)){if(!Wkt.isArray(coords[i][0])){if(this.type==='multipoint'){this.components.push([{x:coords[i][0],y:coords[i][1]}])}else{this.components.push({x:coords[i][0],y:coords[i][1]})}}else{oring=[];for(j in coords[i]){if(coords[i].hasOwnProperty(j)){if(!Wkt.isArray(coords[i][j][0])){oring.push({x:coords[i][j][0],y:coords[i][j][1]})}else{iring=[];for(k in coords[i][j]){if(coords[i][j].hasOwnProperty(k)){iring.push({x:coords[i][j][k][0],y:coords[i][j][k][1]})}}oring.push(iring)}}}this.components.push(oring)}}}}return this};Wkt.Wkt.prototype.toJson=function(){var cs,json,i,j,k,ring,rings;cs=this.components;json={coordinates:[],type:(function(){var i,type,s;type=this.regExes.ogcTypes.exec(this.type).slice(1);s=[];for(i in type){if(type.hasOwnProperty(i)){if(type[i]!==undefined){s.push(type[i].toLowerCase().slice(0,1).toUpperCase()+type[i].toLowerCase().slice(1))}}}return s}.call(this)).join('')};if(this.type.toLowerCase()==='box'){json.type='Polygon';json.bbox=[];for(i in cs){if(cs.hasOwnProperty(i)){json.bbox=json.bbox.concat([cs[i].x,cs[i].y])}}json.coordinates=[[[cs[0].x,cs[0].y],[cs[0].x,cs[1].y],[cs[1].x,cs[1].y],[cs[1].x,cs[0].y],[cs[0].x,cs[0].y]]];return json}for(i in cs){if(cs.hasOwnProperty(i)){if(Wkt.isArray(cs[i])){rings=[];for(j in cs[i]){if(cs[i].hasOwnProperty(j)){if(Wkt.isArray(cs[i][j])){ring=[];for(k in cs[i][j]){if(cs[i][j].hasOwnProperty(k)){ring.push([cs[i][j][k].x,cs[i][j][k].y])}}rings.push(ring)}else{if(cs[i].length>1){rings.push([cs[i][j].x,cs[i][j].y])}else{rings=rings.concat([cs[i][j].x,cs[i][j].y])}}}}json.coordinates.push(rings)}else{if(cs.length>1){json.coordinates.push([cs[i].x,cs[i].y])}else{json.coordinates=json.coordinates.concat([cs[i].x,cs[i].y])}}}}return json};Wkt.Wkt.prototype.merge=function(wkt){var prefix=this.type.slice(0,5);if(this.type!==wkt.type){if(this.type.slice(5,this.type.length)!==wkt.type){throw TypeError('The input geometry types must agree or the calling this.Wkt.Wkt instance must be a multigeometry of the other')}}switch(prefix){case'point':this.components=[this.components.concat(wkt.components)];break;case'multi':this.components=this.components.concat((wkt.type.slice(0,5)==='multi')?wkt.components:[wkt.components]);break;default:this.components=[this.components,wkt.components];break}if(prefix!=='multi'){this.type='multi'+this.type}return this};Wkt.Wkt.prototype.read=function(str){var matches;matches=this.regExes.typeStr.exec(str);if(matches){this.type=matches[1].toLowerCase();this.base=matches[2];if(this.ingest[this.type]){this.components=this.ingest[this.type].apply(this,[this.base])}}else{if(this.regExes.crudeJson.test(str)){if(typeof JSON==='object'&&typeof JSON.parse==='function'){this.fromJson(JSON.parse(str))}else{console.log('JSON.parse() is not available; cannot parse GeoJSON strings');throw{name:'JSONError',message:'JSON.parse() is not available; cannot parse GeoJSON strings'}}}else{console.log('Invalid WKT string provided to read()');throw{name:'WKTError',message:'Invalid WKT string provided to read()'}}}return this};Wkt.Wkt.prototype.write=function(components){var i,pieces,data;components=components||this.components;pieces=[];pieces.push(this.type.toUpperCase()+'(');for(i=0;i<components.length;i+=1){if(this.isCollection()&&i>0){pieces.push(',')}if(!this.extract[this.type]){return null}data=this.extract[this.type].apply(this,[components[i]]);if(this.isCollection()&&this.type!=='multipoint'){pieces.push('('+data+')')}else{pieces.push(data);if(i!==(components.length-1)&&this.type!=='multipoint'){pieces.push(',')}}}pieces.push(')');return pieces.join('')};Wkt.Wkt.prototype.extract={point:function(point){return String(point.x)+this.delimiter+String(point.y)},multipoint:function(multipoint){var i,parts=[],s;for(i=0;i<multipoint.length;i+=1){s=this.extract.point.apply(this,[multipoint[i]]);if(this.wrapVertices){s='('+s+')'}parts.push(s)}return parts.join(',')},linestring:function(linestring){return this.extract.point.apply(this,[linestring])},multilinestring:function(multilinestring){var i,parts=[];for(i=0;i<multilinestring.length;i+=1){parts.push(this.extract.linestring.apply(this,[multilinestring[i]]))}return parts.join(',')},polygon:function(polygon){return this.extract.multilinestring.apply(this,[polygon])},multipolygon:function(multipolygon){var i,parts=[];for(i=0;i<multipolygon.length;i+=1){parts.push('('+this.extract.polygon.apply(this,[multipolygon[i]])+')')}return parts.join(',')},box:function(box){return this.extract.linestring.apply(this,[box])},geometrycollection:function(str){console.log('The geometrycollection WKT type is not yet supported.')}};Wkt.Wkt.prototype.ingest={point:function(str){var coords=Wkt.trim(str).split(this.regExes.spaces);return[{x:parseFloat(this.regExes.numeric.exec(coords[0])[0]),y:parseFloat(this.regExes.numeric.exec(coords[1])[0])}]},multipoint:function(str){var i,components,points;components=[];points=Wkt.trim(str).split(this.regExes.comma);for(i=0;i<points.length;i+=1){components.push(this.ingest.point.apply(this,[points[i]]))}return components},linestring:function(str){var i,multipoints,components;multipoints=this.ingest.multipoint.apply(this,[str]);components=[];for(i=0;i<multipoints.length;i+=1){components=components.concat(multipoints[i])}return components},multilinestring:function(str){var i,components,line,lines;components=[];lines=Wkt.trim(str).split(this.regExes.doubleParenComma);if(lines.length===1){lines=Wkt.trim(str).split(this.regExes.parenComma)}for(i=0;i<lines.length;i+=1){line=lines[i].replace(this.regExes.trimParens,'$1');components.push(this.ingest.linestring.apply(this,[line]))}return components},polygon:function(str){var i,j,components,subcomponents,ring,rings;rings=Wkt.trim(str).split(this.regExes.parenComma);components=[];for(i=0;i<rings.length;i+=1){ring=rings[i].replace(this.regExes.trimParens,'$1').split(this.regExes.comma);subcomponents=[];for(j=0;j<ring.length;j+=1){var split=ring[j].split(this.regExes.spaces);if(split.length>2){split=split.filter(function(n){return n!=""})}if(split.length===2){var x_cord=split[0];var y_cord=split[1];subcomponents.push({x:parseFloat(x_cord),y:parseFloat(y_cord)})}}components.push(subcomponents)}return components},box:function(str){var i,multipoints,components;multipoints=this.ingest.multipoint.apply(this,[str]);components=[];for(i=0;i<multipoints.length;i+=1){components=components.concat(multipoints[i])}return components},multipolygon:function(str){var i,components,polygon,polygons;components=[];polygons=Wkt.trim(str).split(this.regExes.doubleParenComma);for(i=0;i<polygons.length;i+=1){polygon=polygons[i].replace(this.regExes.trimParens,'$1');components.push(this.ingest.polygon.apply(this,[polygon]))}return components},geometrycollection:function(str){console.log('The geometrycollection WKT type is not yet supported.')}};return this}(this));
//
//compactados/ini_i3geo_compacto.js
var i3GEOF=[];var i3GEOadmin=[];if(typeof YAHOO!="undefined"){YAHOO.namespace("i3GEO")}var i3GEO={tamanhodoc:[],parametros:{mapexten:"",mapscale:"",mapres:"",pixelsize:"",mapfile:"",cgi:"",extentTotal:"",mapimagem:"",geoip:"",utilizacgi:"",versaoms:"",versaomscompleta:"",mensagens:"",w:"",h:"",locsistemas:"",locidentifica:"",r:"",locmapas:"",celularef:"",kmlurl:"",mensageminicia:"",interfacePadrao:"openlayers.htm",autenticadoopenid:"nao",cordefundo:"",copyright:"",editor:"nao"},scrollerWidth:"",finaliza:"",finalizaAPI:"",temaAtivo:"",contadorAtualiza:0,init:function(parametrosMapa,configMapa){if($.material){$.material.init()}if(configMapa&&configMapa!=""){i3GEO.configMapa(configMapa)}if(parametrosMapa&&parametrosMapa!=""){i3GEO.configura.mashuppar=i3GEO.parametrosMapa2mashuppar(parametrosMapa)}else{i3GEO.configura.mashuppar=""}i3GEO.cria();i3GEO.inicia()},configMapa:function(c){i3GEO.configura.guardaExtensao=(c.hasOwnProperty("saveExtension")&&c.saveExtension==true)?true:false;i3GEO.configura.tipoimagem=(c.hasOwnProperty("posRenderType")&&c.posRenderType!="")?c.posRenderType:"nenhum";i3GEO.configura.locaplic=(c.hasOwnProperty("i3GeoServer")&&c.i3GeoServer!="")?c.i3GeoServer:i3GEO.util.protocolo()+"://"+window.location.host+"/i3geo";if(c.hasOwnProperty("tools")){jQuery.each(c.tools,function(index,value){i3GEO.configura.ferramentas[index]=c.tools[index]})}if(c.hasOwnProperty("layerOpacity")&&c.hasOwnProperty("layerOpacity")!=""){i3GEO.Interface.LAYEROPACITY=c.layerOpacity}i3GEO.Interface.IDCORPO=(c.hasOwnProperty("mapBody")&&c.mapBody!="")?c.mapBody:"mapai3Geo";i3GEO.finalizaAPI=(c.hasOwnProperty("afterStart")&&c.afterStart!="")?c.afterStart:"";if(c.hasOwnProperty("components")){i3GEO.Interface.RESTRICTATT=(c.components.hasOwnProperty("restrictAtt"))?c.components.restrictAtt:true;i3GEO.arvoreDeTemas.IDSMENUS=(c.components.hasOwnProperty("idsMenus"))?c.components.idsMenus:[];i3GEO.catalogoMenus.IDSMENUS=(c.components.hasOwnProperty("idsMenus"))?c.components.idsMenus:[];i3GEO.busca.SERVICO=(c.components.hasOwnProperty("searchService"))?c.components.searchService:"";i3GEO.busca.SERVICOWMS=(c.components.hasOwnProperty("searchWms"))?c.components.searchWms:"";i3GEO.mapa.BALAOATIVO=(c.components.hasOwnProperty("info"))?c.components.info:true;if(c.components.referenceMapPosition){i3GEO.maparef.TOP=c.components.referenceMapPosition[0];i3GEO.maparef.RIGHT=c.components.referenceMapPosition[1]}if(c.components.referenceType){i3GEO.maparef.DEFAULTMAP=c.components.referenceType}if(c.components.scrollBar){i3GEO.janela.scrollBar=c.components.scrollBar}if(c.components.tooltip){var p=i3GEO.Interface[i3GEO.Interface.ATUAL].BALAOPROP;p.removeAoAdicionar=(c.components.tooltip.hasOwnProperty("removeAoAdicionar"))?c.components.tooltip.removeAoAdicionar:true;p.autoPan=(c.components.tooltip.hasOwnProperty("autoPan"))?c.components.tooltip.autoPan:true;p.modal=(c.components.tooltip.hasOwnProperty("modal"))?c.components.tooltip.modal:false;p.url=(c.components.tooltip.hasOwnProperty("url"))?c.components.tooltip.url:"";p.templateModal=(c.components.tooltip.hasOwnProperty("templateModal"))?c.components.tooltip.templateModal:"";p.simple=(c.components.tooltip.hasOwnProperty("simple"))?c.components.tooltip.simple:true;p.minWidth=(c.components.tooltip.hasOwnProperty("minWidth"))?c.components.tooltip.minWidth:'';p.url=(c.components.tooltip.hasOwnProperty("url"))?c.components.tooltip.url:'200px';p.autoPanAnimation=(c.components.tooltip.hasOwnProperty("autoPanAnimation"))?c.components.tooltip.autoPanAnimation:p.autoPanAnimation;if(c.components.tooltip.hasOwnProperty("toolTipSize")){i3GEO.configura.alturatip=c.components.tooltip.toolTipSize[0];i3GEO.configura.larguratip=c.components.tooltip.toolTipSize[1]}p.openTipNoData=(c.components.tooltip.hasOwnProperty("openTipNoData"))?c.components.tooltip.openTipNoData:true}}if(c.hasOwnProperty("openLayers")&&c.mapType!=="GM"){var d=c.openLayers;i3GEO.Interface.ATUAL="openlayers";i3GEO.Interface.openlayers.googleLike=(c.mapType=="OSM")?true:false;i3GEO.Interface.openlayers.TILES=(d.hasOwnProperty("singleTile")&&d.singleTile!="")?!d.singleTile:true;i3GEO.Interface.openlayers.parametrosMap=d.MapOptions;i3GEO.Interface.openlayers.parametrosView=d.ViewOptions}if(c.hasOwnProperty("googleMaps")&&c.mapType=="GM"){i3GEO.Interface.ATUAL="googlemaps";i3GEO.Interface.googlemaps.ESTILOPADRAO=c.googleMaps.MapOptions.mapTypeId;i3GEO.Interface.googlemaps.MAPOPTIONS=c.googleMaps.MapOptions}},parametrosMapa2mashuppar:function(p){var par=[],temp;if(p.hasOwnProperty("mapfilebase")&&p.mapfilebase!=""){par.push("&base="+p.mapfilebase)}if(p.hasOwnProperty("mapext")&&p.mapext!=""&&p.mapext.length==4){par.push("&mapext="+p.mapext.join(","));i3GEO.configura.guardaExtensao=false}if(p.hasOwnProperty("perfil")&&p.perfil!=""){par.push("&perfil="+p.perfil)}if(p.hasOwnProperty("layers")){if(p.layers.add&&p.layers.add.length>0){par.push("&temasa="+p.layers.add.join(","))}if(p.layers.on&&p.layers.on.length>0){par.push("&layers="+p.layers.on.join(","))}if(p.layers.off&&p.layers.off.length>0){par.push("&desligar="+p.layers.off.join(","))}if(p.layers.metaestat&&p.layers.metaestat.length>0){par.push("&metaestatids="+p.layers.metaestat.join(","))}}if(p.hasOwnProperty("points")&&p.points.coord.length>0){par.push("&nometemapontos="+p.points.title);par.push("&pontos="+p.points.coord.join(","))}if(p.hasOwnProperty("cacheOff")&&p.cacheOff=="sim"){par.push("&DESLIGACACHE=sim")}if(p.hasOwnProperty("lines")){var n=[];jQuery.each(p.lines.coord,function(index,value){if(value.length>0){n.push(value.join(" "))}});if(n.length>0){par.push("&nometemalinhas="+p.lines.title);par.push("&linhas="+n.join(","))}}if(p.hasOwnProperty("polygons")){var n=[];jQuery.each(p.polygons.coord,function(index,value){if(value.length>0){n.push(value.join(" "))}});if(n.length>0){par.push("&nometemapoligonos="+p.polygons.title);par.push("&poligonos="+n.join(","))}}if(p.hasOwnProperty("wkt")&&p.wkt.coord!=""){par.push("&nometemawkt="+p.wkt.title);par.push("&wkt="+p.wkt.coord)}if(p.hasOwnProperty("symbol")){if(p.symbol.name!=""){par.push("&simbolo="+p.symbol.name)}if(p.symbol.color!=""){par.push("&corsimbolo="+p.symbol.color)}if(p.symbol.size!=""){par.push("&tamanhosimbolo="+p.symbol.size)}}if(p.kml&&p.kml.url!=""){par.push("&kmlurl="+p.kml.url)}if(p.hasOwnProperty("wms")&&p.wms.url!=""){if(p.wms.url!=""){par.push("&url_wms="+p.wms.url)}if(p.wms.layer!=""){par.push("&layer_wms="+p.wms.layer)}if(p.wms.style!=""){par.push("&style_wms="+p.wms.style)}if(p.wms.title!=""){par.push("&nome_wms="+p.wms.title)}if(p.wms.srs!=""){par.push("&srs_wms="+p.wms.srs)}if(p.wms.imagetype!=""){par.push("&image_wms="+p.wms.imagetype)}if(p.wms.version!=""){par.push("&versao_wms="+p.wms.version)}}if(p.hasOwnProperty("filters")){var n=[];jQuery.each(p.filters,function(index,value){if(value.layer!=""){n.push("&map_layer_"+value.layer+"_filter="+value.expression)}});if(n.length>0){par.push(n.join(""))}}if(p.hasOwnProperty("restoreMapId")&&p.restoreMapId!=""){par.push("&restauramapa="+p.restoreMapId)}temp=$i(i3GEO.Interface.IDCORPO);if(temp&&temp.style&&temp.style.width){par.push("&largura="+parseInt(temp.style.width,10))}if(temp&&temp.style&&temp.style.height){par.push("&altura="+parseInt(temp.style.height,10))}return par.join("")},cria:function(){i3GEO.scrollerWidth=i3GEO.util.getScrollerWidth();var tamanho,temp;temp=window.location.href.split("?&");if(temp[1]){temp=temp[1].split("&");if(temp[0]&&temp[0]!=""&&temp.length==1){i3GEO.configura.sid=temp[0];if(i3GEO.configura.sid.split("#")[0]){i3GEO.configura.sid=i3GEO.configura.sid.split("#")[0]}}}else{i3GEO.configura.sid=""}if(i3GEO.configura.sid==='undefined'){i3GEO.configura.sid=""}i3GEO.mapa.aplicaPreferencias();if(!i3GEO.configura.locaplic||i3GEO.configura.locaplic===""){i3GEO.util.localizai3GEO()}i3GEO.idioma.OBJETOIDIOMA.locaplic=i3GEO.configura.locaplic;$('[data-traduzir="true"]').each(function(){this.innerHTML=Mustache.to_html(this.innerHTML,i3GEO.idioma.OBJETOIDIOMA)});temp=$i(i3GEO.Interface.IDCORPO);if(temp&&temp.style&&temp.style.width&&temp.style.height){i3GEO.Interface.cria(parseInt(temp.style.width,10),parseInt(temp.style.height,10))}else{tamanho=i3GEO.calculaTamanho();i3GEO.Interface.cria(tamanho[0],tamanho[1])}},inicia:function(retorno){i3GEO.eventos.cliquePerm.ativoinicial=i3GEO.eventos.cliquePerm.ativo;var montaMapa,mashup,tamanho,temp;i3GEO.mapa.aplicaPreferencias();montaMapa=function(retorno){try{delete i3GEO.parametrosMapa2mashuppar;delete i3GEO.configMapa;delete i3GEO.init;var temp,nomecookie="i3geoOLUltimaExtensao",preferencias="";if(retorno.bloqueado){alert(retorno.bloqueado);return}if(retorno===""){alert("Ocorreu um erro no mapa - i3GEO.inicia.montaMapa");retorno={data:{erro:"erro"}}}if(retorno.data.erro){document.body.style.backgroundColor="white";document.body.innerHTML="Ocorreu um erro ao criar o mapa";return("linkquebrado")}else{if(retorno.data.variaveis){i3GEO.parametros=retorno.data.variaveis;i3GEO.parametros.mapscale=i3GEO.parametros.mapscale*1;i3GEO.parametros.mapres=i3GEO.parametros.mapres*1;i3GEO.parametros.pixelsize=i3GEO.parametros.pixelsize*1;i3GEO.parametros.w=i3GEO.parametros.w*1;i3GEO.parametros.h=i3GEO.parametros.h*1;if(retorno.data.customizacoesinit){preferencias=JSON.parse(retorno.data.customizacoesinit);temp=i3GEO.util.base64decode(preferencias.preferenciasbase64);i3GEO.mapa.aplicaPreferencias(temp)}if(i3GEO.configura.guardaExtensao===true){if(i3GEO.Interface.openlayers.googleLike===true){nomecookie="i3geoUltima_ExtensaoOSM"}temp=i3GEO.util.pegaCookie(nomecookie);if(temp&&temp!=""){temp=temp.replace(/[\+]/g," ");i3GEO.parametros.mapexten=temp}i3GEO.eventos.NAVEGAMAPA.push(function(){i3GEO.util.insereCookie(nomecookie,i3GEO.parametros.mapexten)})}if(i3GEO.parametros.logado==="nao"){i3GEO.login.anulaCookie()}i3GEO.arvoreDeCamadas.registaCamadas(retorno.data.temas);if(i3GEO.parametros.editor==="sim"){i3GEO.listaDeFerramentas=i3GEO.login.adicionaMenuSuspenso(i3GEO.listaDeFerramentas)}i3GEO.Interface.inicia();if(retorno.data.customizacoesinit){if(preferencias.geometriasbase64&&preferencias.geometriasbase64!=""){temp=i3GEO.util.base64decode(preferencias.geometriasbase64);i3GEO.mapa.desCompactaLayerGrafico(temp)}if(preferencias.graficosbase64&&preferencias.graficosbase64!=""){i3GEO.mapa.restauraGraficos(preferencias.graficosbase64)}if(preferencias.tabelasbase64&&preferencias.tabelasbase64!=""){i3GEO.mapa.restauraTabelas(preferencias.tabelasbase64)}}}else{alert("Erro. Impossivel criar o mapa "+retorno.data);return}}i3GEO.aposIniciar()}catch(e){}};if(!$i("i3geo")){document.body.id="i3geo"}temp=$i("i3geo");temp.className="yui-skin-sam";if(document.body.id==="i3geo"&&temp.style&&!temp.style.overflow&&i3GEO.Interface.ATUAL==="openlayers"){temp.style.overflow="hidden"}if(i3GEO.configura.sid===""){mashup=function(retorno){if(retorno.bloqueado){alert(retorno.bloqueado);return}i3GEO.configura.sid=retorno.data;i3GEO.inicia(retorno)};i3GEO.configura.mashuppar+="&interface="+i3GEO.Interface.ATUAL;if(i3GEO.mapa.TEMASINICIAIS.length>0){i3GEO.configura.mashuppar+="&temasa="+i3GEO.mapa.TEMASINICIAIS}if(i3GEO.mapa.TEMASINICIAISLIGADOS.length>0){i3GEO.configura.mashuppar+="&layers="+i3GEO.mapa.TEMASINICIAISLIGADOS}i3GEO.php.criamapa(mashup,i3GEO.configura.mashuppar)}else{if(i3GEO.parametros.w===""||i3GEO.parametros.h===""){tamanho=i3GEO.calculaTamanho();i3GEO.parametros.w=tamanho[0];i3GEO.parametros.h=tamanho[1]}i3GEO.php.inicia(montaMapa,i3GEO.parametros.w,i3GEO.parametros.h)}},aposIniciar:function(){if(jQuery.isFunction(i3GEO.finaliza)){i3GEO.finaliza.call()}else{if(i3GEO.finaliza!=""){eval(i3GEO.finaliza)}}i3GEO.guias.inicia()},atualiza:function(retorno){var corpoMapa,erro,mapscale,temp;if(i3GEO.contadorAtualiza>1){i3GEO.contadorAtualiza--;return}if(i3GEO.contadorAtualiza>0){i3GEO.contadorAtualiza--}i3GEO.contadorAtualiza++;corpoMapa=function(){if($i("ajaxCorpoMapa")){return}i3GEO.php.corpo(i3GEO.atualiza,i3GEO.configura.tipoimagem)};if(arguments.length===0){i3GEO.janela.fechaAguarde("ajaxCorpoMapa");corpoMapa.call();return}if(!retorno.data){alert("Ocorreu um erro ao carregar o mapa"+retorno);i3GEO.mapa.recupera.inicia();return}try{if(retorno.data==="erro"){alert("Erro no mapa. Sera feita uma tentativa de recuperacao.");i3GEO.mapa.recupera.inicia();return}else if(retorno.data==="ok"||retorno.data===""){corpoMapa.call();return}}catch(e){}erro=function(){var c=confirm("Ocorreu um erro, quer tentar novamente?");if(c){corpoMapa.call()}else{i3GEO.janela.fechaAguarde()}return};if(arguments.length===0||retorno===""||retorno.data.variaveis===undefined){erro.call();return}else{if(arguments.length===0){return}i3GEO.mapa.verifica(retorno);mapscale=i3GEO.parametros.mapscale;i3GEO.atualizaParametros(retorno.data.variaveis);if(retorno.data.variaveis.erro!==""){alert(retorno.data.variaveis.erro)}temp=i3GEO.arvoreDeCamadas.converteChaveValor2normal(retorno.data.temas);try{i3GEO.arvoreDeCamadas.atualiza(temp);if(i3GEO.parametros.mapscale!==mapscale){i3GEO.arvoreDeCamadas.atualizaFarol(i3GEO.parametros.mapscale)}}catch(e){}i3GEO.arvoreDeCamadas.registaCamadas(temp);i3GEO.Interface.redesenha();if($i("mensagemt")){$i("mensagemt").value=i3GEO.parametros.mapexten}i3GEO.eventos.navegaMapa();temp=i3GEO.arvoreDeCamadas.verificaAplicaExtensao();if(temp!==""){i3GEO.tema.zoom(temp)}}},calculaTamanho:function(){var diminuix,diminuiy,menos,novow,novoh,w,h,temp,antigoh=i3GEO.parametros.h;temp=$i(i3GEO.Interface.IDCORPO);if(temp&&temp.style&&temp.style.width&&temp.style.height&&parseInt(temp.style.height,10)>100){i3GEO.parametros.w=parseInt(temp.style.width,10);i3GEO.parametros.h=parseInt(temp.style.height,10);return[i3GEO.parametros.w,i3GEO.parametros.h]}menos=0;document.body.style.width="100%";temp=i3GEO.util.tamanhoBrowser();novow=temp[0];novoh=temp[1];temp=(antigoh-novoh);document.body.style.height=novoh+"px";w=novow-menos+i3GEO.scrollerWidth;h=novoh;i3GEO.parametros.w=w;i3GEO.parametros.h=h;return[w,h]},reCalculaTamanho:function(){var diminuix,diminuiy,menos,novow,novoh,w,h,temp,antigoh=i3GEO.parametros.h;temp=$i(i3GEO.Interface.IDCORPO);menos=0;document.body.style.width="100%";temp=i3GEO.util.tamanhoBrowser();novow=temp[0];novoh=temp[1];temp=antigoh-novoh;document.body.style.height=novoh+"px";w=novow-menos+i3GEO.scrollerWidth;h=novoh;temp=$i(i3GEO.Interface.IDMAPA);if(temp){temp.style.height=h+"px";temp.style.width=w+"px"}i3GEO.parametros.w=w;i3GEO.parametros.h=h;temp=function(){switch(i3GEO.Interface.ATUAL){case"googlemaps":i3GEO.Interface.googlemaps.zoom2extent(i3GEO.parametros.mapexten);break;case"openlayers":i3GEO.Interface.openlayers.zoom2ext(i3GEO.parametros.mapexten);i3geoOL.updateSize();break};i3GEO.guias.ALTURACORPOGUIAS=h;i3GEO.eventos.resizeMapa();return[w,h]};i3GEO.php.mudatamanho(temp,h,w)},atualizaParametros:function(variaveis){i3GEO.parametros.mapscale=variaveis.mapscale*1;i3GEO.parametros.mapres=variaveis.mapres*1;i3GEO.parametros.pixelsize=variaveis.pixelsize*1;i3GEO.parametros.mapexten=variaveis.mapexten;i3GEO.parametros.mapimagem=variaveis.mapimagem;i3GEO.parametros.w=variaveis.w*1;i3GEO.parametros.h=variaveis.h*1;i3GEO.parametros.mappath=variaveis.mappath;i3GEO.parametros.mapurl=variaveis.mapurl;if(i3GEO.login.verificaCookieLogin()){i3GEO.parametros.editor="sim"}else{i3GEO.parametros.editor="nao"}}};
//
//compactados/mustache.js
(function(global,factory){if(typeof exports==="object"&&exports){factory(exports)}else if(typeof define==="function"&&define.amd){define(['exports'],factory)}else{factory(global.Mustache={})}}(this,function(mustache){var Object_toString=Object.prototype.toString;var isArray=Array.isArray||function(object){return Object_toString.call(object)==='[object Array]'};function isFunction(object){return typeof object==='function'}function escapeRegExp(string){return string.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}var RegExp_test=RegExp.prototype.test;function testRegExp(re,string){return RegExp_test.call(re,string)}var nonSpaceRe=/\S/;function isWhitespace(string){return!testRegExp(nonSpaceRe,string)}var entityMap={"&":"&amp;","<":"&lt;",">":"&gt;",'"':'&quot;',"'":'&#39;',"/":'&#x2F;'};function escapeHtml(string){return String(string).replace(/[&<>"'\/]/g,function(s){return entityMap[s]})}var whiteRe=/\s*/;var spaceRe=/\s+/;var equalsRe=/\s*=/;var curlyRe=/\s*\}/;var tagRe=/#|\^|\/|>|\{|&|=|!/;function parseTemplate(template,tags){if(!template)return[];var sections=[];var tokens=[];var spaces=[];var hasTag=false;var nonSpace=false;function stripSpace(){if(hasTag&&!nonSpace){while(spaces.length)delete tokens[spaces.pop()]}else{spaces=[]}hasTag=false;nonSpace=false}var openingTagRe,closingTagRe,closingCurlyRe;function compileTags(tags){if(typeof tags==='string')tags=tags.split(spaceRe,2);if(!isArray(tags)||tags.length!==2)throw new Error('Invalid tags: '+tags);openingTagRe=new RegExp(escapeRegExp(tags[0])+'\\s*');closingTagRe=new RegExp('\\s*'+escapeRegExp(tags[1]));closingCurlyRe=new RegExp('\\s*'+escapeRegExp('}'+tags[1]))}compileTags(tags||mustache.tags);var scanner=new Scanner(template);var start,type,value,chr,token,openSection;while(!scanner.eos()){start=scanner.pos;value=scanner.scanUntil(openingTagRe);if(value){for(var i=0,valueLength=value.length;i<valueLength;++i){chr=value.charAt(i);if(isWhitespace(chr)){spaces.push(tokens.length)}else{nonSpace=true}tokens.push(['text',chr,start,start+1]);start+=1;if(chr==='\n')stripSpace()}}if(!scanner.scan(openingTagRe))break;hasTag=true;type=scanner.scan(tagRe)||'name';scanner.scan(whiteRe);if(type==='='){value=scanner.scanUntil(equalsRe);scanner.scan(equalsRe);scanner.scanUntil(closingTagRe)}else if(type==='{'){value=scanner.scanUntil(closingCurlyRe);scanner.scan(curlyRe);scanner.scanUntil(closingTagRe);type='&'}else{value=scanner.scanUntil(closingTagRe)}if(!scanner.scan(closingTagRe))throw new Error('Unclosed tag at '+scanner.pos);token=[type,value,start,scanner.pos];tokens.push(token);if(type==='#'||type==='^'){sections.push(token)}else if(type==='/'){openSection=sections.pop();if(!openSection)throw new Error('Unopened section "'+value+'" at '+start);if(openSection[1]!==value)throw new Error('Unclosed section "'+openSection[1]+'" at '+start)}else if(type==='name'||type==='{'||type==='&'){nonSpace=true}else if(type==='='){compileTags(value)}}openSection=sections.pop();if(openSection)throw new Error('Unclosed section "'+openSection[1]+'" at '+scanner.pos);return nestTokens(squashTokens(tokens))}function squashTokens(tokens){var squashedTokens=[];var token,lastToken;for(var i=0,numTokens=tokens.length;i<numTokens;++i){token=tokens[i];if(token){if(token[0]==='text'&&lastToken&&lastToken[0]==='text'){lastToken[1]+=token[1];lastToken[3]=token[3]}else{squashedTokens.push(token);lastToken=token}}}return squashedTokens}function nestTokens(tokens){var nestedTokens=[];var collector=nestedTokens;var sections=[];var token,section;for(var i=0,numTokens=tokens.length;i<numTokens;++i){token=tokens[i];switch(token[0]){case'#':case'^':collector.push(token);sections.push(token);collector=token[4]=[];break;case'/':section=sections.pop();section[5]=token[2];collector=sections.length>0?sections[sections.length-1][4]:nestedTokens;break;default:collector.push(token)}}return nestedTokens}function Scanner(string){this.string=string;this.tail=string;this.pos=0}Scanner.prototype.eos=function(){return this.tail===""};Scanner.prototype.scan=function(re){var match=this.tail.match(re);if(!match||match.index!==0)return'';var string=match[0];this.tail=this.tail.substring(string.length);this.pos+=string.length;return string};Scanner.prototype.scanUntil=function(re){var index=this.tail.search(re),match;switch(index){case-1:match=this.tail;this.tail="";break;case 0:match="";break;default:match=this.tail.substring(0,index);this.tail=this.tail.substring(index)}this.pos+=match.length;return match};function Context(view,parentContext){this.view=view==null?{}:view;this.cache={'.':this.view};this.parent=parentContext}Context.prototype.push=function(view){return new Context(view,this)};Context.prototype.lookup=function(name){var cache=this.cache;var value;if(name in cache){value=cache[name]}else{var context=this,names,index;while(context){if(name.indexOf('.')>0){value=context.view;names=name.split('.');index=0;while(value!=null&&index<names.length)value=value[names[index++]]}else{value=context.view[name]}if(value!=null)break;context=context.parent}cache[name]=value}if(isFunction(value))value=value.call(this.view);return value};function Writer(){this.cache={}}Writer.prototype.clearCache=function(){this.cache={}};Writer.prototype.parse=function(template,tags){var cache=this.cache;var tokens=cache[template];if(tokens==null)tokens=cache[template]=parseTemplate(template,tags);return tokens};Writer.prototype.render=function(template,view,partials){var tokens=this.parse(template);var context=(view instanceof Context)?view:new Context(view);return this.renderTokens(tokens,context,partials,template)};Writer.prototype.renderTokens=function(tokens,context,partials,originalTemplate){var buffer='';var self=this;function subRender(template){return self.render(template,context,partials)}var token,value;for(var i=0,numTokens=tokens.length;i<numTokens;++i){token=tokens[i];switch(token[0]){case'#':value=context.lookup(token[1]);if(!value)continue;if(isArray(value)){for(var j=0,valueLength=value.length;j<valueLength;++j){buffer+=this.renderTokens(token[4],context.push(value[j]),partials,originalTemplate)}}else if(typeof value==='object'||typeof value==='string'){buffer+=this.renderTokens(token[4],context.push(value),partials,originalTemplate)}else if(isFunction(value)){if(typeof originalTemplate!=='string')throw new Error('Cannot use higher-order sections without the original template');value=value.call(context.view,originalTemplate.slice(token[3],token[5]),subRender);if(value!=null)buffer+=value}else{buffer+=this.renderTokens(token[4],context,partials,originalTemplate)}break;case'^':value=context.lookup(token[1]);if(!value||(isArray(value)&&value.length===0))buffer+=this.renderTokens(token[4],context,partials,originalTemplate);break;case'>':if(!partials)continue;value=isFunction(partials)?partials(token[1]):partials[token[1]];if(value!=null)buffer+=this.renderTokens(this.parse(value),context,partials,value);break;case'&':value=context.lookup(token[1]);if(value!=null)buffer+=value;break;case'name':value=context.lookup(token[1]);if(value!=null)buffer+=mustache.escape(value);break;case'text':buffer+=token[1];break}}return buffer};mustache.name="mustache.js";mustache.version="0.8.1";mustache.tags=["{{","}}"];var defaultWriter=new Writer();mustache.clearCache=function(){return defaultWriter.clearCache()};mustache.parse=function(template,tags){return defaultWriter.parse(template,tags)};mustache.render=function(template,view,partials){return defaultWriter.render(template,view,partials)};mustache.to_html=function(template,view,partials,send){var result=mustache.render(template,view,partials);if(isFunction(send)){send(result)}else{return result}};mustache.escape=escapeHtml;mustache.Scanner=Scanner;mustache.Context=Context;mustache.Writer=Writer}));
//
//compactados/util_compacto.js
if(typeof(i3GEO)==='undefined'){var i3GEO={}}var navm=false;var navn=false;var chro=navigator.userAgent.toLowerCase().indexOf('chrome')>-1;var opera=navigator.userAgent.toLowerCase().indexOf('opera')>-1;if(navigator.appName.substring(0,1)==='N'){navn=true}if(navigator.appName.substring(0,1)==='M'){navm=true}if(opera===true){navn=true}var $i=function(id){if(!id||id===""){return false}return document.getElementById(id)};Array.prototype.remove=function(s){try{var n=this.length,i;for(i=0;i<n;i++){if(this[i]==s){this.splice(i,1)}}}catch(e){}};Array.prototype.getUnique=function(){var u={},a=[];for(var i=0,l=this.length;i<l;++i){if(u.hasOwnProperty(this[i])){continue}a.push(this[i]);u[this[i]]=1}return a};(function(){function decimalAdjust(type,value,exp){if(typeof exp==='undefined'||+exp===0){return Math[type](value)}value=+value;exp=+exp;if(isNaN(value)||!(typeof exp==='number'&&exp%1===0)){return NaN}value=value.toString().split('e');value=Math[type](+(value[0]+'e'+(value[1]?(+value[1]-exp):-exp)));value=value.toString().split('e');return+(value[0]+'e'+(value[1]?(+value[1]+exp):exp))}if(!Math.round10){Math.round10=function(value,exp){return decimalAdjust('round',value,exp)}}if(!Math.floor10){Math.floor10=function(value,exp){return decimalAdjust('floor',value,exp)}}if(!Math.ceil10){Math.ceil10=function(value,exp){return decimalAdjust('ceil',value,exp)}}})();i3GEO.util={PINS:[],BOXES:[],trim:function(s){return s.replace(/^\s+|\s+$/gm,'')},generateId:function(pre){if(!pre){pre="UniqId"}return pre+String(Date.now())+Math.floor(Math.random()*10000)},escapeURL:function(sUrl){var re;sUrl=escape(sUrl);re=new RegExp("%3F","g");sUrl=sUrl.replace(re,'?');re=new RegExp("%3D","g");sUrl=sUrl.replace(re,'=');re=new RegExp("%26","g");sUrl=sUrl.replace(re,'&');return sUrl},insereCookie:function(nome,valor,expira){if(!expira){expira=10}var exdate=new Date();exdate.setDate(exdate.getDate()+expira);document.cookie=nome+"="+valor+"; expires="+exdate.toUTCString()+";path=/"},pegaCookie:function(nome){var cookies,i,fim;cookies=document.cookie;i=cookies.indexOf(nome);if(i===-1){return null}fim=cookies.indexOf(";",i);if(fim===-1){fim=cookies.length}return(unescape(cookies.substring(i,fim))).split("=")[1]},listaChaves:function(obj){var keys,key="";keys=[];for(key in obj){if(obj[key]){keys.push(key)}}return keys},listaTodasChaves:function(obj){var keys,key="";keys=[];for(key in obj){keys.push(key)}return keys},removeAcentos:function(str){var defaultDiacriticsRemovalMap=[{'base':'A','letters':/[\u0041\u24B6\uFF21\u00C0\u00C1\u00C2\u1EA6\u1EA4\u1EAA\u1EA8\u00C3\u0100\u0102\u1EB0\u1EAE\u1EB4\u1EB2\u0226\u01E0\u00C4\u01DE\u1EA2\u00C5\u01FA\u01CD\u0200\u0202\u1EA0\u1EAC\u1EB6\u1E00\u0104\u023A\u2C6F]/g},{'base':'C','letters':/[\u0043\u24B8\uFF23\u0106\u0108\u010A\u010C\u00C7\u1E08\u0187\u023B\uA73E]/g},{'base':'E','letters':/[\u0045\u24BA\uFF25\u00C8\u00C9\u00CA\u1EC0\u1EBE\u1EC4\u1EC2\u1EBC\u0112\u1E14\u1E16\u0114\u0116\u00CB\u1EBA\u011A\u0204\u0206\u1EB8\u1EC6\u0228\u1E1C\u0118\u1E18\u1E1A\u0190\u018E]/g},{'base':'I','letters':/[\u0049\u24BE\uFF29\u00CC\u00CD\u00CE\u0128\u012A\u012C\u0130\u00CF\u1E2E\u1EC8\u01CF\u0208\u020A\u1ECA\u012E\u1E2C\u0197]/g},{'base':'O','letters':/[\u004F\u24C4\uFF2F\u00D2\u00D3\u00D4\u1ED2\u1ED0\u1ED6\u1ED4\u00D5\u1E4C\u022C\u1E4E\u014C\u1E50\u1E52\u014E\u022E\u0230\u00D6\u022A\u1ECE\u0150\u01D1\u020C\u020E\u01A0\u1EDC\u1EDA\u1EE0\u1EDE\u1EE2\u1ECC\u1ED8\u01EA\u01EC\u00D8\u01FE\u0186\u019F\uA74A\uA74C]/g},{'base':'U','letters':/[\u0055\u24CA\uFF35\u00D9\u00DA\u00DB\u0168\u1E78\u016A\u1E7A\u016C\u00DC\u01DB\u01D7\u01D5\u01D9\u1EE6\u016E\u0170\u01D3\u0214\u0216\u01AF\u1EEA\u1EE8\u1EEE\u1EEC\u1EF0\u1EE4\u1E72\u0172\u1E76\u1E74\u0244]/g},{'base':'a','letters':/[\u0061\u24D0\uFF41\u1E9A\u00E0\u00E1\u00E2\u1EA7\u1EA5\u1EAB\u1EA9\u00E3\u0101\u0103\u1EB1\u1EAF\u1EB5\u1EB3\u0227\u01E1\u00E4\u01DF\u1EA3\u00E5\u01FB\u01CE\u0201\u0203\u1EA1\u1EAD\u1EB7\u1E01\u0105\u2C65\u0250]/g},{'base':'c','letters':/[\u0063\u24D2\uFF43\u0107\u0109\u010B\u010D\u00E7\u1E09\u0188\u023C\uA73F\u2184]/g},{'base':'e','letters':/[\u0065\u24D4\uFF45\u00E8\u00E9\u00EA\u1EC1\u1EBF\u1EC5\u1EC3\u1EBD\u0113\u1E15\u1E17\u0115\u0117\u00EB\u1EBB\u011B\u0205\u0207\u1EB9\u1EC7\u0229\u1E1D\u0119\u1E19\u1E1B\u0247\u025B\u01DD]/g},{'base':'i','letters':/[\u0069\u24D8\uFF49\u00EC\u00ED\u00EE\u0129\u012B\u012D\u00EF\u1E2F\u1EC9\u01D0\u0209\u020B\u1ECB\u012F\u1E2D\u0268\u0131]/g},{'base':'o','letters':/[\u006F\u24DE\uFF4F\u00F2\u00F3\u00F4\u1ED3\u1ED1\u1ED7\u1ED5\u00F5\u1E4D\u022D\u1E4F\u014D\u1E51\u1E53\u014F\u022F\u0231\u00F6\u022B\u1ECF\u0151\u01D2\u020D\u020F\u01A1\u1EDD\u1EDB\u1EE1\u1EDF\u1EE3\u1ECD\u1ED9\u01EB\u01ED\u00F8\u01FF\u0254\uA74B\uA74D\u0275]/g},{'base':'u','letters':/[\u0075\u24E4\uFF55\u00F9\u00FA\u00FB\u0169\u1E79\u016B\u1E7B\u016D\u00FC\u01DC\u01D8\u01D6\u01DA\u1EE7\u016F\u0171\u01D4\u0215\u0217\u01B0\u1EEB\u1EE9\u1EEF\u1EED\u1EF1\u1EE5\u1E73\u0173\u1E77\u1E75\u0289]/g}];for(var i=0;i<defaultDiacriticsRemovalMap.length;i++){str=str.replace(defaultDiacriticsRemovalMap[i].letters,defaultDiacriticsRemovalMap[i].base)}return str},protocolo:function(){var u=window.location.href;u=u.split(":");return(u[0])},pegaPosicaoObjeto:function(obj){if(obj){if(!obj.style){return[0,0]}var curleft=0,curtop=0;if(obj){if(obj.offsetParent){do{curleft+=obj.offsetLeft-obj.scrollLeft;curtop+=obj.offsetTop-obj.scrollTop;obj=obj.offsetParent}while(obj)}}return[curleft+document.body.scrollLeft,curtop+document.body.scrollTop]}else{return[0,0]}},pegaElementoPai:function(e){var targ=document;if(!e){e=window.event}if(e.target){targ=e.target}else{if(e.srcElement){targ=e.srcElement}}if(targ.nodeType===3){targ=targ.parentNode}if(targ.parentNode){tparent=targ.parentNode;return(tparent)}else{return targ}},mudaCursor:function(){},criaBox:function(id){if(arguments.length===0){id="boxg"}if(!$i(id)){var novoel=document.createElement("div");novoel.id=id;novoel.style.zIndex=1;novoel.innerHTML='<font face="Arial" size=0></font>';document.body.appendChild(novoel);novoel.onmouseover=function(){novoel.style.display='none'};novoel.onmouseout=function(){novoel.style.display='block'};i3GEO.util.BOXES.push(id)}else{$i(id).style.display="block"}},escondeBox:function(){var l,i;l=i3GEO.util.BOXES.length;for(i=0;i<l;i++){if($i(i3GEO.util.BOXES[i])){$i(i3GEO.util.BOXES[i]).style.display="none"}}},criaPin:function(id,imagem,w,h,mouseover,onde){if(!id||id===""){id="boxpin"}if(!imagem||imagem===""){imagem=i3GEO.configura.locaplic+'/imagens/marker.png'}if(!w||w===""){w=21}if(!h||h===""){h=25}if(!onde||onde===""){onde=document.body}var p=$i(id);if(!p){var novoel=document.createElement("img");novoel.style.zIndex=10000;novoel.style.position="absolute";novoel.style.width=parseInt(w,10)+"px";novoel.style.height=parseInt(h,10)+"px";novoel.style.top="0px";novoel.style.left="0px";novoel.src=imagem;novoel.id=id;novoel.style.display="block";if(id==="boxpin"){novoel.onmouseover=function(){$i("boxpin").style.display="none"}}else if(mouseover){novoel.onmouseover=mouseover}onde.appendChild(novoel);i3GEO.util.PINS.push(id);return[true,novoel]}p.style.display="block";return[false,p]},posicionaImagemNoMapa:function(id,x,y){var i,mx,my;if(!x){x=objposicaocursor.telax}if(!y){y=objposicaocursor.telay}i=$i(id);mx=parseInt(i.style.width,10)/2;my=parseInt(i.style.height,10)/2;i.style.top=y-my+"px";i.style.left=x-mx+"px";return[y-my,x-mx]},escondePin:function(){var l,i;l=i3GEO.util.PINS.length;for(i=0;i<l;i++){if($i(i3GEO.util.PINS[i])){$i(i3GEO.util.PINS[i]).style.display="none"}}},removePin:function(id){var l,i,idpin;l=i3GEO.util.PINS.length;for(i=0;i<l;i++){idpin=i3GEO.util.PINS[i];if($i(idpin)){if(!id||(id&&id===idpin)){$i(idpin).style.display="none";i3GEO.util.removeChild(idpin);i3GEO.util.PINS.remove(i)}}}},$im:function(g){return i3GEO.configura.locaplic+"/imagens/"+g},$inputText:function(idPai,larguraIdPai,idInput,titulo,digitos,valor,nome,onch){if(arguments.length===6){nome=""}if(idPai!==""){if(larguraIdPai!==""){$i(idPai).style.width=larguraIdPai+"px"}$i(idPai).style.padding="3";$i(idPai).style.textAlign="center"}if(!onch){onch=""}return"<span ><input onchange=\""+onch+"\" tabindex='0'  id='"+idInput+"' title='"+titulo+"' type='text' size='"+digitos+"' value='"+valor+"' name='"+nome+"' /></span>"},$inputTextMudaCor:function(obj){var n=obj.value.split(" ");obj.style.color="rgb("+n[0]+","+n[1]+","+n[2]+")"},$top:function(id,valor){if(document.getElementById(id).style){if(document.getElementById(id).style.pixelTop){document.getElementById(id).style.pixelTop=valor}else{document.getElementById(id).style.top=valor+"px"}}},$left:function(id,valor){if(document.getElementById(id).style){if(document.getElementById(id).style.pixelLeft){document.getElementById(id).style.pixelLeft=valor}else{document.getElementById(id).style.left=valor+"px"}}},adicionaSHP:function(path){var temp=path.split(".");if((temp[1]==="SHP")||(temp[1]==="shp")){i3GEO.php.adicionaTemaSHP(i3GEO.atualiza,path)}else{i3GEO.php.adicionaTemaIMG(i3GEO.atualiza,path)}},abreCor:function(janelaid,elemento,tipo){if(!i3GEO.configura){i3GEO.configura={locaplic:"../"}}if(arguments.length===2){tipo="rgb"}var janela,ins,novoel,wdocaiframe,wsrc=i3GEO.configura.locaplic+"/ferramentas/colorpicker/index.htm?doc="+janelaid+"&elemento="+elemento+"&tipo="+tipo,texto="Cor",id="i3geo_janelaCor",classe="hd";if($i(id)){YAHOO.i3GEO.janela.manager.find(id).show();return}ins='<div id="'+id+'_cabecalho" class="hd">';ins+="<span><img id='i3geo_janelaCor_imagemCabecalho' style='visibility:hidden;' src=\'"+i3GEO.configura.locaplic+"/imagens/aguarde.gif\' /></span>";ins+=texto;ins+='</div><div id="i3geo_janelaCor_corpo" class="bd" style="padding:5px">';if(wsrc!==""){ins+='<iframe name="'+id+'i" id="i3geo_janelaCori" valign="top" style="height:230px,border:0px white solid"></iframe>'}ins+='</div>';novoel=document.createElement("div");novoel.id="i3geo_janelaCor";novoel.style.display="block";novoel.innerHTML=ins;if($i("i3geo")){$i("i3geo").appendChild(novoel)}else{document.body.appendChild(novoel)}wdocaiframe=$i("i3geo_janelaCori");if(wdocaiframe){wdocaiframe.style.display="block";wdocaiframe.src=wsrc;wdocaiframe.style.height="250px";wdocaiframe.style.width="355px";wdocaiframe.style.border="0px solid white"}janela=new YAHOO.widget.Panel(id,{height:"290px",modal:false,width:"360px",fixedcenter:true,constraintoviewport:false,visible:true,iframe:false,strings:{close:"<span class='material-icons'>cancel</span>"}});YAHOO.i3GEO.janela.manager.register(janela);janela.render();$i(id+'_cabecalho').className=classe},aparece:function(id,tempo,intervalo){var n,obj,opacidade,fadei=0,tempoFadei=null;n=parseInt(tempo/intervalo,10);obj=$i(id);if(n===1){obj.style.display="block";if(navm){obj.style.filter='alpha(opacity=100)'}else{obj.style.opacity=1}}tempo=n*intervalo;intervalo=(intervalo*100)/tempo;opacidade=0;if(navm){obj.style.filter='alpha(opacity=0)'}else{obj.style.opacity=0}obj.style.display="block";fadei=function(){opacidade+=intervalo;if(navm){obj.style.filter='alpha(opacity='+opacidade+')'}else{obj.style.opacity=opacidade/100}if(opacidade<100){tempoFadei=setTimeout(fadei,tempo)}else{if(tempoFadei){clearTimeout(tempoFadei)}if(navm){obj.style.filter='alpha(opacity=100)'}else{obj.style.opacity=1}}};tempoFadei=setTimeout(fadei,tempo)},desaparece:function(id,tempo,intervalo,removeobj){var n,obj,opacidade,fade=0,p,tempoFade=null;n=parseInt(tempo/intervalo,10);obj=$i(id);if(n===1){obj.style.display="none";if(removeobj){p=obj.parentNode;if(p){p.removeChild(obj)}}return}tempo=n*intervalo;intervalo=(intervalo*100)/tempo;opacidade=100;if(navm){obj.style.filter='alpha(opacity=100)'}else{obj.style.opacity=1}obj.style.display="block";fade=function(){opacidade-=intervalo;if(navm){obj.style.filter='alpha(opacity='+opacidade+')'}else{obj.style.opacity=opacidade/100}if(opacidade>0){tempoFade=setTimeout(fade,tempo)}else{if(tempoFade){clearTimeout(tempoFade)}obj.style.display="none";if(navm){obj.style.filter='alpha(opacity=100)'}else{obj.style.opacity=1}if(removeobj){p=obj.parentNode;if(p){p.removeChild(obj)}}}};tempoFade=setTimeout(fade,tempo)},wkt2ext:function(wkt,tipo){var re,x,y,w,xMin,xMax,yMin,yMax,temp;tipo=tipo.toLowerCase();ext=false;if(tipo==="polygon"){try{re=new RegExp("POLYGON","g");wkt=wkt.replace(re,"");wkt=wkt.split("(")[2].split(")")[0];wkt=wkt.split(",");x=[];y=[];for(w=0;w<wkt.length;w++){temp=wkt[w].split(" ");x.push(temp[0]);y.push(temp[1])}x.sort(i3GEO.util.sortNumber);xMin=x[0];xMax=x[(x.length)-1];y.sort(i3GEO.util.sortNumber);yMin=y[0];yMax=y[(y.length)-1];return xMin+" "+yMin+" "+xMax+" "+yMax}catch(e){}}if(tipo==="point"){try{re=new RegExp("POINT","g");wkt=wkt.replace(re,"");wkt=wkt.split("(")[1].split(")")[0];wkt=wkt.split(" ");return(wkt[0]*1-0.01)+" "+(wkt[1]*1-0.01)+" "+(wkt[0]*1+0.01)+" "+(wkt[1]*1+0.01)}catch(e){}}return ext},sortNumber:function(a,b){return a-b},getScrollerWidth:function(){var scr=null,inn=null,wNoScroll=0,wScroll=0;scr=document.createElement('div');scr.style.position='absolute';scr.style.top='-1000px';scr.style.left='-1000px';scr.style.width='100px';scr.style.height='50px';scr.style.overflow='hidden';inn=document.createElement('div');inn.style.width='100%';inn.style.height='200px';scr.appendChild(inn);document.body.appendChild(scr);wNoScroll=inn.offsetWidth;scr.style.overflow='auto';wScroll=inn.offsetWidth;document.body.removeChild(document.body.lastChild);return(wNoScroll-wScroll)},getScrollHeight:function(){var mx=Math.max,d=document;return mx(mx(d.body.scrollHeight,d.documentElement.scrollHeight),mx(d.body.offsetHeight,d.documentElement.offsetHeight),mx(d.body.clientHeight,d.documentElement.clientHeight))},scriptTag:function(js,ini,id,aguarde){var head,script;if(!$i(id)||id===""){head=document.getElementsByTagName('head')[0];script=document.createElement('script');script.type='text/javascript';if(ini!==""){if(navm){script.onreadystatechange=function(){if(this.readyState==='loaded'||this.readyState==='complete'){if(ini.call){ini.call()}else{eval(ini)}}}}else{script.onload=function(){if(ini.call){ini.call()}else{eval(ini)}}}}script.src=js;if(id!==""){script.id=id}head.appendChild(script)}else{if(ini!==""){if(jQuery.isFunction(ini)){ini.call()}else{eval(ini)}}}},removeScriptTag:function(id){try{old=$i("loadscriptI3GEO");if(old!==null){old.parentNode.removeChild(old);old=null;eval(id+" = null;")}old=$i(id);if(old!==null){old.parentNode.removeChild(old)}}catch(erro){}},verificaScriptTag:function(texto){var s=document.getElementsByTagName("script"),n=s.length,i,t;try{for(i=0;i<n;i++){t=s[i].id;t=t.split(".");if(t[2]&&t[2]=="dicionario_script"){return false}if(t[0]===texto){return true}}return false}catch(e){return false}},mensagemAjuda:function(onde,texto){var ins="<table class='mensagemAjuda' ><tr><th>";ins+='<div style="float:right"></div>';ins+='<div style="text-align:left;">';if(texto===""){texto=$i(onde).innerHTML}ins+=texto;ins+='</div></th></tr></table>';if(onde!==""){$i(onde).innerHTML=ins}else{return(ins)}},randomRGB:function(){var v=Math.random(),r=parseInt(255*v,10),g;v=Math.random();g=parseInt(255*v,10);v=Math.random();b=parseInt(255*v,10);return(r+","+g+","+b)},rgb2hex:function(str){var rgb=str.split(",");function hex(x){return("0"+parseInt(x).toString(16)).slice(-2)}return"#"+hex(rgb[0])+hex(rgb[1])+hex(rgb[2])},hex2rgb:function(colour){var r,g,b;if(colour.charAt(0)=='#'){colour=colour.substr(1)}if(colour.length==3){colour=colour.substr(0,1)+colour.substr(0,1)+colour.substr(1,2)+colour.substr(1,2)+colour.substr(2,3)+colour.substr(2,3)}r=colour.charAt(0)+''+colour.charAt(1);g=colour.charAt(2)+''+colour.charAt(3);b=colour.charAt(4)+''+colour.charAt(5);r=parseInt(r,16);g=parseInt(g,16);b=parseInt(b,16);return r+','+g+','+b},comboTemas:function(id,funcao,onde,nome,multiplo,tipoCombo,estilo,yui,incluiVazio,classe){if(onde&&onde!==""){}if(!nome){nome=""}if(!multiplo){multiplo=false}if(!estilo||estilo==""){estilo="font-size: 12px;width: 95%;"}if(!yui){yui=false}if(!incluiVazio){incluiVazio=false}if(!classe){classe=""}var monta,temp,temp1,temp2;monta=function(retorno){var i,comboTemas='',n,nome="",tema;if(yui===true){comboTemas='<input type="button" name='+id+'_button id="'+id+'" value="'+$trad("x33")+'&nbsp;&nbsp;">';id=id+"select";nome=id}if(retorno==undefined||retorno.length==0||(retorno.data&&retorno.data.length==0)){retorno={"data":[{"tema":"","nome":"---"}]};incluiVazio=false}if(retorno!==undefined){if(retorno.data){retorno=retorno.data}n=retorno.length;if(n>0){if(multiplo){comboTemas+="<select class='"+classe+"' style='"+estilo+"' id='"+id+"' size='4' multiple='multiple' name='"+nome+"'>"}else{comboTemas+="<select class='"+classe+"' style='"+estilo+"' id='"+id+"' name='"+nome+"'>"}if(incluiVazio===true){comboTemas+="<option value=''>"+$trad("x92")+"</option>"}for(i=0;i<n;i++){if(retorno[i].nome){nome=retorno[i].nome;tema=retorno[i].tema}else{nome=retorno[i].tema;tema=retorno[i].name}if(retorno[i].escondido!=="sim"){comboTemas+="<option value="+tema+" >"+nome+"</option>"}}comboTemas+="</select><span class='material-icons iconeComboTemas'>playlist_add_check</span>";temp={dados:comboTemas,tipo:"dados"}}else{if(tipoCombo==="poligonosSelecionados"||tipoCombo==="selecionados"||tipoCombo==="pontosSelecionados"){temp={dados:'<div class=alerta >Nenhum tema encontrado. <span style=cursor:pointer;color:blue onclick="i3GEO.mapa.dialogo.selecao()" > Selecionar...</span></div>',tipo:"mensagem"}}else{temp={dados:'<div class=alerta >Nenhum tema encontrado. </div>',tipo:"mensagem"}}}}else{temp={dados:"<p style=color:red >Ocorreu um erro<br>",tipo:"erro"}}eval("funcao(temp);")};if(tipoCombo==="ligados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("status",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listaTemas(monta,"ligados",i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoCombo==="ligadosComTabela"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("status",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS);temp1=i3GEO.arvoreDeCamadas.filtraCamadas("type",3,"menor",temp);temp2=i3GEO.arvoreDeCamadas.filtraCamadas("type",8,"igual",temp);monta(temp1.concat(temp2))}else{i3GEO.php.listaTemas(monta,"ligados",i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoCombo==="comTabela"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("status",3,"menor",i3GEO.arvoreDeCamadas.CAMADAS);temp1=i3GEO.arvoreDeCamadas.filtraCamadas("type",3,"menor",temp);temp2=i3GEO.arvoreDeCamadas.filtraCamadas("type",8,"igual",temp);monta(temp1.concat(temp2))}}if(tipoCombo==="locais"){i3GEO.php.listaTemasEditaveis(monta,i3GEO.configura.locaplic,i3GEO.configura.sid)}if(tipoCombo==="editavel"){temp=i3GEO.arvoreDeCamadas.filtraCamadas("editavel","SIM","igual",i3GEO.arvoreDeCamadas.CAMADAS);monta(temp)}if(tipoCombo==="selecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listaTemasComSel(monta,i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoCombo==="raster"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type",3,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listatemasTipo(monta,"raster",i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoCombo==="pontosSelecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("type",0,"igual",i3GEO.arvoreDeCamadas.CAMADAS);monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",temp))}else{i3GEO.janela.tempoMsg($trad("x13"))}}if(tipoCombo==="pontos"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type",0,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.janela.tempoMsg($trad("x13"))}}if(tipoCombo==="poligonos"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.janela.tempoMsg($trad("x13"))}}if(tipoCombo==="naoraster"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("type",4,"diferente",i3GEO.arvoreDeCamadas.CAMADAS);temp=i3GEO.arvoreDeCamadas.filtraCamadas("type",5,"diferente",temp);temp=i3GEO.arvoreDeCamadas.filtraCamadas("type",6,"diferente",temp);temp=i3GEO.arvoreDeCamadas.filtraCamadas("type",7,"diferente",temp);monta(i3GEO.arvoreDeCamadas.filtraCamadas("type",8,"diferente",temp))}else{i3GEO.janela.tempoMsg($trad("x13"))}}if(tipoCombo==="poligonosSelecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("type",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS);monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",temp))}else{i3GEO.janela.tempoMsg($trad("x13"))}}if(tipoCombo==="naolinearSelecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("type",1,"diferente",i3GEO.arvoreDeCamadas.CAMADAS);monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",temp))}else{i3GEO.janela.tempoMsg($trad("x13"))}}if(tipoCombo==="linhaDoTempo"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("linhadotempo","sim","igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.janela.tempoMsg($trad("x13"))}}if(tipoCombo===""){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type","","diferente",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.janela.tempoMsg($trad("x13"))}}},checkCombo:function(id,nomes,valores,estilo,funcaoclick,ids,idschecked){var temp,i,combo="",n=valores.length;if(!funcaoclick){funcaoclick=""}if(n>0){combo="<div id="+id+" style='"+estilo+"'>";for(i=0;i<n;i++){temp="";if(idschecked&&idschecked[i]){temp="checked"}if(!ids){combo+="<li class='checkbox text-left'>"+"<label style='width:90%'>"+"	<input "+temp+"type='checkbox' value='"+valores[i]+"' onclick="+funcaoclick+" >"+"	<span class='checkbox-material'><span class='check'></span></span> "+nomes[i]+"</label></li>"}else{combo+="<li class='checkbox text-left'>"+"<label style='width:90%'>"+"	<input "+temp+"type='checkbox' id="+ids[i]+" value='"+valores[i]+"' onclick="+funcaoclick+" >"+"	<span class='checkbox-material'><span class='check'></span></span> "+nomes[i]+"</label></li>"}}combo+="</div>"}return combo},valoresCheckCombo:function(id){var el=$i(id),res=[],n,i;if(el){el=el.getElementsByTagName("input");n=el.length;for(i=0;i<n;i++){if(el[i].checked===true){res.push(el[i].value)}}}return res},checkTemas:function(id,funcao,onde,nome,tipoLista,prefixo,size){if(arguments.length>2){$i(onde).innerHTML="buscando temas..."}if(arguments.length===3){nome=""}var monta,temp,temp1,n,i;monta=function(retorno){try{var i,comboTemas,n,nome,listaNomes=[],listaValores=[];if(retorno!==undefined){if(retorno.data){retorno=retorno.data}n=retorno.length;if(n>0){comboTemas="";for(i=0;i<n;i++){if(retorno[i].nome){nome=retorno[i].nome;tema=retorno[i].tema}else{nome=retorno[i].tema;tema=retorno[i].name}listaNomes.push(nome);listaValores.push(tema);comboTemas+="<tr><td><input size=2 style='cursor:pointer' type=checkbox name='"+tema+"' /></td>";comboTemas+="<td>&nbsp;<input style='text-align:left;width:"+size+" cursor:text;' onclick='javascript:this.select();' id='"+prefixo+tema+"' type=text value='"+nome+"' /></td></tr>"}temp={dados:comboTemas,tipo:"dados"}}else{temp={dados:'<div class=alerta >Nenhum tema encontrado.</div>',tipo:"mensagem"}}}else{temp={dados:"<p style=color:red >Ocorreu um erro<br>",tipo:"erro"}}eval("funcao(temp,listaNomes,listaValores);")}catch(e){}};if(tipoLista==="ligados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("status",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listaTemas(monta,"ligados",i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoLista==="selecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listaTemasComSel(monta,i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoLista==="raster"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type",3,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listatemasTipo(monta,"raster",i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoLista==="polraster"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("type",3,"igual",i3GEO.arvoreDeCamadas.CAMADAS);temp1=i3GEO.arvoreDeCamadas.filtraCamadas("type",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS);n=temp1.length;for(i=0;i<n;i++){temp.push(temp1[i])}monta(temp)}else{alert($trad("x13"))}}if(tipoLista==="pontosSelecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("type",0,"igual",i3GEO.arvoreDeCamadas.CAMADAS);monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",temp))}else{alert($trad("x13"))}}if(tipoLista==="pontos"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type",0,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{alert($trad("x13"))}}},comboItens:function(id,tema,funcao,onde,nome,alias,estilo,classe){if(!classe){classe=""}if(!estilo){estilo=""}else{estilo="style="+estilo}if(!alias){alias="sim"}if(arguments.length>3&&$i(onde)){$i(onde).innerHTML="<span>buscando itens...</span>"}if(arguments.length<5){nome=""}var monta=function(retorno){var ins,temp,i,nm;if(retorno.data!==undefined){ins=[];ins.push("<select class='"+classe+"' "+estilo+" id='"+id+"' name='"+nome+"'>");ins.push("<option value='' >---</option>");temp=retorno.data.valores.length;for(i=0;i<temp;i++){if(retorno.data.valores[i].tema===tema){if(alias=="sim"){nm=retorno.data.valores[i].alias;if(nm===""){nm=retorno.data.valores[i].item}}else{nm=retorno.data.valores[i].item}ins.push("<option value='"+retorno.data.valores[i].item+"' >"+nm+"</option>")}}ins.push("</select><b class='caret careti' ></b>");ins=ins.join('');temp={dados:ins,tipo:"dados"}}else{temp={dados:'<div class=erro >Ocorreu um erro</div>',tipo:"erro"}}if(jQuery.isFunction(funcao)){funcao.call(this,temp)}else{eval("funcao(temp)")}};i3GEO.php.listaItensTema(monta,tema)},comboValoresItem:function(id,tema,itemTema,funcao,onde,classe){if(arguments.length===5){$i(onde).innerHTML="<span style=color:red;font-size:10px; >buscando valores...</span>"}if(arguments.length<6){classe=""}var monta=function(retorno){var ins=[],i,pares,j,valoresSort=[];if(retorno.data!==undefined){ins.push("<select class='"+classe+"' id="+id+" >");ins.push("<option value='' >---</option>");if(retorno.data[1].registros){for(i=0;i<retorno.data[1].registros.length;i++){pares=retorno.data[1].registros[i].valores;for(j=0;j<pares.length;j++){valoresSort.push(pares[j].valor)}}}else{for(i=0;i<retorno.data.length;i++){valoresSort.push(retorno.data[i])}}valoresSort.sort();for(j=0;j<valoresSort.length;j++){ins.push('<option value="'+valoresSort[j]+'" >'+valoresSort[j]+'</option>')}ins.push("</select><b class='caret careti' ></b>");ins=ins.join('');temp={dados:ins,tipo:"dados"}}else{temp={dados:'<div class=erro >Ocorreu um erro</erro>',tipo:"erro"}}if(jQuery.isFunction(funcao)){funcao.call(this,temp)}else{eval("funcao(temp)")}};i3GEO.php.listaValoresItensTema(monta,tema,itemTema)},comboFontes:function(id,onde,classe){if(!classe){classe=""}var monta=function(retorno){var ins="",temp,i,dados;if(retorno.data!==undefined){ins+="<select class='"+classe+"' id='"+id+"'>";ins+="<option value='arial' >arial</option>";ins+="<option value='bitmap' >bitmap</option>";dados=retorno.data.split(",");temp=dados.length;for(i=0;i<temp;i++){ins+="<option value='"+dados[i]+"' >"+dados[i]+"</option>"}ins+="</select><b class='caret careti' ></b>"}$i(onde).innerHTML=ins};i3GEO.php.listaFontesTexto(monta)},comboSimNao:function(id,selecionado){var combo="<select name="+id+" id="+id+" >";combo+="<option value='' >---</option>";if(selecionado.toLowerCase()==="sim"){combo+="<option value=TRUE selected >"+$trad("x14")+"</option>"}else{combo+="<option value=TRUE >"+$trad("x14")+"</option>"}if(selecionado==="nao"){combo+="<option value=FALSE selected >"+$trad("x15")+"</option>"}else{combo+="<option value=FALSE >"+$trad("x15")+"</option>"}combo+="</select><b class='caret careti' ></b>";return(combo)},checkItensEditaveis:function(tema,funcao,onde,size,prefixo,ordenacao){if(!ordenacao||ordenacao==""){ordenacao="nao"}if(onde!==""){$i(onde).innerHTML="<span style=color:red;font-size:10px; >"+$trad("x65")+"</span>"}var monta=function(retorno){var ins=[],i,temp,n;if(retorno.data!==undefined){if(ordenacao==="sim"){ins.push("<table class=lista7 ><tr><td></td><td>"+$trad("x64")+"</td><td>Ordem</td>")}else{ins.push("<table class=lista7 ><tr><td></td><td>"+$trad("x64")+"</td><td></td>")}n=retorno.data.valores.length;for(i=0;i<n;i++){ins.push("<tr><td><div class='checkbox text-left'><label><input name='"+retorno.data.valores[i].tema+"' id='"+prefixo+retorno.data.valores[i].item+"' type='checkbox'><span class='checkbox-material noprint'><span class='check'></span></span></label></div>"+"</td>");ins.push("<td><div class='form-group condensed' ><input class='form-control' style='width:"+size+"' id='"+prefixo+retorno.data.valores[i].item+retorno.data.valores[i].tema+"' type=text value='"+retorno.data.valores[i].item+"' /></div></td>");if(ordenacao==="sim"){ins.push("<td><div class='form-group condensed' ><input class='form-control' id='ordem_"+prefixo+retorno.data.valores[i].item+retorno.data.valores[i].tema+"' type=text size='3' value='"+i+"' /></div></td>")}else{ins.push("<td></td>")}ins.push("</tr>")}ins.push("</table>");ins=ins.join('');temp={dados:ins,tipo:"dados"}}else{temp={dados:'<div class=erro >'+$trad("x66")+'</div>',tipo:"erro"}}funcao.call(this,temp)};i3GEO.php.listaItensTema(monta,tema)},radioEpsg:function(funcao,onde,prefixo,marcado){var c;if(arguments.length===2){$i(onde).innerHTML="<span style=color:red;font-size:10px; >buscando...</span>"}c="checked";if(marcado&&marcado==="nao"){c=""}var monta=function(retorno){var ins=[],i,n,temp;if(retorno.data!==undefined){ins.push("<table class=lista2 >");n=retorno.data.length;for(i=0;i<n;i++){ins.push("<tr><td><input size=2 style='border:0px solid white;cursor:pointer' "+c+" name='"+prefixo+"EPSG' type=radio value='"+retorno.data[i].codigo+"' /></td>");c="";ins.push("<td>"+retorno.data[i].nome+"</td></tr>")}ins.push("</table>");ins=ins.join('');temp={dados:ins,tipo:"dados"}}else{temp={dados:'<div class=erro >Ocorreu um erro</div>',tipo:"erro"}}funcao(temp)};i3GEO.php.listaEpsg(monta)},comboEpsg:function(idCombo,onde,funcaoOnChange,valorDefault){onde=$i(onde);onde.innerHTML="<span style=color:red;font-size:10px; >buscando...</span>";var monta=function(retorno){var ins=[],i,n;if(retorno.data!==undefined){n=retorno.data.length;ins.push("<select id='"+idCombo+"' onChange='"+funcaoOnChange+"(this)' >");for(i=0;i<n;i++){ins.push("<option value='"+retorno.data[i].codigo+"'>"+retorno.data[i].nome+"</option>")}ins.push("</select><b class='caret careti' ></b>");ins=ins.join('');onde.innerHTML=ins;$i(idCombo).value=valorDefault}else{onde.innerHTML='<div class=erro >Ocorreu um erro</div>'}};i3GEO.php.listaEpsg(monta)},proximoAnterior:function(anterior,proxima,texto,idatual,container,mantem,onde){var c,temp=$i(idatual),botoes="",ndiv=document.createElement("div"),nids,i;if(!mantem){mantem=false}c=$i(container);if(!c){return}if(temp&&mantem==false&&c){c.removeChild(temp)}if(c&&c.style){}botoes="<ul class='proximoAnterior pager condensed' style='width:95%;margin-bottom: 2px;'>";if(anterior!==""){anterior=anterior.replace("()","");botoes+="<li><a onclick='"+anterior+"()' class='pull-left withripple condensed' href='javascript:void(0)'>"+$trad("volta")+"</a></li>"}if(proxima!==""){proxima=proxima.replace("()","");botoes+="<li><a onclick='"+proxima+"()' class='pull-right withripple condensed' href='javascript:void(0)'>"+$trad("continua")+"</a></li>"}botoes+="</ul>";if(onde){$i(onde).innerHTML=botoes}else{texto=texto+"<br><br>"+botoes}if(!document.getElementById(idatual)){ndiv.id=idatual;ndiv.innerHTML=texto;c.appendChild(ndiv)}temp=c.getElementsByTagName("div");nids=temp.length;for(i=0;i<nids;i++){temp[i].style.display="none"}$i(idatual).style.display="block";temp=$i(idatual).getElementsByTagName("div");nids=temp.length;for(i=0;i<nids;i++){temp[i].style.display="block"}},dialogoFerramenta:function(mensagem,dir,nome,nomejs,nomefuncao){if(!nomejs){nomejs="index.js"}if(!nomefuncao){nomefuncao="i3GEOF."+nome+".criaJanelaFlutuante();"}var js=i3GEO.configura.locaplic+"/ferramentas/"+dir+"/"+nomejs;if(!$i("i3GEOF."+nome+"_script")){i3GEO.util.scriptTag(js,nomefuncao,"i3GEOF."+nome+"_script")}else{i3GEO.util.scriptTag(js,nomefuncao,"i3GEOF."+nome+"_script")}},intersectaBox:function(box1,box2){box1=box1.split(" ");box2=box2.split(" ");var box1i=box2,box2i=box1,coordx,coordy;coordx=box1[0]*1;coordy=box1[1]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}coordx=box1[2]*1;coordy=box1[3]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}coordx=box1[2]*1;coordy=box1[1]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}box1=box1i;box2=box2i;coordx=box1[0]*1;coordy=box1[1]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}coordx=box1[2]*1;coordy=box1[3]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}coordx=box1[2]*1;coordy=box1[1]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}return false},abreColourRamp:function(janelaid,elemento,ncores,temaSel,displayComboTemas){var janela,ins,novoel,wdocaiframe,temp,fix=false,wsrc=i3GEO.configura.locaplic+"/ferramentas/colourramp/index.php?ncores="+ncores+"&doc="+janelaid+"&elemento="+elemento+"&locaplic="+i3GEO.configura.locaplic,nx="",texto="",id="i3geo_janelaCorRamp",classe="hd";if(!temaSel){temaSel=""}if($i(id)){janela=YAHOO.i3GEO.janela.manager.find(id);janela.show();janela.bringToTop();return}ins='<div id="'+id+'_cabecalho" class="hd" style="left:10px;">';if(i3GEO&&i3GEO.arvoreDeCamadas){ins+="<div  id='i3geo_janelaCorRampComboCabeca' class='comboTemasCabecalhoBs form-group' style='width:200px;top:0px;display:none;'>   ------</div>"}ins+="&nbsp;&nbsp;&nbsp;"+texto;ins+='</div><div id="i3geo_janelaCorRamp_corpo" class="bd" style="padding:5px">';ins+='<iframe name="'+id+'i" id="i3geo_janelaCorRampi" valign="top" ></iframe>';ins+='</div>';novoel=document.createElement("div");novoel.id="i3geo_janelaCorRamp";novoel.style.display="block";novoel.innerHTML=ins;if($i("i3geo")){$i("i3geo").appendChild(novoel)}else{document.body.appendChild(novoel)}wdocaiframe=$i("i3geo_janelaCorRampi");wdocaiframe.style.display="block";wdocaiframe.src=wsrc;wdocaiframe.style.height="400px";wdocaiframe.style.width="100%";wdocaiframe.style.border="0px solid white";if(nx===""||nx==="center"){fix=true}janela=new YAHOO.widget.Panel(id,{height:"480px",modal:false,width:"295px",fixedcenter:fix,constraintoviewport:true,visible:true,iframe:false,strings:{close:"<span class='material-icons'>cancel</span>"}});YAHOO.i3GEO.janela.manager.register(janela);janela.render();$i(id+'_cabecalho').className=classe;if($i("i3geo_janelaCorRampComboCabeca")){temp=function(){var p,tema=$i("i3geo_janelaCorRampComboCabecaSel").value,funcao=function(retorno){parent.frames["i3geo_janelaCorRampi"].document.getElementById("ncores").value=retorno.data.length};if(tema!==""){i3GEO.mapa.ativaTema(tema);p=i3GEO.configura.locaplic+"/ferramentas/legenda/exec.php?g_sid="+i3GEO.configura.sid+"&funcao=editalegenda&opcao=edita&tema="+tema;i3GEO.util.ajaxGet(p,funcao);cp=new cpaint()}};i3GEO.janela.comboCabecalhoTemasBs("i3geo_janelaCorRampComboCabeca","i3geo_janelaCorRampComboCabecaSel","none","ligados",temp,temaSel)}},localizai3GEO:function(){var scriptLocation="",scripts=document.getElementsByTagName('script'),i=0,index,ns=scripts.length,src;for(i=0;i<ns;i++){src=scripts[i].getAttribute('src');if(src){index=src.lastIndexOf("/js/i3geo.js");if((index>-1)&&(index+"/js/i3geo.js".length===src.length)){scriptLocation=src.slice(0,-"/js/i3geo.js".length);break}index=src.lastIndexOf("/js/i3geonaocompacto.js");if((index>-1)&&(index+"/js/i3geonaocompacto.js".length===src.length)){scriptLocation=src.slice(0,-"/js/i3geonaocompacto.js".length);break}}}if(i3GEO.configura){i3GEO.configura.locaplic=scriptLocation}return scriptLocation},removeChild:function(id,el){var j=$i(id);if(j){if(!el){el=j.parentNode}el.removeChild(j)}},defineValor:function(id,prop,valor){var o=$i(id);if(o){try{$i(id)[prop]=valor}catch(e){}}},in_array:function(x,matriz){var txt=" "+matriz.join(" ")+" ";var er=new RegExp(" "+x+" ","gim");return((txt.match(er))?true:false)},timedProcessArray:function(items,process,callback){var todo=items.concat();setTimeout(function(){var start=+new Date();do{process(todo.shift())}while(todo.length>0&&(+new date()-start<50));if(todo.length>0){setTimeout(arguments.callee,25)}else{callback(items)}},25)},multiStep:function(steps,args,callback){var tasks=steps.concat();setTimeout(function(){var task=tasks.shift(),a=args.shift();task.apply(null,a||[]);if(tasks.length>0){setTimeout(arguments.callee,25)}else{callback()}},25)},tamanhoBrowser:function(){var viewportwidth,viewportheight;if(typeof window.innerWidth!='undefined'){viewportwidth=window.innerWidth,viewportheight=window.innerHeight}else if(typeof document.documentElement!='undefined'&&typeof document.documentElement.clientWidth!='undefined'&&document.documentElement.clientWidth!=0){viewportwidth=document.documentElement.clientWidth,viewportheight=document.documentElement.clientHeight}else{viewportwidth=document.getElementsByTagName('body')[0].clientWidth,viewportheight=document.getElementsByTagName('body')[0].clientHeight}viewportwidth=viewportwidth-i3GEO.util.getScrollerWidth();return[viewportwidth,viewportheight]},detectaTablet:function(){var p,c=DetectaMobile("DetectTierTablet");if(c===false){return false}p=confirm($trad("x73"));if(p){window.location=i3GEO.configura.locaplic+'/interface/'+i3GEO.Interface.ALTTABLET+'?'+i3GEO.configura.sid;return true}},detectaMobile:function(){var p,c=DetectaMobile("DetectMobileLong");if(c===false){return false}p=confirm($trad("x73"));if(p){window.location=i3GEO.configura.locaplic+'/interface/'+i3GEO.Interface.ALTTABLET+'?'+i3GEO.configura.sid;return true}},calculaDPI:function(){var novoel=document.createElement("div"),valor=72;novoel.style.height="1in";novoel.style.left="-100%";novoel.style.position="absolute";novoel.style.top="-100%";novoel.style.width="1in";document.body.appendChild(novoel);if(novoel.offsetHeight){valor=novoel.offsetHeight}document.body.removeChild(novoel);return valor},ajustaDocType:function(){try{if(document.implementation.createDocumentType){var newDoctype=document.implementation.createDocumentType('html','-//W3C//DTD XHTML 1.0 Transitional//EN','http://www.w3.org/TR/html4/loose.dtd');if(document.doctype){document.doctype.parentNode.replaceChild(newDoctype,document.doctype)}}}catch(e){}},versaoNavegador:function(){if(navm&&navigator.userAgent.toLowerCase().indexOf('msie 8.')>-1){return"IE8"}if(navn&&navigator.userAgent.toLowerCase().indexOf('3.')>-1){return"FF3"}return""},decimalPlaces:function(f,l){var ret="",str=f.toString(),array=str.split("."),i;if(array.length==2){ret+=array[0]+".";for(i=0;i<l;i++){if(i>=array[1].length)ret+='0';else ret+=array[1][i]}}else if(array.length==1){ret+=array[0]+".";for(i=0;i<l;i++){ret+='0'}}return ret},ajaxGet:function(sUrl,funcaoRetorno){var re,falhou,callback;sUrl=escape(sUrl);re=new RegExp("%3F","g");sUrl=sUrl.replace(re,'?');re=new RegExp("%3D","g");sUrl=sUrl.replace(re,'=');re=new RegExp("%26","g");sUrl=sUrl.replace(re,'&');re=new RegExp("%3A","g");sUrl=sUrl.replace(re,':');falhou=function(e){};callback={success:function(o){try{funcaoRetorno.call("",JSON.parse(o.responseText))}catch(e){falhou(e)}},failure:falhou,argument:{foo:"foo",bar:"bar"}};YAHOO.util.Connect.asyncRequest("GET",sUrl,callback)},verifica_html5_storage:function(){if(typeof(Storage)!=="undefined"){return true}else{return false}},pegaDadosLocal:function(item){if(i3GEO.util.verifica_html5_storage()&&localStorage[item]){return window.localStorage[item]}else{return false}},limpaDadosLocal:function(item){if(i3GEO.util.verifica_html5_storage()&&localStorage[item]){window.localStorage.clear(item)}},gravaDadosLocal:function(item,valor){if(i3GEO.util.verifica_html5_storage()){window.localStorage[item]=valor;return true}else{return false}},extGeo2OSM:function(ext,retornaArray){var metrica,point,temp,sep;sep=" ";if(typeof ext=="object"){return i3GEO.util.projGeo2OSM(ext)}if(i3GEO.Interface.openlayers.googleLike===true){temp=ext.split(sep);if(temp===1){sep=",";temp=ext.split(sep)}if(temp[0]*1<=180&&temp[0]*1>=-180){point=new ol.geom.Point([temp[0]*1,temp[1]*1]);metrica=point.transform("EPSG:4326","EPSG:3857");ext=metrica.getCoordinates()[0]+sep+metrica.getCoordinates()[1];if(temp.length>2){point=new ol.geom.Point([temp[2]*1,temp[3]*1]);metrica=point.transform("EPSG:4326","EPSG:3857");ext+=sep+metrica.getCoordinates()[0]+sep+metrica.getCoordinates()[1]}}}if(retornaArray){return ext.split(sep)}else{return ext}},extOSM2Geo:function(ext,retornaArray){var point,temp,sep;sep=" ";if(typeof ext=="object"){return i3GEO.util.projOSM2Geo(ext)}if(i3GEO.Interface.openlayers.googleLike===true){temp=ext.split(sep);if(temp===1){sep=",";temp=ext.split(sep)}if(temp[0]*1>=180||temp[0]*1<=-180){point=new ol.geom.Point([temp[0],temp[1]]);point.transform("EPSG:3857","EPSG:4326");ext=point.getCoordinates()[0]+sep+point.getCoordinates()[1];if(temp.length>2){point=new ol.geom.Point([temp[2],temp[3]]);point.transform("EPSG:3857","EPSG:4326");ext+=sep+point.getCoordinates()[0]+sep+point.getCoordinates()[1]}}}if(retornaArray){return ext.split(sep)}else{return ext}},projOSM2Geo:function(obj){if(i3GEO.Interface.openlayers.googleLike===true){var clone=obj.clone();clone.transform("EPSG:3857","EPSG:4326");return clone}else{return obj}},projGeo2OSM:function(obj){if(i3GEO.Interface.openlayers.googleLike===true){var clone=obj.clone();clone.transform("EPSG:4326","EPSG:3857");return clone}else{return obj}},navegadorDir:function(obj,listaShp,listaImg,listaFig,retornaDir){if(!obj){listaShp=true;listaImg=true;listaFig=true;retornaDir=false}var temp=function(){i3GEOF.navegarquivos.iniciaDicionario(obj,listaShp,listaImg,listaFig,retornaDir)};i3GEO.util.dialogoFerramenta("i3GEO.util.navegadorDir()","navegarquivos","navegarquivos","index.js",temp)},base64encode:function(str){var base64EncodeChars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";var out,i,len;var c1,c2,c3;len=str.length;i=0;out="";while(i<len){c1=str.charCodeAt(i++)&0xff;if(i==len){out+=base64EncodeChars.charAt(c1>>2);out+=base64EncodeChars.charAt((c1&0x3)<<4);out+="==";break}c2=str.charCodeAt(i++);if(i==len){out+=base64EncodeChars.charAt(c1>>2);out+=base64EncodeChars.charAt(((c1&0x3)<<4)|((c2&0xF0)>>4));out+=base64EncodeChars.charAt((c2&0xF)<<2);out+="=";break}c3=str.charCodeAt(i++);out+=base64EncodeChars.charAt(c1>>2);out+=base64EncodeChars.charAt(((c1&0x3)<<4)|((c2&0xF0)>>4));out+=base64EncodeChars.charAt(((c2&0xF)<<2)|((c3&0xC0)>>6));out+=base64EncodeChars.charAt(c3&0x3F)}return out},base64decode:function(str){var base64DecodeChars=new Array(-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,-1,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,-1,-1,-1,-1,-1);var c1,c2,c3,c4;var i,len,out;len=str.length;i=0;out="";while(i<len){do{c1=base64DecodeChars[str.charCodeAt(i++)&0xff]}while(i<len&&c1==-1);if(c1==-1)break;do{c2=base64DecodeChars[str.charCodeAt(i++)&0xff]}while(i<len&&c2==-1);if(c2==-1)break;out+=String.fromCharCode((c1<<2)|((c2&0x30)>>4));do{c3=str.charCodeAt(i++)&0xff;if(c3==61)return out;c3=base64DecodeChars[c3]}while(i<len&&c3==-1);if(c3==-1)break;out+=String.fromCharCode(((c2&0XF)<<4)|((c3&0x3C)>>2));do{c4=str.charCodeAt(i++)&0xff;if(c4==61)return out;c4=base64DecodeChars[c4]}while(i<len&&c4==-1);if(c4==-1)break;out+=String.fromCharCode(((c3&0x03)<<6)|c4)}return out},cloneObj:function(obj){if(obj==null||typeof(obj)!='object')return obj;var temp=new obj.constructor();for(var key in obj)temp[key]=i3GEO.util.cloneObj(obj[key]);return temp},aplicaAquarela:function(onde){$($i(onde)).find(".i3geoFormIconeAquarela").click(function(){if(this.firstChild){i3GEO.util.abreCor("",$(this).find("input")[0].id)}else{i3GEO.util.abreCor("",this.id)}})},insereMarca:{cria:function(){alert("i3GEO.util.insereMarca foi depreciado. Veja a classe i3GEO.desenho")},limpa:function(){}},animaClique:function(obj){if(obj){if(i3GEO.Interface.ATUAL==="googlemaps"){i3GeoMap.getStreetView().setVisible(false)}obj.style.visibility="hidden";setTimeout(function(){obj.style.visibility="visible"},50)}},parseMustache:function(templateMustache,hashMustache){var re=new RegExp("&amp;","g"),m;m=Mustache.render(templateMustache,hashMustache);m=m.replace(re,'&');return m},checaHtmlVazio:function(id){var i=$i(id);if(!i){return null}if(i.innerHTML.replace(/^\s+|\s+$/,'')==""){return true}else{return false}},uid:function(){return(new Date().getTime()).toString(36)},copyToClipboard:function(texto){if(window.clipboardData&&window.clipboardData.setData){return clipboardData.setData("Text",texto)}else if(document.queryCommandSupported&&document.queryCommandSupported("copy")){var textarea=document.createElement("textarea");textarea.textContent=texto;textarea.style.position="fixed";document.body.appendChild(textarea);textarea.select();try{return document.execCommand("copy")}catch(ex){return false}finally{document.body.removeChild(textarea)}}},getFormData:function(dom_query){var out={};var s_data=$(dom_query).serializeArray();for(var i=0;i<s_data.length;i++){var record=s_data[i];out[record.name]=record.value}return out}};var $im=function(g){return i3GEO.util.$im(g)};var $inputText=function(idPai,larguraIdPai,idInput,titulo,digitos,valor,nome,onch){if(arguments.length===6){nome=""}return i3GEO.util.$inputText(idPai,larguraIdPai,idInput,titulo,digitos,valor,nome,onch)};
//
//compactados/dicionario_compacto.js
g_traducao={"dec":[{pt:",",en:".",es:","}],"mil":[{pt:".",en:",",es:"."}],"p1":[{pt:"O i3Geo &eacute; software livre! Para download clique <a href='https://softwarepublico.gov.br/social/i3geo' target=blank >aqui</a>. <b><a href='http://"+window.location.host+"/i3geo/mobile/qrcode.htm' target=blank >Qrcode mobile</a></b>",en:"I3Geo is an open source software! Click <a href='https://softwarepublico.gov.br/social/i3geo' target=blank >here</a> to download. <b><a href='http://"+window.location.host+"/i3geo/mobile/qrcode.htm' target=blank >Qrcode mobile</a></b>",es:"i3Geo es software libre! Para descargar haga clic <a href='https://softwarepublico.gov.br/social/i3geo' target=blank >aqu&iacute;</a>. <b><a href='http://"+window.location.host+"/i3geo/mobile/qrcode.htm' target=blank >Qrcode mobile</a></b>"}],"p2":[{pt:"Filtro de cores",en:"Color filter",es:"Filtro de colores"}],"p3":[{pt:"Legenda",en:"Legend",es:"Leyenda"}],"p4":[{pt:"Escala",en:"Scale",es:"Escala"}],"p5":[{pt:"Tamanho",en:"Size",es:"Tama&ntilde;o"}],"p6":[{pt:"Ativa/desativa entorno",en:"Enable/disable environment",es:"Activar/desactivar entorno"}],"p7":[{pt:"Ativa/desativa logo",en:"Enable/disable logo",es:"Activar/desactivar logo"}],"p8":[{pt:"Cor da sele&ccedil;&atilde;o",en:"Selection color",es:"Color de la selecci&oacute;n"}],"p9":[{pt:"Cor do fundo",en:"Background color",es:"Color de fondo"}],"p10":[{pt:"Grade de coordenadas",en:"Coordinate grid",es:"Cuadr&iacute;cula de coordenadas"}],"p11":[{pt:"Template",en:"Template",es:"Plantilla"}],"p12":[{pt:"Temporizador",en:"Timer",es:"Temporizador"}],"p13":[{pt:"Propriedades",en:"Properties",es:"Propiedades"}],"p14":[{pt:"Aplicar",en:"Apply",es:"Aplicar"}],"p15":[{pt:"Formato da imagem do mapa",en:"Map image format",es:"Formato de la imagen del mapa"}],"p16":[{pt:"Fundo",en:"Basemap",es:"Mapa base"}],"p17":[{pt:"Imprime legenda",en:"Print legend",es:"Imprimir la leyenda"}],"p18":[{pt:"N&atilde;o imprime a legenda",en:"Do not print legend",es:"No imprimir la leyenda"}],"p19":[{pt:"Ativa ou desativa a legenda de um tema na op&ccedil;&atilde;o de impress&atilde;o do mapa",en:"Enable or disable the legend of a theme in the map print option",es:"Activa o desactiva la leyenda de un tema en la opci&oacute;n de impresi&oacute;n del mapa"}],"p20":[{pt:"Tela remota",en:"Remote screen",es:"Pantalla remota"}],"p21":[{pt:"Anima&ccedil;&atilde;o",en:"Animation",es:"Animaci&oacute;n"}],"s1":[{pt:"Ajuda",en:"Help",es:"Ayuda"}],"s2":[{pt:"An&aacute;lise",en:"Analysis",es:"An&aacute;lisis"}],"s3":[{pt:"Janelas",en:"Windows",es:"Ventanas"}],"s4":[{pt:"Arquivo",en:"File",es:"Archivo"}],"s5":[{pt:"Propriedades",en:"Properties",es:"Propiedades"}],"u1":[{pt:"Sobre o i3Geo",en:"About i3Geo",es:"Acerca de i3Geo"}],"u2":[{pt:"Doc. dos c&oacute;digos",en:"Doc. of codes",es:"Doc. de los c&oacute;digos"}],"u3":[{pt:"WikiBook",en:"WikiBook",es:"WikiBook"}],"u4":[{pt:"Tutoriais",en:"Tutorials",es:"Tutoriales"}],"u4a":[{pt:"Manual do usu&aacute;rio",en:"User manual",es:"Manual de usuario"}],"u5":[{pt:"Blog",en:"Blog",es:"Blog"}],"u5a":[{pt:"Software p&uacute;blico",en:"Public software",es:"Software p&uacute;blico"}],"u5b":[{pt:"Lista de fun&ccedil;&otilde;es",en:"Function lists",es:"Lista de funciones"}],"u5c":[{pt:"Redes sociais",en:"Social networks",es:"Redes sociales"}],"u6":[{pt:"Geometrias",en:"Geometries",es:"Geometr&iacute;as"}],"u7":[{pt:"Grade de pol&iacute;gonos",en:"Polygon grid",es:"Cuadr&iacute;cula de pol&iacute;gonos"}],"u8":[{pt:"Grade de pontos",en:"Point grid",es:"Cuadr&iacute;cula de puntos"}],"u9":[{pt:"Grade de hex&aacute;gonos",en:"Grid of Hexagons",es:"Cuadr&iacute;cula de hex&aacute;gonos"}],"u10":[{pt:"Entorno(Buffer)",en:"Buffer",es:"&Aacute;rea de influencia (Buffer)"}],"u11":[{pt:"Centr&oacute;ide",en:"Centroid",es:"Centroide"}],"u11a":[{pt:"Dist&acirc;ncia entre pontos",en:"Distance between points",es:"Distancia entre puntos"}],"u12":[{pt:"N pontos em poligono",en:"N points in polygon",es:"N puntos en pol&iacute;gono"}],"u13":[{pt:"Ponto em poligono/raster",en:"Point in polygon/raster",es:"Punto en pol&iacute;gono/raster"}],"u14":[{pt:"Distribui&ccedil;&atilde;o de pontos",en:"Point distribution",es:"Distribuci&oacute;n de puntos"}],"u15":[{pt:"Barras de ferramentas",en:"Toolbars",es:"Barras de herramientas"}],"u15a":[{pt:"Caixa de ferramentas",en:"Tool box",es:"Caja de herramientas"}],"u16":[{pt:"Janela de mensagens",en:"Message window",es:"Ventana de mensajes"}],"u17":[{pt:"Salvar mapa",en:"Save map",es:"Guardar el mapa"}],"u18":[{pt:"Carregar mapa",en:"Load map",es:"Cargar mapa"}],"u19":[{pt:"Pegar imagens",en:"Paste images",es:"Pegar im&aacute;genes"}],"u20":[{pt:"Converter em WMS e WMC",en:"Convert to WMS and WMC",es:"Convertir a WMS y WMC"}],"u20a":[{pt:"Converter em KML",en:"Convert to KML",es:"Convertir a KML"}],"u21":[{pt:"Gerador de links",en:"Link generator",es:"Generador de enlaces"}],"u22":[{pt:"Grade",en:"Grid",es:"Cuadr&iacute;cula"}],"u23":[{pt:"Ponto",en:"Point",es:"Punto"}],"u24":[{pt:"Pol&iacute;gono",en:"Polygon",es:"Pol&iacute;gono"}],"u25":[{pt:"Dissolve",en:"Dissolve",es:"Disolver"}],"u26":[{pt:"Agrupa",en:"Group",es:"Agrupar"}],"u27":[{pt:"Outros",en:"Others",es:"Otros"}],"u28":[{pt:"Centro m&eacute;dio",en:"Middle center",es:"Centro medio"}],"u29":[{pt:"Editor vetorial",en:"Vector editor",es:"Editor vectorial"}],"t1":[{pt:"Camadas",en:"Layers",es:"Capas"}],"t2":[{pt:"Arraste o tema aqui ou clique para excluir",en:"Drag the theme here or click to remove",es:"Arrastre el tema aqu&iacute; o haga clic para excluir"}],"t2a":[{pt:"Filtra a lista de camadas",en:"Filter the layer list",es:"Filtra la lista de capas"}],"t2b":[{pt:"Abre a legenda do mapa",en:"Open the map legend",es:"Despliega la leyenda del mapa"}],"t3":[{pt:"Clique para ligar ou desligar esse tema, mostrando-o ou n&atilde;o no mapa. Ap&oacute;s alterar o estado do tema, aguarde alguns instantes para o mapa ser redesenhado, ou clique no bot&atilde;o aplicar que ser&aacute; mostrado.",en:"Click to turn this theme off or on, showing it or not on the map. After changing the status of the theme, wait a few moments so that the map updates, or click the Apply button that will be displayed.",es:"Haga clic para encender o apagar este tema y mostrarlo o no en el mapa. Despu&eacute;s de cambiar el estado del tema, espere algunos instantes para que el mapa se actualice o haga clic en el bot&oacute;n aplicar que aparecer&aacute;."}],"t3a":[{pt:"Ligar todos os temas",en:"Turn on all themes",es:"Encender todos los temas"}],"t3b":[{pt:"Desligar todos os temas",en:"Turn off all themes",es:"Apagar todos los temas"}],"t4":[{pt:"Limpa sele&ccedil;&atilde;o",en:"Clear selection",es:"Limpia la selecci&oacute;n"}],"t4a":[{pt:"Zoom para a sele&ccedil;&atilde;o",en:"Zoom to selection",es:"Zoom a la selecci&oacute;n"}],"t5":[{pt:"Limpa sele&ccedil;&atilde;o existente nesse tema",en:"Clear an existing selection in this theme",es:"Limpia la selecci&oacute;n existente en este tema"}],"t6":[{pt:"Clique para fazer o download desse tema no formato shapefile",en:"Click to download this theme in shapefile format",es:"Haga clic para descargar este tema en formato shapefile"}],"t7":[{pt:"clique e arraste",en:"Click and drag",es:"Haga clic y arrastre"}],"t7a":[{pt:"Clique e arraste para mudar a ordem. Arraste e solte na lixeira para remover. Aguarde para ver a legenda.",en:"Click and drag to change the order. Drag and drop to the trash to remove. Wait to see the legend.",es:"Haga clic y arrastre para cambiar el orden. Arrastre y suelte en la papelera para remover. Aguarde para ver la leyenda."}],"t8":[{pt:"arraste para mudar a ordem",en:"drag to change the order",es:"arrastre para cambiar el orden"}],"t9":[{pt:"Compat&iacute;vel com a escala",en:"Compatible with the scale",es:"Compatible con la escala"}],"t10":[{pt:"Incompat&iacute;vel com a escala",en:"Incompatible with the scale",es:"Incompatible con la escala"}],"t11":[{pt:"Escala n&atilde;o conhecida",en:"Unknown scale",es:"Escala no conocida"}],"t12":[{pt:"Excluir",en:"Exclude",es:"Excluir"}],"t12a":[{pt:"Clique para excluir esse tema do mapa.",en:"Click to exclude this theme from the map.",es:"Haga clic para excluir este tema del mapa."}],"t13":[{pt:"Sobe",en:"Up",es:"Subir"}],"t14":[{pt:"Clique para subir esse tema na ordem de desenho",en:"Click to move up the theme in drawing order",es:"Haga clic para subir y cambiar el orden de dibujo de este tema"}],"t15":[{pt:"Desce",en:"Down",es:"Bajar"}],"t16":[{pt:"Clique para descer esse tema na ordem de desenho",en:"Click to move down the theme in drawing order",es:"Haga clic para bajar y cambiar el orden de dibujo de este tema"}],"t17":[{pt:"Zoom para o tema",en:"Zoom to theme",es:"Zoom al tema"}],"t18":[{pt:"Clique para ajustar o mapa de forma a mostrar todo o tema",en:"Click to show the whole theme by adjusting the map",es:"Haga clic para ajustar el mapa de manera de poder ver todo el tema"}],"t18a":[{pt:"Op&ccedil;&otilde;es e propriedades",en:"Options and properties",es:"Opciones y propiedades"}],"t18b":[{pt:"Legenda",en:"Legend",es:"Leyenda"}],"t19":[{pt:"Altera a transpar&ecirc;ncia do tema, possibilitando que as camadas inferiores possam ser vistas.",en:"Change layer transparency to enable visibility of bottom layers.",es:"Altera la transparencia del tema haciendo posible que las capas inferiores se puedan ver."}],"t20":[{pt:"Opacidade",en:"Opacity",es:"Opacidad"}],"t22":[{pt:"Localize elementos no tema com base em seus atributos descritivos.",en:"Search for elements on the theme based on their descriptive attributes.",es:"Ubique elementos en el tema en base a sus atributos descriptivos."}],"t23":[{pt:"Procurar",en:"Search",es:"Buscar"}],"t24":[{pt:"Crie uma nova camada no mapa para apresentar textos descritivos sobre esse tema, tendo como base a tabela de atributos.",en:"Create a new layer on the map based on the table of attributes to display descriptive texts about this theme.",es:"Crear una nueva capa en el mapa para presentar textos descriptivos sobre este tema, teniendo como base la tabla de atributos."}],"t25":[{pt:"Etiquetas baseadas em atributos",en:"Labels based on attributes",es:"Etiquetas basadas en atributos"}],"t26":[{pt:"Defina as etiquetas que ser&atilde;o mostradas quando o mouse &eacute; estacionado sobre um elemento desse tema.",en:"Define labels that will be shown when the mouse is over a feature of this theme.",es:"Defina las etiquetas que se mostrar&aacute;n cuando el rat&oacute;n se detenga sobre un elemento de este tema."}],"t27":[{pt:"Ativar etiquetas",en:"Activate labels",es:"Activar etiquetas"}],"t28":[{pt:"Insira um filtro nesse tema para mostrar apenas determinadas informa&ccedil;&otilde;es, com base na tabela de atributos.",en:"Insert a filter in this theme based on the table of attributes to show only specific information.",es:"Inserte un filtro en este tema para mostrar solo determinadas informaciones, con base en la tabla de atributos."}],"t29":[{pt:"Filtrar",en:"Filter",es:"Filtrar"}],"t30":[{pt:"Veja a tabela de atributos relacionada a esse tema.",en:"See the table of attributes related to this theme.",es:"Vea la tabla de atributos relacionada con este tema."}],"t31":[{pt:"Tabela com os dados",en:"Table with data",es:"Tabla con los datos"}],"t32":[{pt:"Abre o editor de legenda, permitindo a altera&ccedil;&atilde;o da forma de representa&ccedil;&atilde;o desse tema.",en:"Open the legend editor to change the way this theme is rendered.",es:"Abre el editor de leyenda para modificar la forma de representaci&oacute;n de este tema."}],"t33":[{pt:"Editar legenda",en:"Edit legend",es:"Editar leyenda"}],"t34":[{pt:"Mostra os dados desse tema em uma janela que acompanha o mouse.",en:"Show the data of this theme in a window that tracks the mouse.",es:"Muestra los datos de este tema en una ventana que acompa&ntilde;a el rat&oacute;n."}],"t35":[{pt:"Mostra em janela",en:"Show in window",es:"Mostrar en la ventana"}],"t36":[{pt:"tema vis&iacute;vel apenas em determinadas escalas",en:"theme visible only at certain scales",es:"el tema es visible solo en ciertas escalas"}],"t37":[{pt:"Gr&aacute;fico",en:"Chart",es:"Gr&aacute;fico"}],"t37a":[{pt:"Tema com gr&aacute;ficos",en:"Theme with charts",es:"Tema con gr&aacute;ficos"}],"t37b":[{pt:"Gr&aacute;fico interativo",en:"Interactive chart",es:"Gr&aacute;fico interactivo"}],"t38":[{pt:"Exporta a legenda para o padr&atilde;o SLD.",en:"Export the legend to SLD schema.",es:"Exporta la leyenda para el est&aacute;ndar SLD."}],"t39":[{pt:"Exportar SLD",en:"Export SLD",es:"Exportar SLD"}],"t40":[{pt:"Abre a ferramenta que permite alterar o SQL de acesso aos dados",en:"Open the tool to change the SQL to access data",es:"Abre la herramienta que permite cambiar el SQL de acceso a los datos"}],"t41":[{pt:"Editar SQL",en:"Edit SQL",es:"Editar SQL"}],"t42":[{pt:"Efeito cortina",en:"Curtain efect",es:"Efecto Cortina"}],"t43":[{pt:"Aplicar SLD",en:"Apply SLD",es:"Aplicar SLD"}],"t44":[{pt:"Salvar mapfile",en:"Save mapfile",es:"Guardar mapfile"}],"t45":[{pt:"Comentar",en:"Comment",es:"Comentar"}],"t46":[{pt:"Mais populares",en:"Most popular",es:"M&aacute;s populares"}],"t48":[{pt:"Temporizador",en:"Timer",es:"Temporizador"}],"t49":[{pt:"Mapa tem&aacute;tico 3D",en:"3D tematic map",es:"Mapa tem&aacute;tico 3D"}],"a1":[{pt:"Procurar tema:",en:"Search theme:",es:"Buscar tema:"}],"a2":[{pt:"Upload de shape file",en:"Upload shapefile",es:"Subir shapefile"}],"a2b":[{pt:"Upload de DBF ou CSV",en:"Upload DBF or CSV",es:"Subir DBF o CSV"}],"a3":[{pt:"Download de dados",en:"Data downloading",es:"Descarga de datos"}],"a3a":[{pt:"Importar Web Map Context",en:"Import Web Map Context",es:"Importar Web Map Context"}],"a4":[{pt:"Conectar com servidor WMS",en:"Connect to WMS server",es:"Conectar al servidor WMS"}],"a4b":[{pt:"Conectar com servidor WMS-T",en:"Connect to WMS-T server",es:"Conectar al servidor WMS-T"}],"a5":[{pt:"Conectar com GeoRss",en:"Connect to GeoRss",es:"Conectar con GeoRss"}],"a5a":[{pt:"Nuvem de tags",en:"Tag cloud",es:"Nube de etiquetas"}],"a6":[{pt:"Acesso aos arquivos do servidor",en:"Access to server files",es:"Acceso a los archivos del servidor"}],"a7":[{pt:"Temas",en:"Theme",es:"Temas"}],"a8":[{pt:"Clique no box ao lado do tema para ligar ou desligar, mostrando-o ou n&atilde;o no mapa. Ap&oacute;s alterar o estado do tema, aguarde alguns instantes para o mapa ser redesenhado, ou clique no bot&atilde;o aplicar que ser&aacute; mostrado.",en:"Click the box next to the theme to turn it on or off, showing it or not on the map. After changing the status of the theme, wait a few moments so that the map updates, or click the Apply button that will be displayed.",es:"Haga clic en el cuadro ubicado al lado del tema para encender o apagarlo y mostralo o no en el mapa. Despu&eacute;s de cambiar el estado del tema, espere algunos instantes para que el mapa se actualice o haga clic en el bot&oacute;n aplicar que aparecer&aacute;."}],"a9":[{pt:"Fonte",en:"Font",es:"Fuente"}],"a10":[{pt:"c&oacute;digo:",en:"code",es:"c&oacute;digo"}],"a11":[{pt:"Sistemas",en:"Systems",es:"Sistemas"}],"a12":[{pt:"Abrir sistema",en:"Open system",es:"Abrir sistema"}],"a13":[{pt:"Abrir no Google Earth",en:"Open with Google Earth",es:"Abrir en Google Earth"}],"a14":[{pt:"Upload SHP, CSV...",en:"Upload SHP, CSV...",es:"Subir SHP, CSV..."}],"a15":[{pt:"Conex&otilde;es",en:"Conections",es:"Conexiones"}],"a16":[{pt:"Servi&ccedil;os",en:"Services",es:"Servicios"}],"g1":[{pt:"Temas",en:"Themes",es:"Temas"}],"g1a":[{pt:"Cat&aacute;logo",en:"Catalog",es:"Cat&aacute;logo"}],"g2":[{pt:"Adiciona",en:"Add",es:"Agregar"}],"g3":[{pt:"Legenda",en:"Legend",es:"Leyenda"}],"g4":[{pt:"Mapas",en:"Maps",es:"Mapas"}],"g4a":[{pt:"Mapa",en:"Map",es:"Mapa"}],"o1":[{pt:"Aguarde...",en:"Wait...",es:"Espere..."}],"o2":[{pt:"Busca r&aacute;pida",en:"Quick search",es:"B&uacute;squeda r&aacute;pida"}],"o3":[{pt:"Lendo imagem...",en:"Reading image...",es:"Leyendo imagen..."}],"o4":[{pt:"Aguarde...abrindo lente",en:"Wait...Opening magnifying glass",es:"Espere...abriendo lupa"}],"o5":[{pt:"Aguarde...iniciando",en:"Wait...initializing",es:"Espere...iniciando"}],"o6":[{pt:"din&acirc;mico",en:"Dynamic",es:"Din&aacute;mico"}],"d1":[{pt:"Digite as coordenadas de um ponto (X=longitude e Y=latitude) para localizar-lo no mapa. no mapa. O centro do mapa ser&aacute; deslocado para o ponto digitado.",en:"Enter the coordinates of a point (X=longitude and Y=latitude) to localize it on the map. The map center will move to this point.",es:"Digite las coordenadas de un punto (X=longitud e Y=latitud) para ubicarlas en el mapa. El centro del mapa se desplazar&aacute; al punto introducido."}],"d2":[{pt:"Altera a escala do mapa ajustando-a para mostrar a mesma abrang&ecirc;ncia geogr&aacute;fica da inicializa&ccedil;&atilde;o.",en:"Change the map scale to show the initial geographical extent.",es:"Modifica la escala del mapa ajust&aacute;ndola para mostrar la misma &aacute;rea geogr&aacute;fica inicial."}],"d2t":[{pt:"Enquadramento inicial",en:"Initial extent",es:"Extensi&oacute;n inicial"}],"d3":[{pt:"Amplia o mapa - desloca o ponto clicado para centro da tela ou amplia a regi&atilde;o indicada por um ret&acirc;ngulo. Ap&oacute;s ativada, clique e arraste o mouse sobre o mapa na &aacute;rea de zoom desejada.",en:"It enlarges the map - places the clicked point on the center of the screen or enlarge the map on a region indicated by a rectangle. Once activated, click and drag the mouse over the map into the desired area.",es:"Ampl&iacute;a el mapa - coloca el punto donde se hizo clic en el centro de la pantalla o ampl&iacute;a a la regi&oacute;n indicada con un rect&aacute;ngulo. Despu&eacute;s de activarla, haga clic y arrastre el rat&oacute;n sobre el mapa en el &aacute;rea de zoom deseada."}],"d3t":[{pt:"clique e arraste para ampliar",en:"click and drag to enlarge",es:"Haga click y arraste para ampliar"}],"d4":[{pt:"Desloca a regi&atilde;o vis&iacute;vel no mapa. Ap&oacute;s ativada, clique e arraste o mouse sobre o mapa para deslocar a regi&atilde;o vis&iacute;vel.",en:"It moves the visible region on the map. After being activated, click and drag the mouse over the map to move the visible region.",es:"Desplaza la regi&oacute;n visible en el mapa. Una vez activada, haga clic y arrastre el rat&oacute;n sobre el mapa para desplazar la zona visible."}],"d4t":[{pt:"clique e arraste para deslocar",en:"click and drag to move",es:"haga click y arraste para mover"}],"d5":[{pt:"Amplia o mapa tendo como refer&ecirc;ncia o centro atual.",en:"Enlarge the map based on the current center.",es:"Ampl&iacute;a el mapa teniendo como referencia el centro actual."}],"d5t":[{pt:"aproximar",en:"zoom in",es:"acercar"}],"d6":[{pt:"Reduz o mapa tendo como refer&ecircncia o centro atual.",en:"Reduce the map based on the current center.",es:"Reduce el mapa teniendo como referencia el centro actual"}],"d6t":[{pt:"afastar",en:"zoom out",es:"alejar",it:"afastar"}],"d7":[{pt:"Mostra informa&ccedil;&otilde;es sobre um ponto no mapa. Ap&oacute;s ativada, clique sobre o mapa.",en:"It displays information about a point on the map. After being activated, click on the map.",es:"Muestra informaci&oacute;n sobre un punto en el mapa. Despu&eacute;s de activarla haga clic sobre el mapa."}],"d7t":[{pt:"Info",en:"Info",es:"Info"}],"d7a":[{pt:"Mostra informa&ccedil;&otilde;es resumidas sobre um ponto clicado no mapa. N&atilde;o &eacute; necess&aacute;rio clicar nesse &iacute;cone para ativar, basta clicar no mapa a qualquer tempo.",en:"Display summary information about a point clicked on the map. It is not necessary to click this icon to activate it, just click on the map at any time.",es:"Muestra informaci&oacute;n resumida de un punto sobre el cual se ha hecho clic en el mapa. No es necesario hacer clic en ese icono para activarlo, simplemente haga clic en el mapa en cualquier momento."}],"d7at":[{pt:"etiqueta",en:"label",es:"etiqueta"}],"d8":[{pt:"Mostra a extens&atilde;o geogr&aacute;fica atual em coordenadas geogr&aacute;ficas",en:"Show the current extent in geographic coordinates",es:"Muestra la extensi&oacute;n geogr&aacute;fica actual en coordenadas geogr&aacute;ficas"}],"d8t":[{pt:"Extens&atilde;o atual",en:"Current extent",es:"Extensi&oacute; actual"}],"d9":[{pt:"Abre/fecha o mapa de refer&ecirc;ncia",en:"Open/close the overview map",es:"Abre/cierra el mapa de referencia"}],"d9t":[{pt:"Mapa de refer&ecirc;ncia",en:"Overview map",es:"Mapa de referencia"}],"d10":[{pt:"Digite o novo valor de escala e clique no bot&atilde;o aplicar para alterar a escala do mapa",en:"Enter a new scale value and click the apply button to change the map scale",es:"Ingrese el nuevo valor de escala y haga clic en el bot&oacute;n aplicar para modificar la escala del mapa"}],"d11":[{pt:"Busca dados na Wikipedia na abrang&ecirc;ncia atual do mapa. Fa&ccedil;a um zoom no mapa antes de abrir essa op&ccedil;&atilde;o. Regi&ocirc;es muito extensas podem tornar a busca muito demorada",en:"Search for Wikipedia data in the current extent of the map. Zoom on the map before opening this option. Large regions can slow down searching",es:"Busca datos en Wikipedia de la extensi&oacute;n actual del mapa. Haga zoom en el mapa antes de abrir esta opci&oacute;n. Regiones muy extensas pueden hacer que la b&uacute;squeda sea muy lenta"}],"d11t":[{pt:"buscar na Wikip&eacute;dia",en:"search on Wikipedia",es:"buscar en Wikipedia"}],"d12":[{pt:"Imprime o mapa",en:"Print map",es:"Imprime el mapa"}],"d13":[{pt:"Localiza o IP do usu&aacute;rio no mapa",en:"Locate the user's IP on the map",es:"Localiza la IP del usuario en el mapa"}],"d14":[{pt:"Gera arquivo para 3D",en:"Generate a 3D file",es:"Genera archivo para 3D"}],"d15":[{pt:"Abre o Google Maps, mostrando uma imagem de sat&eacute;lite da regi&atilde;o vista no mapa principal",en:"Open Google Maps displaying a satellite image of the region shown on the main map",es:"Abre Google Maps, mostrando una imagen de sat&eacute;lite de la regi&oacute;n presentada en el mapa principal"}],"d15t":[{pt:"Google Maps",en:"Google Maps",es:"Google Maps"}],"d16":[{pt:"Pesquisa documentos na base de dados Scielo (dados preliminares)",en:"Search documents in the Scielo database (preliminary data)",es:"B&uacute;squeda de documentos en la base de datos Scielo (datos preliminares)"}],"d16t":[{pt:"Scielo",en:"Scielo",es:"Scielo"}],"d17":[{pt:"Projeto Confluence. Pontos de intersec&ccedil;&atilde;o de coordenadas observadas em campo",en:"Confluence Project. Intersection points of coordinates observed in field",es:"Proyecto Confluence. Puntos de intersecci&oacute;n de coordenadas observadas en campo"}],"d17t":[{pt:"conflu&ecirc;ncias",en:"confluences",es:"confluencias"}],"d18":[{pt:"Abre lente de amplia&ccedil;&atilde;o",en:"Open magnifying glass",es:"Abrir lupa"}],"d18t":[{pt:"lente",en:"magnifying glass",es:"lupa"}],"d19":[{pt:"Coloca as guias em uma janela m&oacute;vel",en:"Put guides in a moving window",es:"Coloca las gu&iacute;as en una ventana m&oacute;vil"}],"d20":[{pt:"Redesenha o mapa com as configura&ccedil;&ocirc;es iniciais.",en:"Reload the map with the initial settings.",es:"Recarga el mapa con las configuraciones iniciales."}],"d20t":[{pt:"reinicia",en:"restart",es:"reinicia",it:"reinicia"}],"d21":[{pt:"Mede a dist&acirc;ncia entre dois ou mais pontos clicados no mapa (menor dist&acirc;ncia). O c&aacute;lculo de dist&acirc;ncia &eacute; aproximado e sua precis&atilde;o depende da escala do mapa.",en:"Measure the distance between two or more clicked points on the map (shorter distance). The calculation of this distance is rough and its accuracy depends on the map scale.",es:"Mide la distancia entre dos o m&aacute;s puntos marcados en el mapa (menor distancia). El c&aacute;lculo de la distancia es aproximado y su exactitud depende de la escala del mapa."}],"d21t":[{pt:"Dist&acirc;ncia",en:"Distance",es:"Distancia"}],"d21a":[{pt:"Mede a &aacute;rea de um pol&iacute;gono desenhado na tela. O c&aacute;lculo de &aacute;rea &eacute; aproximado e sua precis&atilde;o depende da escala do mapa.",en:"Measure the area of a polygon drawn on the screen. The calculation of this area is rough and its accuracy depends on the map scale.",es:"Mide el &aacute;rea de un pol&iacute;gono dibujado sobre la pantalla. El c&aacute;lculo del &aacute;rea es aproximado y su exactitud depende de la escala del mapa."}],"d21at":[{pt:"&Aacute;rea",en:"Area",es:"&Aacute;rea"}],"d22":[{pt:"Insere pontos no mapa em coordenadas geogr&aacute;ficas. Os pontos inclu&iacute;dos podem ser transformados em linhas ou pol&iacute;gonos. Os pontos s&atilde;o armazenados em um tema tempor&aacute;rio, podendo-se fazer o download do arquivo shapefile.",en:"Insert points on the map in geographical coordinates. The added points can be converted into lines or polygons. The points are stored in a temporary theme and can be downloaded as a shapefile.",es:"Inserte puntos en el mapa en coordenadas geogr&aacute;ficas. Los puntos incluidos pueden ser transformados en l&iacute;neas o pol&iacute;gonos. Los puntos se almacenan en un tema temporal y se pueden descargar como archivo shapefile."}],"d22t":[{pt:"inserir pontos",en:"insert points",es:"insertar puntos"}],"d23":[{pt:"Insere um gr&aacute;fico no ponto clicado conforme os atributos existentes no tema escolhido. O tema deve possuir itens com valores num&eacute;ricos na tabela de atributos.",en:"Insert a chart on the clicked point according to the attributes of the selected theme. The theme must have records with numerical values in the table of attributes.",es:"Inserte un gr&aacute;fico en el punto marcado seg&uacute;n los atributos existentes en el tema seleccionado. El tema debe tener campos con valores num&eacute;ricos en la tabla de atributos."}],"d23t":[{pt:"Clique gr&aacute;fico",en:"Click on the chart",es:"Haga clic en el gr&aacute;fico"}],"d24":[{pt:"Abre as ferramentas para sele&ccedil;&atilde;o de elementos de um tema. Os elementos selecionados podem ser utilizados em outras opera&ccedil;&ocirc;es, como buffer e sele&ccedil;&atilde;o por tema.",en:"Open the tools for selecting features of a theme. The selected features can be used for other operations like buffer or selection by theme.",es:"Abre las herramientas para seleccionar elementos de un tema. Los elementos seleccionados pueden ser utilizados en otras operaciones como &aacute;reas de influencia (buffer) y selecci&oacute;n por tema."}],"d24t":[{pt:"Selecionar",en:"Select",es:"Seleccionar"}],"d25":[{pt:"Insere texto no mapa clicando em um ponto. Utilize essa op&ccedil;&atilde;o para adicionar informa&ccedil;&ocirc;es ao mapa.",en:"Insert a text on the map by clicking on a point. Use this option to add information on the map.",es:"Inserte un texto en el mapa haciendo clic en un punto. Utilice esta opci&oacute;n para agregar informaci&oacute;n en el mapa."}],"d25t":[{pt:"Inserir texto",en:"Insert text",es:"Insertar texto"}],"d26":[{pt:"Escolha o visual para os bot&otilde;es e outras caracter&iacute;sticas visuais do mapa",en:"Choose a button appearance and other visual characteristics of the map",es:"Elija el aspecto para los botones y otras caracter&iacute;sticas visuales del mapa"}],"d27":[{pt:"Interface",en:"Interface",es:"interfaz"}],"d28":[{pt:"Aguarde...gerando os arquivos",en:"Please wait...generating files",es:"Espera...generando los archivos"}],"d29":[{pt:"Esta&ccedil;&otilde;es METAR",en:"METAR stations",es:"Estaciones METAR"}],"d30":[{pt:"Linha do tempo",en:"Timeline",es:"L&iacute;nea del tiempo"}],"d31":[{pt:"N&atilde;o existe nenhuma camada com etiquetas ativas",en:"There is no layer with active labels",es:"No existe ninguna capa con etiquetas activas"}],"d32":[{pt:"Aplicativos",en:"Applications",es:"Aplicaciones"}],"ge1":[{pt:"Navega&ccedil;&atilde;o com o mouse",en:"Navigation with the mouse",es:"Navegaci&oacute;n con el rat&oacute;n"}],"ge2":[{pt:"Barra de status",en:"Status bar",es:"Barra de estado"}],"ge3":[{pt:"Mapa de refer&ecirc;ncia",en:"Overview map",es:"Mapa de referencia"}],"ge4":[{pt:"Escala e legenda",en:"Scale and legend",es:"Escala y leyenda"}],"ge5":[{pt:"Atmosfera",en:"Atmosphere",es:"Atm&oacute;sfera"}],"ge6":[{pt:"Grade de coordenadas",en:"Coordinates grid",es:"Cuadr&iacute;culas de coordenadas"}],"ge7":[{pt:"Luz do sol",en:"Sun light",es:"Luz del sol"}],"ge8":[{pt:"Limites pol&iacute;ticos",en:"Political boundaries",es:"L&iacute;mites pol&iacute;ticos"}],"ge9":[{pt:"Constru&ccedil;&otilde;es em 3D",en:"3D buildings ",es:"Construciones en 3D"}],"ge10":[{pt:"Estradas",en:"Roads",es:"Carreteras"}],"ge11":[{pt:"Terreno",en:"Terrain",es:"Terreno"}],"x1":[{pt:"P&aacute;gina principal",en:"Main page",es:"P&aacute;gina principal"}],"x2":[{pt:"Lista de menus",en:"Menu lists",es:"Lista de men&uacute;s"}],"x3":[{pt:"Miniaturas",en:"Thumbnails",es:"Miniaturas"}],"x4":[{pt:"Pesquisa na INDE",en:"Search in INDE",es:"B&uacute;squeda en INDE"}],"x5":[{pt:"Editar subgrupos",en:"Edit subgroups",es:"Editar subgrupos"}],"x6":[{pt:"Editar temas",en:"Edit themes",es:"Editar temas"}],"x7":[{pt:"op&ccedil;&atilde;o vis&iacute;vel apenas para editores",en:"option visible to editors only",es:"opci&oacute;n visible solo para editores"}],"x8":[{pt:"Sistema de administra&ccedil;&atilde;o",en:"Management system",es:"Sistema de administraci&oacute;n"}],"x9":[{pt:"Editar &aacute;rvore",en:"Edit tree",es:"Editar &aacute;rbol"}],"x10":[{pt:"Editar menus do cat&aacute;logo",en:"Edit catalog menus",es:"Editar men&uacute;s del cat&aacute;logo"}],"x11":[{pt:"Abre em uma janela",en:"Open in a window",es:"Abre en una ventana"}],"x13":[{pt:"&Aacute;rvore de camadas n&atilde;o encontrada",en:"Tree layers not found",es:"Arboles de capas no se encuentra"}],"x14":[{pt:"sim",en:"yes",es:"s&iacute;"}],"x15":[{pt:"n&atilde;o",en:"no",es:"no"}],"x16":[{pt:"Valor n&atilde;o definido",en:"Value not defined",es:"Valor no definido"}],"x17":[{pt:"Essa op&ccedil;&atilde;o afeta apenas a impress&atilde;o do mapa",en:"This option only affects map printing",es:"Esta opci&oacute;n solo afecta a la impresi&oacute;n del mapa"}],"x18":[{pt:"Nome n&atilde;o definido",en:"Name not defined",es:"Nombre no definido"}],"x19":[{pt:"Coment&aacute;rios de",en:"Reviews of",es:"Comentarios de"}],"x20":[{pt:"Clique no mapa para desenhar o pol&iacute;gono",en:"Click on the map to draw a polygon",es:"Haga clic en el mapa para dibujar un pol&iacute;gono"}],"x21":[{pt:"Essa opera&ccedil;&atilde;o n&atilde;o funciona nessa interface",en:"This operation does not work on this interface",es:"Esta operaci&oacute;n no funciona en esta interfaz"}],"x22":[{pt:"Op&ccedil;&atilde;o n&atilde;o dispon&iacute;vel",en:"Option not available",es:"Opci&oacute;n no disponible"}],"x23":[{pt:"Dire&ccedil;&atilde;o",en:"Direction",es:"Direcci&oacute;n"}],"x25":[{pt:"M&eacute;todo para calcular dist&acirc;ncias",en:"Method to calculate distances",es:"M&eacute;todo para calcular distancias"}],"x26":[{pt:"Voce quer mesmo encerrar a sessao?",en:"Do you want to logout?",es:"&iquest;Quiere cerrar la sesi&oacute;n?"}],"x27":[{pt:"Usu&aacute;rio",en:"User",es:"Usuario"}],"x28":[{pt:"Senha",en:"Password",es:"Contrase&ntilde;a"}],"x29":[{pt:"Enviar",en:"Submit",es:"Enviar"}],"x30":[{pt:"Ativo",en:"Active",es:"Activo"}],"x31":[{pt:"Erro",en:"Error",es:"Error"}],"x32":[{pt:"Recuperar senha",en:"Recover password",es:"Recuperar contrase&ntilde;a"}],"x33":[{pt:"Escolha um tema da lista",en:"Select a theme from the list",es:"Seleccione un tema de la lista"}],"x34":[{pt:"Lugar",en:"Place",es:"Lugar"}],"x35":[{pt:"Escolha um tipo de busca nas propriedades",en:"Choose a search type in the properties",es:"Elija un tipo de b&uacute;squeda en las propiedades"}],"x36":[{pt:"Digite uma palavra para busca!",en:"Enter search terms!",es:"Introduzca una palabra clave para buscar!"}],"x37":[{pt:"Onde ser&aacute; feita a busca",en:"Where will the search be done?",es:"&iquest;D&oacute;nde se realizar&aacute; la b&uacute;squeda?"}],"x38":[{pt:"Servi&ccedil;os de busca externos",en:"External search services",es:"Servicios de b&uacute;squeda externos"}],"x39":[{pt:"Temas existentes no mapa",en:"Existing themes on the map",es:"Temas existentes en el mapa"}],"x40":[{pt:"Apenas os temas especialmente configurados pelo administrador do i3Geo podem receber opera&ccedil;&otilde;es de busca",en:"Only those themes specially configarated by the i3Geo administrator can receive search operations",es:"Solo los temas especialmente configurados por el administrador de i3Geo pueden ser objeto de operaciones de b&uacute;squeda"}],"x41":[{pt:"Nada encontrado nos temas ou nenhum tema permite busca",en:"Nothing found in the themes or no theme allows searching",es:"Nada encontrado en los temas o ning&uacute;n tema permite b&uacute;squedas"}],"x42":[{pt:"Nada encontrado em ",en:"Nothing found at ",es:"No se encontr&oacute; nada en "}],"x43":[{pt:"Erro ao acessar o servi&ccedil;o",en:"Error accessing the service",es:"Error al acceder al servicio"}],"x44":[{pt:"Nuvem Flash",en:"Cloud Flash",es:"Nube Flash"}],"x45":[{pt:"Diret&oacute;rios",en:"Directories",es:"Directorios"}],"x46":[{pt:"Conex&atilde;o WMS-T",en:"WMS-T connection",es:"Conexi&oacute;n WMS-T"}],"x47":[{pt:"Conex&atilde;o GeoRSS",en:"GeoRSS connection",es:"Conexi&oacute;n GeoRSS"}],"x48":[{pt:"Rota",en:"Route",es:"Ruta"}],"x49":[{pt:"Coordenadas aproximadas",en:"Approximate coordinates",es:"Coordenadas aproximadas"}],"x50":[{pt:"Feche para parar",en:"Close to stop",es:"Cierre para parar"}],"x51":[{pt:"Sele&ccedil;&atilde;o",en:"Selection",es:"Selecci&oacute;n"}],"x52":[{pt:"Alterar senha",en:"Change password",es:"Cambiar contrase&ntilde;a"}],"x53":[{pt:"Upload de WMC",en:"WMC upload",es:"Subir WMC"}],"x54":[{pt:"Perfil",en:"Profile",es:"Perfil"}],"x55":[{pt:"Salva o tema",en:"Save theme",es:"Guarda el tema"}],"x56":[{pt:"Topon&iacute;mia",en:"Toponymy",es:"Toponimia"}],"x57":[{pt:"Cartogramas estat&iacute;sticos",en:"Statistical cartograms",es:"Cartogramas estad&iacute;sticos"}],"x58":[{pt:"Continua",en:"Continue",es:"Seguir"}],"x59":[{pt:"Localiza",en:"Locate",es:"Localiza"}],"x60":[{pt:"Cartogramas",en:"Cartograms",es:"Cartogramas"}],"x61":[{pt:"Filtra limite",en:"Filter limit",es:"Filtra l&iacute;mite"}],"x62":[{pt:"Remover",en:"Remove",es:"Eliminar"}],"x63":[{pt:"Para salvar as configura&ccedil;&otilde;es de uma camada,<br> utilize a op&ccedil;&atilde;o existente na &aacute;rvore de camadas no n&oacute; correspondente ao tema (basta expandir o tema para visualizar as op&ccedil;&otilde;es)<br><br>",en:"To save a layer setting,<br> use the option available in the layer tree corresponding to the theme node (just expand the theme to view the options)<br><br>",es:"Para guardar la configuraci&oacute;n de una capa,<br> utilice la opci&oacute;n disponible en la &aacute;rbol de capas en el nodo correspondiente al tema (basta con expandir el tema para ver las opciones)<br><br>"}],"x64a":[{pt:"Congela a vis&atilde;o atual",en:"Freeze the current view",es:"Congela la vista actual"}],"x64":[{pt:"Item",en:"Item",es:"Item"}],"x65":[{pt:"Buscando &iacute;tens...",en:"Searching fields...",es:"Buscando campos..."}],"x66":[{pt:"Ocorreu um erro",en:"There was an error",es:"Ocurri&oacute; un error"}],"x67":[{pt:"Comunidade i3Geo",en:"i3Geo community",es:"Comunidad i3Geo"}],"x68":[{pt:"Vers&atilde;o",en:"Version",es:"Versi&oacute;"}],"zoomliShift":[{pt:"Pressione a tecla SHIFT junto com o bot&atilde;o esquerdo do mouse e arraste para definir a &aacute;rea que ser&aacute; aproximada",en:"Press the SHIFT key along with the left mouse button and drag to define the area you want to zoom",es:"Presione la tecla MAY&Uacute;S junto con el bot&oacute;n izquierdo del rat&oacute;n y arrastre para definir el &aacute;rea en la que desea hacer zoom"}],"zoomliCtrl":[{pt:"Pressione a tecla CTRL junto com o bot&atilde;o esquerdo do mouse e arraste para definir a &aacute;rea que ser&aacute; aproximada",en:"Press the CTRL key along with the left mouse button and drag to define the area you want to zoom",es:"Presione la tecla CTRL junto con el bot&oacute;n izquierdo del rat&oacute;n y arrastre para definir el &aacute;rea en la que desea hacer zoom"}],"x70":[{pt:"Utilize os dedos em um movimento de pin&ccedil;a para definir a &aacute;rea que ser&aacute; aproximada ou afastada",en:"Use the pinch-zoom gesture to define the area that will be zoomed in or out",es:"Utilice los gestos de pinzas de los dedos para definir el &aacute;rea que ser&aacute; acercada o alejada"}],"x71":[{pt:"Aplicativos estat&iacute;sticos cadastrados",en:"Registered statistical applications",es:"Aplicaciones estad&iacute;sticas registradas"}],"x72":[{pt:"Lista de mapas cadastrados",en:"List of registered maps",es:"Lista de los mapas registrados"}],"x73":[{pt:"Redirecionar para a vers&atilde;o adaptada para dispositivos m&oacute;veis?",en:"Redirect to mobile version?",es:"Redireccionar a una versi&oacute;n adaptada a dispositivos m&oacute;viles?"}],"x74":[{pt:"Fecha",en:"Close",es:"Cierra"}],"x75":[{pt:"Cancela",en:"Cancel",es:"Cancela"}],"x76":[{pt:"O tema j&aacute; existe no mapa.",en:"This theme already exists on theme map.",es:"El tema ya existe en el mapa."}],"x77":[{pt:"Nome do novo marcador",en:"New bookmark name",es:"Nombre de marcador nuevo"}],"x78":[{pt:"Copie os marcadores e cole em um editor para guard&aacute;-los",en:"Copy bookmarks and paste in an editor to save them",es:"Copiar los marcadores y pegarlos en un editor para guardarlos"}],"x79":[{pt:"Marcadores",en:"Bookmarks",es:"Marcadores"}],"x80":[{pt:"Exportar",en:"Export",es:"Exportar"}],"x81":[{pt:"Importar",en:"Import",es:"Importar"}],"x82":[{pt:"Marcar regi&atilde;o",en:"Mark region",es:"Marcar regi&oacute;n"}],"x83":[{pt:"Cole os marcadores para import&aacute;-los",en:"Paste the bookmarks to import",es:"Pegue los marcadores para importarlos"}],"x84":[{pt:"Exportar SHP",en:"Export SHP",es:"Exportar SHP"}],"x85":[{pt:"Visualizador de WMS da INDE-Br",en:"INDE-Br WMS viewer",es:"Visualizador de WMS de INDE-Br"}],"x86":[{pt:"Prefer&ecirc;ncias",en:"Preferences",es:"Preferencias"}],"x87":[{pt:"Limites e localidades",en:"Boundaries and localities",es:"L&iacute;mites y localidades"}],"x88":[{pt:"Prefer&ecirc;ncias",en:"Preferences",es:"Preferencias"}],"x89":[{pt:"Editar cadastro",en:"Edit register",es:"Editar registro"}],"x90":[{pt:"Mapas cadastrados",en:"Registered maps",es:"Mapas registrados"}],"x91":[{pt:"Feche para parar. Desligue o tema para ver o efeito",en:"Close to stop. Turn off the theme to see the effect",es:"Cierre para parar. Apague el tema para ver el efecto"}],"x92":[{pt:"Escolha uma camada",en:"Select a layer",es:"Seleccione una capa"}],"x93":[{pt:"Localiza&ccedil;&atilde;o do usu&aacute;rio",en:"User location",es:"Ubicaci&oacute;n del usuario"}],"x94":[{pt:"Remove as figuras da tela",en:"Remove pictures from the screen",es:"Quita las figuras de la pantalla"}],"x95":[{pt:"trecho",en:"stretch",es:"tramo"}],"x96":[{pt:"atual",en:"current",es:"actual"}],"x97":[{pt:"total",en:"total",es:"total"}],"x98":[{pt:"per&iacute;metro",en:"perimeter",es:"per&iacute;metro"}],"x99":[{pt:"C&aacute;lculo n&atilde;o pode ser realizado. Falta carregar a API de geometria do GM",en:"The calculation cannot be performed. It is necessary to upload the GM geometry API",es:"El c&aacute;lculo no puede ser realizado. Falta cargar la API de geometr&iacute;a de GM"}],"x101":[{pt:"C&oacute;pia",en:"Copy",es:"Copia"}],"x102":[{pt:"Mapa de calor",en:"Heatmap",es:"Mapa de calor"}],"x103":[{pt:"Links para abrir o mapa",en:"Links to open the map",es:"Links para abrir el mapa "}],"x104":[{pt:"Mapa de agrupamentos",en:"Cluster map",es:"Mapa de agrupaci&oacute;n"}],"x105":[{pt:"Navega&ccedil;&atilde;o",en:"Browsing",es:"Navegaci&oacute;n"}],"mais":[{pt:"Mais...",en:"More...",es:"M&aacute;s..."}],"uploadArquivoGeo":[{pt:"Upload de arquivo geo",en:"Geo file upload",es:"Carga del archivo geo"}],"conexaoServicoGeo":[{pt:"Conex&atilde;o com servi&ccedil;os geo",en:"Connection to geo services",es:"Conexi&oacute;n con servicios geo"}],"saikuAba":[{pt:"SAIKU - OLAP (abrir em nova aba)",en:"SAIKU - OLAP (open in a new tab)",es:"SAIKU - OLAP (abrir en una nueva pesta&ntilde;a)"}],"saikuMapa":[{pt:"SAIKU - OLAP (abrir em janela interna)",en:"SAIKU - OLAP (open in an inner window)",es:"SAIKU - OLAP (abrir en una ventana interna)"}],"refMapaAtual":[{pt:"Mapa atual",en:"Current map",es:"Mapa actual"}],"refMapaDinamico":[{pt:"Mapa fixo",en:"WMS",es:"WMS"}],"naoPermitido":[{pt:"Operacao nao autorizada para esse usuario",en:"This user does not have permission to perform this action",es:"Operaci&oacute;n no autorizada para este usuario"}],"melhorcaminho":[{pt:"Melhor caminho (raster)",en:"Best way (raster)",es:"Mejor camino (raster)"}],"tolerancia":[{pt:"Toler&acirc;ncia de busca (em pixels)",en:"Search tolerance (in pixels)",es:"Tolerancia de b&uacute;squeda (en pixeles)"}],"naoInstalado":[{pt:"Ferramenta n&atilde;o dispon&iacute;vel nessa instala&ccedil;&atilde;o do i3Geo",en:"Tool not available on this i3Geo installation",es:"Herramienta no disponible en esta instalaci&oacute;n de i3geo"}],"variaEscala":[{pt:"Depend&ecirc;ncia da escala",en:"Scale dependency",es:"Dependencia de escala"}],"mostraTodosLegenda":[{pt:"Mostra tudo",en:"Show all",es:"Muestra todo"}],"mostraSoLegenda":[{pt:"Mostra s&oacute; a legenda",en:"Show legend only",es:"Muestra solo la leyenda"}],"removerDoMapa":[{pt:"Remove a camada do mapa?",en:"Do you want to remove the layer from map?",es:"&iquest;Quiere remover la capa del mapa?"}],"dicaBuscaRapida":[{pt:"Abre uma janela flutuante com op&ccedil;&otilde;es de busca de dados em servi&ccedil;os como o Google Maps ou nas camadas exsitentes no mapa",en:"Open a floating window with data search options on services like Google Maps or on the map layers",es:"Abre una ventana flotante con opciones de b&uacute;squeda de datos en servicios como Google Maps o en las capas del mapa"}],"refresh":[{pt:"Refaz a &aacute;rvore, reconstruindo os &iacute;cones e lista de camadas",en:"Redo the tree by rebuilding the icons and the layer list",es:"Rehacer el &aacute;rbol reconstruyendo los iconos y la lista de capas"}],"lixeira":[{pt:"Clique para ver a lista de camadas em uma janela flutuante com op&ccedil;&atilde;o para remover um ou mais camadas do mapa. Arraste uma camada sobre esse &iacute;cone para remov&ecirc;-la individualmente",en:"Click to see the layer list in a floating window with the option to remove one or more layers from the map. Drag a layer to this icon to remove it individually",es:"Haga clic para ver la lista de capas en una ventana flotante con la opci&oacute;n de eliminar una o m&aacute;s capas del mapa. Arrastre una capa sobre este icono para removerla individualmente"}],"filtraCam":[{pt:"Permite filtrar a lista de camadas mostradas na &aacute;rvore conforme propriedades espec&iacute;ficas de cada uma",en:"It allows you to filter the layer lists shown in the tree according to their specific properties",es:"Permite filtrar la lista de capas mostradas en el &aacute;rbol seg&uacute;n las propiedades espec&iacute;ficas de cada una"}],"legenda":[{pt:"Abre a legenda do mapa em uma janela flutuante",en:"Open the map legend in a floating window",es:"Abre la leyenda del mapa en una ventana flotante "}],"ferramMapa":[{pt:"Mostra a lista de ferramentas que atuam sobre o mapa",en:"It shows a list of tools that perform tasks on the map",es:"Muestra la lista de herramientas que act&uacute;an sobre el mapa"}],"ferramCamadas":[{pt:"Mostra a lista de ferramentas que atuam sobre camadas",en:"It shows a list of tools that perform tasks on the layers",es:"Muestra una lista de herramientas que act&uacute;an sobre las capas"}],"ajudaEditorOlSalva":[{pt:"Para editar os atributos, utilize a ferramenta de identifica&ccedil;&atilde;o. &Eacute; necess&aacute;rio que exista uma coluna com identificadores &uacute;nicos na tabela a ser editada e que essa coluna esteja vis&iacute;vel na ferramenta de identifica&ccedil;&atilde;o.",en:"Use the identification tool to edit the attributes. There must be a column with unique identifiers in the table that will be edited. This column should be visible in the identification tool.",es:"Para editar los atributos utilice la herramienta de identificaci&oacute;n. Es necesario que exista una columna con identificadores &uacute;nicos en la tabla a ser editada y que esa columna sea visible en la herramienta de identificaci&oacute;n."}],"mascara":[{pt:"M&aacute;scara",en:"Mask",es:"M&aacute;scara"}],"result":[{pt:"Resultado",en:"Result",es:"Resultado"}],"tativo":[{pt:"Tema ativo",en:"Active theme ",es:"Tema activo"}],"geosel":[{pt:"geometria(s) selecionada(s) encontrada(s)",en:"selected geometry found",es:"geometr&iacute;a(s) seleccionada(s) encontrada(s)"}],"listar":[{pt:"Listar",en:"Make a list",es:"Hacer una lista"}],"sdados":[{pt:"Salvar dados",en:"Save data",es:"Guardar datos"}],"incorpo":[{pt:"Incorporar ao mapa",en:"Add to map",es:"Agregar al mapa"}],"selum":[{pt:"Selecione uma ou mais geometrias",en:"Select one or more geometries",es:"Seleccione una o m&aacute;s geometr&iacute;as"}],"atrib":[{pt:"Atributos",en:"Attributes",es:"Atributos"}],"reg":[{pt:"Registros",en:"Records",es:"Registros"}],"adic":[{pt:"Adicionando",en:"Adding",es:"Agregando"}],"stema":[{pt:"Salvar no tema",en:"Save the theme",es:"Salvar el tema"}],"seluma":[{pt:"Selecione apenas uma figura",en:"Select one picture only",es:"Seleccione solo una figura"}],"salva":[{pt:"Salva",en:"Save",es:"Salva"}],"canc":[{pt:"Cancela",en:"Cancel",es:"Cancela"}],"dlinha":[{pt:"digitalizar linha",en:"digitalize line",es:"digitalizar l&iacute;nea"}],"dpol":[{pt:"digitalizar poligono",en:"digitalize polygon",es:"digitalizar pol&iacute;gono"}],"dponto":[{pt:"digitalizar ponto",en:"digitalize point",es:"digitalizar punto"}],"dtexto":[{pt:"digitalizar texto",en:"digitalize text",es:"digitalizar texto"}],"cortaf":[{pt:"corta figura",en:"cut picture",es:"cortar figura"}],"modf":[{pt:"modifica figura",en:"modify picture",es:"modificar figura"}],"listag":[{pt:"lista geometrias",en:"list geometries",es:"crear lista de geometr&iacute;as"}],"frente":[{pt:"trazer para frente",en:"send forward",es:"traer al frente"}],"studo":[{pt:"selecionar tudo",en:"select all",es:"seleccionar todo"}],"ustudo":[{pt:"limpar sele&ccedil;&atilde;o",en:"clear selection",es:"limpiar la selecci&oacute;n"}],"excsel":[{pt:"Remove os elementos selecionados",en:"Remove selected features",es:"Remueve los elementos seleccionados"}],"opcoes":[{pt:"Op&ccedil;&otilde;es",en:"Options",es:"Opciones"}],"meneditor1":[{pt:"Para excluir registros do banco de dados utilize a ferramenta de identifica&ccedil;&atilde;o",en:"Use the identification tool to delete records from the database",es:"Para excluir registros de la base de datos utilice la herramienta de identificaci&oacute;n"}],"meneditor2":[{pt:"Nenhum elemento gr&aacute;fico encontrado. Utilize as op&ccedil;&otilde;es de cria&ccedil;&atilde;o de geometrias.",en:"No graphic element found. Use the options to create geometries.",es:"Ning&uacute;n elemento gr&aacute;fico encontrado. Utilice las opciones de creaci&oacute;n de geometr&iacute;a."}],"meneditor3":[{pt:"Voc&ecirc; precisa fazer login para usar a op&ccedil;&atilde;o de salvar no banco de dados",en:"You must be logged in to use the save to database option",es:"Usted debe iniciar sesi&oacute;n para utilizar la opci&oacute;n de guardar en la base de datos"}],"meneditor4":[{pt:"Valores iguais ao original",en:"Values equal to the original ones",es:"Valores iguales al original"}],"meneditor5":[{pt:"&Eacute; necess&aacute;rio ter um c&oacute;digo para poder excluir",en:"It is necessary to have a password to exclude",es:"Es necesario tener una clave para excluir"}],"meneditor6":[{pt:"Ap&oacute;s escolher a medida da vari&aacute;vel, clique no mapa para escolher o limite geogr&aacute;fico.",en:"After choosing the variable measure, click on the map to choose the geographical boundary.",es:"Despu&eacute;s de escoger la medida de la variable, haga clic en el mapa para seleccionar el l&iacute;mite geogr&aacute;fico."}],"opsel":[{pt:"Opera&ccedil;&otilde;es sobre as figuras selecionadas",en:"Operations on the selected pictures",es:"Operaciones sobre las figuras seleccionadas"}],"capturar":[{pt:"Capturar elemento de um tema",en:"Capture a theme feature",es:"Capturar elemento de un tema"}],"salvexc":[{pt:"Salvar/excluir dados",en:"Save/exclude data",es:"Guardar/excluir datos"}],"edatrib":[{pt:"Editar atributos",en:"Edit Attributes",es:"Editar atributos"}],"camedit":[{pt:"Camadas edit&aacute;veis",en:"Editable layers",es:"Capas editables"}],"nenhum":[{pt:"Nenhum",en:"None",es:"Ninguno"}],"tipo":[{pt:"Tipo",en:"Type",es:"Tipo"}],"abreMapa":[{pt:"Abrir o mapa",en:"Open the map",es:"Abrir el mapa "}],"areaAprox":[{pt:"&Aacute;rea aproximada",en:"Approximate area",es:"&Aacute;rea aproximada"}],"distAprox":[{pt:"Dist&acirc;ncia aproximada",en:"Approximate distance",es:"Distancia aproximada"}],"trocaInterface":[{pt:"Troca de interface",en:"Interface change",es:"Cambio de interfaz"}],"wkt2layer":[{pt:"Converte WKT em camada",en:"Convert WKT into layer",es:"Transformar WKT en capa"}],"salvaDadosEditor":[{pt:"Os dados s&oacute; podem ser salvos em temas que permitem edi&ccedil;&atilde;o e que possuem coluna com auto incremento",en:"Data can only be saved in themes that allow edition and have columns with auto-increment",es:"Los datos solo pueden ser guardados en los temas que permiten edici&oacute;n y que poseen columnas con auto incremento"}],"novaaba":[{pt:"Abre em nova aba",en:"Open in a new tab",es:"Abre en una pesta&ntilde;a nueva"}],"novonome":[{pt:"Novo nome",en:"New name",es:"Nombre nuevo"}],"medir":[{pt:"Medir/Calcular",en:"Measure/Calculate",es:"Medir/Calcular"}],"tabela":[{pt:"Tabela",en:"Table",es:"Tabla"}],"ligaDesliga":[{pt:"Liga/Desliga",en:"Turn on/Turn off",es:"Encender/Apagar"}],"naoPublicado":[{pt:"n&atilde;o publicado",en:"not published",es:"no publicado"}],"operacoesMapaTema":[{pt:"Opera&ccedil;&otilde;es sobre o mapa ou tema",en:"Operations on the map or theme",es:"Operaciones sobre el mapa o tema"}],"descMenuAjuda":[{pt:"Documenta&ccedil;&atilde;o, redes sociais, tutoriais...",en:"Documentation, social networks, tutorials...",es:"Documentaci&oacute;n, redes sociales, tutoriales..."}],"descMenuAnalise":[{pt:"Dist&acirc;ncia, &aacute;rea, buffer, gr&aacute;ficos...",en:"Distance, area, buffer, graphics...",es:"Distancia, &aacute;rea, buffer, gr&aacute;ficos..."}],"descArquivos":[{pt:"Salvar e carregar mapfile, lista de mapas...",en:"Save and upload mapfile, map list...",es:"Guardar y cargar mapfile, lista de mapas..."}],"descOperacoesMapaTema":[{pt:"Tabela, legenda, imprimir,  upload, navega&ccedil;&atilde;o...",en:"Table, legend, print, upload, browsing...",es:"Tabla, leyenda, impresi&oacute;n, carga, navegaci&oacute;n..."}],"descOgcWms":[{pt:"Adiciona camada via servi&ccedil;o WMS",en:"Add layer via WMS service",es:"A&ntilde;ade capa a trav&eacute;s de servicio WMS"}],"descLimLoc":[{pt:"Regi&otilde;es cadastradas no sistema de metadados estat&iacute;sticos",en:"Regions registered in the statistical metadata system",es:"Regiones registradas en el sistema de metadatos estad&iacute;sticos"}],"descMeta":[{pt:"Camadas baseadas no sistema de metadados estat&iacute;sticos",en:"Layers based on the statistical metadata system",es:"Capas basadas en el sistema de metadatos estad&iacute;sticos"}],"descMapas":[{pt:"Mapas prontos para uso, com camadas j&aacute; selecionadas",en:"Ready-to-use maps with layers already selected",es:"Mapas listos para su uso con capas seleccionadas"}],"descEstrelas":[{pt:"Lista de camadas classificadas conforme o n&uacute;mero de acessos",en:"List of layers classified according to the number of accesses",es:"Lista de capas clasificadas seg&uacute;n el n&uacute;mero de accesos"}],"descSistemas":[{pt:"Sistemas com op&ccedil;&otilde;es espec&iacute;ficas e que permitem adicionar camadas ao mapa",en:"Systems with specific options that allow you to add layers to the map",es:"Sistemas con opciones espec&iacute;ficas que permiten agregar capas al mapa"}],"descDir":[{pt:"Diret&oacute;rio de arquivos shapefile",en:"Shapefile directory",es:"Directorio de archivos shapefile"}],"localiza":[{pt:"Posi&ccedil;&atilde;o",en:"Position",es:"Posici&oacute;n"}],"volta":[{pt:"volta",en:"back",es:"volver"}],"continua":[{pt:"continua",en:"continue",es:"continuar"}],"avanca":[{pt:"avan&ccedil;a",en:"go ahead",es:"avanzar"}],"tipvazio":[{pt:"N&atilde;o existe nenhuma camada no mapa que permita mostrar etiquetas",en:"There is no layer on the map that allows you to display labels",es:"No existe ninguna capa en el mapa que permita mostrar etiquetas"}],"erroTpl":[{pt:"Erro ao carregar um template",en:"Error loading template",es:"Error al cargar una plantilla"}],"remove":[{pt:"Remove",en:"Remove",es:"Eliminar"}],"iconeFerramentas":[{pt:"Caixa de ferramentas",en:"Tool box",es:"Caja de herramientas"}],"iconeMapa":[{pt:"Camadas inclu&iacute;das",en:"Layers included",es:"Capas incluidas"}],"iconeCatalogo":[{pt:"Incluir mais camadas",en:"Add more layers",es:"Incluir m&aacute;s capas"}],"iconeLegenda":[{pt:"Legenda do mapa",en:"Map Legend",es:"Leyenda del mapa"}],"iconeBalao":[{pt:"Info resumida",en:"Summary information",es:"Informaci&oacute;n resumida"}],"iconeIdentifica":[{pt:"Info completa",en:"Comprehensive information",es:"Informaci&oacute;n completa"}],"indeOk":[{pt:"Cat&aacute;logo da INDE j&aacute; est&aacute; dispon&iacute;vel",en:"INDE catalog now available",es:"Cat&aacute;logo del INDE ya est&aacute; disponible"}],"deveLigada":[{pt:"A camada deve estar vis&iacute;vel",en:"The layer must be visible",es:"La capa debe ser visible"}],"balaoVazio":[{pt:"N&atilde;o foram encontrados dados nas camadas dispon&iacute;veis. Experimente utilizar o &iacute;cone de mais informa&ccedil;&otilde;es",en:"No data was found on the available layers. Try to use the more infomation icon",es:"No se encontraron datos en las capas disponibles. Intente utilizar el icono de m&aacute;s informaci&oacute;n"}],"umaLigada":[{pt:"Pelo menos uma camada deve estar ligada no mapa",en:"At least one layer must be associated with the map",es:"Al menos una capa debe estar conectada en el mapa"}],"precisaApiGM":[{pt:"Essa op&ccedil;&atilde;o necessita de uma API do Google Maps. Consulte o administrador do sistema. O c&oacute;digo da API deve constar no arquivo de configura&ccedil;&atilde;o do i3Geo.",en:"This option requires a Google Maps API. Ask your system administrator for advice. The API code should be in the i3Geo configuration file.",es:"Esta opci&oacute;n requiere una API de Google Maps. Consulte con el administrador del sistema. El c&oacute;digo de la API debe incluirse en el archivo de configuraci&oacute;n de i3Geo."}],"graticule":[{pt:"Grade de coordenadas (ativa e desativa)",en:"Coordinate grid (turn on and turn off)",es:"Cuadr&iacute;cula de coordenadas (activa y desactiva)"}],"versaoAntiga":[{pt:"Essa op&ccedil;&atilde;o pode n&atilde;o funcionar corretamente devido a vers&atilde;o do sistema (Mapserver)",en:"This option may not work properly because of the system version (Mapserver)",es:"Esta opci&oacute;n puede que no funcione correctamente debido a la versi&oacute;n del sistema (Mapserver)"}],"camadasDeFundo":[{pt:"Camadas de fundo",en:"Basemap",es:"Mapa base"}],"funcaojstip":[{pt:"Fun&ccedil;&atilde;o JS (para as etiquetas)",en:"",es:""}],"rangeScaleMsg":[{pt:"Vis&iacute;vel apenas em determinadas escalas",en:"",es:""}],"layerDesenho":[{pt:"Camada de desenho",en:"",es:""}],"confirma":[{pt:"Confirma",en:"",es:""}],"selCorta":[{pt:"Selecione primeiro um elemento para ser cortado",en:"",es:""}],"desPol":[{pt:"Desenhe um pol&iacute;gono",en:"",es:""}],"union":[{pt:"Uni&atilde;o",en:"",es:""}],"intersect":[{pt:"Intersec&ccedil;&atilde;o",en:"",es:""}],"symdif":[{pt:"Diferen&ccedil;a sim&eacute;trica",en:"",es:""}],"dif":[{pt:"Diferen&ccedil;a",en:"",es:""}],"shiftdel":[{pt:"Para apagar um v&eacute;rtice, pressione shift e clique",en:"",es:""}],"extent":[{pt:"Extens&atilde;o",en:"",es:""}],"cola":[{pt:"Cola",en:"",es:""}],"fillring":[{pt:"Preenche as ilhas",en:"",es:""}],"naoremovewkt":[{pt:"Fecha sem remover o desenho",en:"",es:""}],"ativasnaptol":[{pt:"Ativa toler&acirc;ncia (snap)",en:"",es:""}],"freehand":[{pt:"M&atilde;o livre",en:"",es:""}],"masc":[{pt:"M&aacute;scara",en:"",es:""}],"fullscreen":[{pt:"Tela cheia",en:"",es:""}]};
//
//compactados/idioma_compacto.js
if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.idioma={MOSTRASELETOR:false,IDSELETOR:"",SELETORES:["pt","en","es"],DICIONARIO:g_traducao,define:function(codigo){i3GEO.idioma.ATUAL=codigo;i3GEO.util.insereCookie("i3geolingua",codigo)},retornaAtual:function(){return(i3GEO.idioma.ATUAL)},defineDicionario:function(obj){i3GEO.idioma.DICIONARIO=obj},alteraDicionario:function(id,novo){i3GEO.idioma.DICIONARIO[id][0][i3GEO.idioma.ATUAL]=novo},traduzir:function(id,dic){if(!dic){dic=i3GEO.idioma.DICIONARIO}if(dic[id]){var r,t=dic[id][0];r=t[i3GEO.idioma.ATUAL];if(r==""){r=t["pt"]}return r}else{return}},adicionaDicionario:function(novodic){for(var k in novodic){if(novodic.hasOwnProperty(k)){i3GEO.idioma.DICIONARIO[k]=novodic[k]}}},mostraDicionario:function(){var w,k=0;w=window.open();for(k in i3GEO.idioma.DICIONARIO){if(i3GEO.idioma.DICIONARIO.hasOwnProperty(k)){w.document.write(k+" = "+i3GEO.idioma.traduzir(k)+"<br>")}}},trocaIdioma:function(codigo){i3GEO.util.insereCookie("i3geolingua",codigo);window.location.reload(true)},listaIdiomas:function(){for(var k in i3GEO.idioma.DICIONARIO){if(i3GEO.idioma.DICIONARIO.hasOwnProperty(k)){return(i3GEO.util.listaChaves(i3GEO.idioma.DICIONARIO[k][0]))}}},mostraSeletor:function(){if(!i3GEO.idioma.MOSTRASELETOR){return}var ins,n,w,i,pos,novoel,temp;ins="";n=i3GEO.idioma.SELETORES.length;if($i("i3geo")&&i3GEO.parametros.w<700){w="width:10px;"}else{w=""}for(i=0;i<n;i++){temp=i3GEO.idioma.SELETORES[i];ins+='<img  style="'+w+'padding:0 0px;top:-7px;padding-right:0px;border: 1px solid white;" src="'+i3GEO.configura.locaplic+"/imagens/branco.gif"+'" onclick="i3GEO.idioma.trocaIdioma(\''+temp+'\')" ';if(temp==="en"){ins+='alt="Ingles" id="uk" />'}if(temp==="pt"){ins+='alt="Portugues" id="brasil" />'}if(temp==="es"){ins+='alt="Espanhol" id="espanhol" />'}}if(i3GEO.idioma.IDSELETOR!==""&&$i(i3GEO.idioma.IDSELETOR)){$i(i3GEO.idioma.IDSELETOR).innerHTML=ins}else{pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));if(!$i("i3geoseletoridiomas")){novoel=document.createElement("div");novoel.innerHTML=ins;novoel.id="i3geoseletoridiomas";document.body.appendChild(novoel)}else{novoel=$i("i3geoseletoridiomas")}novoel.style.position="absolute";novoel.style.top=pos[1]-17+"px";novoel.style.left=pos[0]+"px";novoel.style.zIndex=5000}},OBJETOIDIOMA:"",objetoIdioma:function(dic){if(!dic){dic=i3GEO.idioma.DICIONARIO}var novo=[],k=0;for(k in dic){if(dic.hasOwnProperty(k)){novo[k]=i3GEO.idioma.traduzir(k,dic)}}return novo}};var $trad=function(id,dic){if(!dic||dic=="g_traducao"){return i3GEO.idioma.OBJETOIDIOMA[id]}else{return(i3GEO.idioma.traduzir(id,dic))}};(function(){if(document.cookie.indexOf("i3geolingua")===-1){var exdate=new Date();exdate.setDate(exdate.getDate()+10);var l="pt";var lang=navigator.language||navigator.userLanguage;lang=lang.split("-")[0];if(lang=="en"||lang=="es"||lang=="pt"){l=lang}document.cookie="i3geolingua="+l+"; expires="+exdate.toUTCString()+";path=/"}var c=i3GEO.util.pegaCookie("i3geolingua");if(c){i3GEO.idioma.define(c)}else{i3GEO.idioma.define("pt")}if(typeof('g_traducao')!=="undefined"){i3GEO.idioma.defineDicionario(g_traducao)}i3GEO.idioma.OBJETOIDIOMA=i3GEO.idioma.objetoIdioma(i3GEO.idioma.DICIONARIO);delete g_traducao;delete i3GEO.idioma.DICIONARIO})();
//
//compactados/php_compacto.js
if(typeof(i3GEO)==='undefined'){var i3GEO={}}var cpJSON=new cpaint();cpJSON.set_response_type("JSON");cpJSON.set_transfer_mode("POST");i3GEO.php={verifica:function(){if(i3GEO.configura.locaplic===undefined){i3GEO.janela.tempoMsg("i3GEO.php diz: variavel i3GEO.configura.locaplic n&atilde;o esta definida")}if(i3GEO.configura.sid===undefined){i3GEO.janela.tempoMsg("i3GEO.php diz: variavel i3GEO.configura.sid n&atilde;o esta definida")}},insereSHPgrafico:function(funcao,tema,x,y,itens,shadow_height,width,inclinacao){i3GEO.php.verifica();var p,par,ext,retorno;ext=i3GEO.parametros.mapexten;ext=i3GEO.util.extOSM2Geo(ext);p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php";par="funcao=insereSHPgrafico&tipo=pizza&tema="+tema+"&x="+x+"&y="+y+"&itens="+itens+"&shadow_height="+shadow_height+"&width="+width+"&inclinacao="+inclinacao+"&g_sid="+i3GEO.configura.sid+"&ext="+ext;retorno=function(retorno){i3GEO.janela.fechaAguarde("insereSHPgrafico");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("insereSHPgrafico",$trad("o1"));cpJSON.call(p,"insereSHPgrafico",retorno,par)},insereSHP:function(funcao,tema,item,valoritem,xy,projecao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/ferramentas/inserexy2/exec.php",par="funcao=insereSHP&item="+item+"&valor="+valoritem+"&tema="+tema+"&xy="+xy+"&projecao="+projecao+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("insereSHPgrafico");funcao.call(funcao,retorno)};cpJSON.call(p,"insereSHP",retorno,par)},pegaMensagens:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=pegaMensagens&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"pegaMensagem",funcao,par)},areaPixel:function(funcao,g_celula){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=areaPixel&celsize="+g_celula+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"areaPixel",funcao,par)},excluitema:function(funcao,temas){var layer,retorno,p,n,i,par;i3GEO.php.verifica();retorno=function(retorno){n=temas.length;for(i=0;i<n;i++){if(i3GEO.Interface.ATUAL==="openlayers"){layer=i3geoOL.getLayersByName(temas[i]);if(layer.length>0){i3geoOL.removeLayer(layer[0])}}if(i3GEO.Interface.ATUAL==="googlemaps"){indice=i3GEO.Interface.googlemaps.retornaIndiceLayer(temas[i]);if(indice!==false){i3GeoMap.overlayMapTypes.removeAt(indice)}}}funcao.call(funcao,retorno)};p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php";par="funcao=excluitema&temas="+temas+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"excluitema",retorno,par)},reordenatemas:function(funcao,lista){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=reordenatemas&lista="+lista+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){funcao.call(funcao,retorno)};cpJSON.call(p,"reordenatemas",retorno,par)},criaLegendaHTML:function(funcao,tema,template){i3GEO.php.verifica();if(arguments.length===1){tema="";template="legenda2.htm"}if(arguments.length===2){template="legenda2.htm"}cpJSON.call(i3GEO.configura.locaplic+"/classesphp/mapa_controle.php","criaLegendaHTML",funcao,"funcao=criaLegendaHTML&tema="+tema+"&templateLegenda="+template+"&g_sid="+i3GEO.configura.sid)},criaLegendaJSON:function(funcao,tema,w,h){i3GEO.php.verifica();if(arguments.length===1){tema=""}cpJSON.call(i3GEO.configura.locaplic+"/classesphp/mapa_controle.php","criaLegendaHTML",funcao,"funcao=criaLegendaJSON&tema="+tema+"&g_sid="+i3GEO.configura.sid+"&w="+w+"&h="+h)},inverteStatusClasse:function(funcao,tema,classe){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=inverteStatusClasse&g_sid="+i3GEO.configura.sid+"&tema="+tema+"&classe="+classe,retorno=function(retorno){funcao.call(funcao,retorno)};cpJSON.call(p,"inverteStatusClasse",retorno,par)},ligatemas:function(funcao,desligar,ligar,adicionar){i3GEO.php.verifica();if(arguments.length===3){adicionar="nao"}var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=ligatemas&desligar="+desligar+"&ligar="+ligar+"&adicionar="+adicionar+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){funcao.call(funcao,retorno)};cpJSON.call(p,"ligaDesligaTemas",retorno,par)},pegalistademenus:function(funcao,filtraOgc,filtraDown){i3GEO.php.verifica();if(!filtraOgc){filtraOgc="nao"}if(!filtraDown){filtraDown="nao"}var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=pegalistademenus&g_sid="+i3GEO.configura.sid+"&map_file=&idioma="+i3GEO.idioma.ATUAL+"&filtraOgc="+filtraOgc+"&filtraDown="+filtraDown;cpJSON.call(p,"pegalistademenus",funcao,par)},pegalistadegrupos:function(funcao,id_menu,listasgrupos,ordenaNome,filtraOgc,filtraDown){i3GEO.php.verifica();if(!ordenaNome){ordenaNome="nao"}if(!filtraOgc){filtraOgc="nao"}if(!filtraDown){filtraDown="nao"}var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=pegalistadegrupos&map_file=&g_sid="+i3GEO.configura.sid+"&idmenu="+id_menu+"&filtraOgc="+filtraOgc+"&filtraDown="+filtraDown+"&ordenaNome="+ordenaNome+"&listasistemas=nao&listasgrupos="+listasgrupos+"&idioma="+i3GEO.idioma.ATUAL;if(i3GEO.arvoreDeTemas){if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD===true){par+="&filtro=download"}else if(i3GEO.arvoreDeTemas.FILTRAOGC===true){par+="&filtro=ogc"}}cpJSON.call(p,"pegalistadegrupos",funcao,par)},pegalistadeSubgrupos:function(funcao,id_menu,id_grupo){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=pegalistadeSubgrupos&g_sid="+i3GEO.configura.sid+"&idmenu="+id_menu+"&grupo="+id_grupo+"&map_file=&idioma="+i3GEO.idioma.ATUAL;if(i3GEO.arvoreDeTemas){if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD===true){par+="&filtro=download"}else if(i3GEO.arvoreDeTemas.FILTRAOGC===true){par+="&filtro=ogc"}}cpJSON.call(p,"pegalistadeSubgrupos",funcao,par)},pegalistadetemas:function(funcao,id_menu,id_grupo,id_subgrupo){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=pegalistadetemas&g_sid="+i3GEO.configura.sid+"&idmenu="+id_menu+"&grupo="+id_grupo+"&subgrupo="+id_subgrupo+"&map_file=&idioma="+i3GEO.idioma.ATUAL;cpJSON.call(p,"pegalistadetemas",funcao,par)},listaTemas:function(funcao,tipo,locaplic,sid){if(arguments.length===2){locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid}var p=locaplic+"/classesphp/mapa_controle.php",par="funcao=listatemas&g_sid="+sid+"&tipo="+tipo;cpJSON.call(p,"listaTemas",funcao,par)},listaTemasEditaveis:function(funcao,locaplic,sid){if(arguments.length===1){locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid}var p=locaplic+"/classesphp/mapa_controle.php",par="funcao=listatemaslocais&g_sid="+sid;cpJSON.call(p,"listatemaslocais",funcao,par)},listaTemasComSel:function(funcao,locaplic,sid){if(arguments.length===1){locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid}var p=locaplic+"/classesphp/mapa_controle.php",par="funcao=listatemascomsel&g_sid="+sid;cpJSON.call(p,"listaTemasComSel",funcao,par)},listatemasTipo:function(funcao,tipo,locaplic,sid){if(arguments.length===2){locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid}var p=locaplic+"/classesphp/mapa_controle.php",par="funcao=&funcao=listatemasTipo&tipo="+tipo+"&g_sid="+sid;cpJSON.call(p,"listatemasTipo",funcao,par)},pegaSistemas:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=pegaSistemas&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"pegaSistemas",funcao,par)},listadrives:function(funcao){var p=i3GEO.configura.locaplic+"/ferramentas/navegarquivos/exec.php",par="funcao=listaDrives&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"listaDrives",funcao,par)},listaarquivos:function(funcao,caminho){var p=i3GEO.configura.locaplic+"/ferramentas/navegarquivos/exec.php",par="g_sid="+i3GEO.configura.sid+"&funcao=listaArquivos&diretorio="+caminho;cpJSON.call(p,"listaArquivos",funcao,par)},geo2utm:function(funcao,x,y){i3GEO.php.verifica();if($i("aguardeGifAberto")||x<-180){return}var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=geo2utm&x="+x+"&y="+y+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"geo2utm",funcao,par)},desativacgi:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=desativacgi&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"desativacgi",funcao,par)},pegaMapas:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="&map_file=&funcao=pegaMapas&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"pegaMapas",funcao,par)},mudatamanho:function(funcao,altura,largura){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/ferramentas/opcoes_tamanho/exec.php",par="funcao=mudatamanho&altura="+altura+"&largura="+largura+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){funcao.call(funcao,retorno)};cpJSON.call(p,"pegaSistemas",retorno,par)},ativalogo:function(funcao,altura,largura){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=ativalogo&g_sid="+i3GEO.configura.sid,retorno=function(retorno){funcao.call(funcao,retorno)};cpJSON.call(p,"ativalogo",retorno,par)},insereAnnotation:function(funcao,pin,xy,texto,position,partials,offsetx,offsety,minfeaturesize,mindistance,force,shadowcolor,shadowsizex,shadowsizey,outlinecolor,cor,sombray,sombrax,sombra,fundo,angulo,tamanho,fonte){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=inserefeature&pin="+pin+"&tipo=ANNOTATION&xy="+xy+"&texto="+texto+"&position="+position+"&partials="+partials+"&offsetx="+offsetx+"&offsety="+offsety+"&minfeaturesize="+minfeaturesize+"&mindistance="+mindistance+"&force="+force+"&shadowcolor="+shadowcolor+"&shadowsizex="+shadowsizex+"&shadowsizey="+shadowsizey+"&outlinecolor="+outlinecolor+"&cor="+cor+"&sombray="+sombray+"&sombrax="+sombrax+"&sombra="+sombra+"&fundo="+fundo+"&angulo="+angulo+"&tamanho="+tamanho+"&fonte="+fonte+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){funcao.call(funcao,retorno)};cpJSON.call(p,"inserefeature",retorno,par)},identificaunico:function(funcao,xy,tema,item){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=identificaunico&xy="+xy+"&resolucao=5&tema="+tema+"&item="+item+"&g_sid="+i3GEO.configura.sid+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"identificaunico",funcao,par)},recuperamapa:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=recuperamapa&g_sid="+i3GEO.configura.sid,retorno=function(retorno){funcao.call(funcao,retorno)};cpJSON.call(p,"recuperamapa",retorno,par)},criaLegendaImagem:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=criaLegendaImagem&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"criaLegendaImagem",funcao,par)},referenciadinamica:function(funcao,zoom,tipo,w,h){i3GEO.php.verifica();if(!w){w=""}if(!h){h=""}if(arguments.length===2){tipo="dinamico"}var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=referenciadinamica&g_sid="+i3GEO.configura.sid+"&zoom="+zoom+"&tipo="+tipo+"&ext="+i3GEO.util.extOSM2Geo(i3GEO.parametros.mapexten)+"&w="+w+"&h="+h;cpJSON.call(p,"retornaReferenciaDinamica",funcao,par)},pan:function(funcao,escala,tipo,x,y){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=pan&escala="+escala+"&tipo="+tipo+"&x="+x+"&y="+y+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"pan",funcao,par)},zoomponto:function(funcao,x,y,tamanho,simbolo,cor){i3GEO.php.verifica();if(!simbolo){simbolo="ponto"}if(!tamanho){tamanho=15}if(!cor){cor="255 0 0"}var retorno=function(retorno){if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.pan2ponto(x,y)}if(i3GEO.Interface.ATUAL==="googlemaps"){i3GEO.Interface.googlemaps.pan2ponto(x,y)}funcao.call(funcao,retorno)},p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=zoomponto&pin=pin&xy="+x+" "+y+"&g_sid="+i3GEO.configura.sid+"&marca="+simbolo+"&tamanho="+tamanho+"&cor="+cor;cpJSON.call(p,"zoomponto",retorno,par)},localizaIP:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=localizaIP&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"localizaIP",funcao,par)},mudaext:function(funcao,tipoimagem,ext,locaplic,sid,atualiza,geo){var retorno;if(arguments.length===3){i3GEO.php.verifica();locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid;atualiza=true;geo=false}if(geo===undefined){geo=false}if(atualiza===undefined){atualiza=true}if(ext===undefined){i3GEO.janela.tempoMsg("extensao nao definida");return}retorno=function(retorno){switch(i3GEO.Interface.ATUAL){case"googlemaps":if(atualiza===true){i3GEO.Interface.googlemaps.zoom2extent(ext)}break;case"openlayers":i3GEO.Interface.openlayers.zoom2ext(ext);break}try{funcao.call(funcao,retorno)}catch(e){}};var p=locaplic+"/classesphp/mapa_controle.php";var par="funcao=mudaext&tipoimagem="+tipoimagem+"&ext="+ext+"&g_sid="+sid+"&geo="+geo;cpJSON.call(p,"mudaext",retorno,par)},mudaescala:function(funcao,escala){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=mudaescala&escala="+escala+"&g_sid="+i3GEO.configura.sid+"&tipoimagem="+i3GEO.configura.tipoimagem,retorno=function(retorno){i3GEO.janela.fechaAguarde("mudaescala");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("mudaescala",$trad("o1"));cpJSON.call(p,"mudaescala",retorno,par)},aplicaResolucao:function(funcao,resolucao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=crialente&resolucao="+resolucao+"&g_sid="+i3GEO.configura.sid+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"crialente",funcao,par)},geradestaque:function(funcao,tema,ext){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=geradestaque&tema="+tema+"&g_sid="+i3GEO.configura.sid+"&ext="+ext,retorno=function(retorno){i3GEO.janela.fechaAguarde("geradestaque");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("geradestaque",$trad("o1"));cpJSON.call(p,"geradestaque",retorno,par)},selecaopt:function(funcao,tema,xy,tipo,tolerancia){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/ferramentas/selecao/exec.php",par="funcao=selecaopt&tema="+tema+"&tipo="+tipo+"&xy="+xy+"&tolerancia="+tolerancia+"&g_sid="+i3GEO.configura.sid+"&ext="+i3GEO.util.extOSM2Geo(i3GEO.parametros.mapexten);cpJSON.call(p,"selecaoPT",funcao,par)},selecaoWkt:function(funcao,tema,tipo,wkt,buffer){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/ferramentas/selecao/exec.php?funcao=selecaowkt&g_sid="+i3GEO.configura.sid+"&tipo="+tipo+"&tema="+tema+"&ext="+i3GEO.util.extOSM2Geo(i3GEO.parametros.mapexten)+"&buffer="+buffer,cp=new cpaint();cp.set_transfer_mode('POST');cp.set_response_type("JSON");cp.call(p,"foo",funcao,"&wkt="+wkt)},selecaobox:function(funcao,tema,tipo,box){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/ferramentas/selecao/exec.php",par="funcao=selecaobox&box="+i3GEO.util.extOSM2Geo(box)+"&g_sid="+i3GEO.configura.sid+"&tipo="+tipo+"&tema="+tema+"&ext="+i3GEO.util.extOSM2Geo(i3GEO.parametros.mapexten);cpJSON.call(p,"selecaobox",funcao,par)},selecaoext:function(funcao,tema,tipo){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/ferramentas/selecao/exec.php",par="g_sid="+i3GEO.configura.sid+"&funcao=selecaoext&tema="+tema+"&tipo="+tipo+"&ext="+i3GEO.util.extOSM2Geo(i3GEO.parametros.mapexten);cpJSON.call(p,"selecaoext",funcao,par)},selecaoatrib2:function(funcao,tema,filtro,tipo){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/ferramentas/selecao/exec.php",par="g_sid="+i3GEO.configura.sid+"&funcao=selecaoatrib2&tema="+tema+"&filtro="+filtro+"&tipo="+tipo+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"selecaoatrib2",funcao,par)},selecaotema:function(funcao,temao,tema,tipo,buffer){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/ferramentas/selecao/exec.php",par="g_sid="+i3GEO.configura.sid+"&funcao=selecaotema&temao="+temao+"&tema="+tema+"&tipo="+tipo+"&ext="+i3GEO.parametros.mapexten+"&buffer="+buffer;cpJSON.call(p,"selecaotema",funcao,par)},sobetema:function(funcao,tema){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=sobetema&tema="+tema+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("sobetema");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("sobetema",$trad("o1"));cpJSON.call(p,"sobetema",retorno,par)},descetema:function(funcao,tema){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=descetema&tema="+tema+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("descetema");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("descetema",$trad("o1"));cpJSON.call(p,"descetema",retorno,par)},fontetema:function(funcao,tema){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=fontetema&tema="+tema+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){funcao.call(funcao,retorno)};cpJSON.call(p,"fontetema",retorno,par)},zoomtema:function(funcao,tema){i3GEO.php.verifica();var retorno,p,par;retorno=function(retorno){switch(i3GEO.Interface.ATUAL){case"googlemaps":i3GEO.Interface.googlemaps.zoom2extent(retorno.data.variaveis.mapexten);i3GEO.atualizaParametros(retorno.data.variaveis);break;case"openlayers":i3GEO.Interface.openlayers.zoom2ext(retorno.data.variaveis.mapexten);i3GEO.atualizaParametros(retorno.data.variaveis);break}};p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php";par="funcao=zoomtema&tema="+tema+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"zoomtema",retorno,par)},zoomsel:function(funcao,tema){i3GEO.php.verifica();var retorno,p,par;retorno=function(retorno){switch(i3GEO.Interface.ATUAL){case"googlemaps":i3GEO.atualizaParametros(retorno.data.variaveis);i3GEO.Interface.googlemaps.zoom2extent(i3GEO.parametros.mapexten);break;case"openlayers":i3GEO.atualizaParametros(retorno.data.variaveis);i3GEO.Interface.openlayers.zoom2ext(i3GEO.parametros.mapexten);break}};p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php";par="funcao=zoomsel&tema="+tema+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"zoomsel",retorno,par)},limpasel:function(funcao,tema){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/ferramentas/selecao/exec.php",par="funcao=limpasel&tema="+tema+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){funcao.call(funcao,retorno)};cpJSON.call(p,"limpasel",retorno,par)},invertestatuslegenda:function(funcao,tema){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=invertestatuslegenda&tema="+tema+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){funcao.call(funcao,retorno)};cpJSON.call(p,"invertestatuslegenda",retorno,par)},aplicaCorClasseTema:function(funcao,idtema,idclasse,rgb){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=alteraclasse&opcao=alteracor&tema="+idtema+"&idclasse="+idclasse+"&cor="+rgb+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){funcao.call(funcao,retorno)};cpJSON.call(p,"aplicaCorClasseTema",retorno,par)},mudatransp:function(funcao,tema,valor){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=mudatransp&tema="+tema+"&valor="+valor+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){funcao.call(funcao,retorno)};cpJSON.call(p,"mudatransp",retorno,par)},copiatema:function(funcao,tema){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=copiatema&tema="+tema+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("copiatema");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("copiatema",$trad("o1"));cpJSON.call(p,"copiatema",retorno,par)},mudanome:function(funcao,tema,valor){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=mudanome&tema="+tema+"&valor="+valor+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){funcao.call(funcao,retorno)};cpJSON.call(p,"mudanome",retorno,par)},contorno:function(funcao,tema){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=contorno&tema="+tema+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){funcao.call(funcao,retorno)};cpJSON.call(p,"foo",retorno,par)},adicionaTemaWMS:function(funcao,servico,tema,nome,proj,formato,versao,nomecamada,tiporep,suportasld,formatosinfo,locaplic,sid,checked){var s,p,camadaArvore,par,ck;if(funcao===""){funcao=function(){i3GEO.janela.fechaAguarde("ajaxredesenha");i3GEO.atualiza()}}if(!locaplic||locaplic===""){locaplic=i3GEO.configura.locaplic}if(!sid||sid===""){sid=i3GEO.configura.sid}if(checked||checked==false){s=servico+"&layers="+tema+"&style="+nome;s=s.replace("&&","&");camadaArvore=i3GEO.arvoreDeCamadas.pegaTema(s,"","wmsurl");if(camadaArvore){ck=i3GEO.arvoreDeCamadas.capturaCheckBox(camadaArvore.name);ck.checked=checked;ck.onclick();return}}p=locaplic+"/classesphp/mapa_controle.php",par="g_sid="+sid+"&funcao=adicionatemawms&servico="+servico+"&tema="+tema+"&nome="+nome+"&proj="+proj+"&formato="+formato+"&versao="+versao+"&nomecamada="+nomecamada+"&tiporep="+tiporep+"&suportasld="+suportasld+"&formatosinfo="+formatosinfo;cpJSON.call(p,"adicionatemawms",funcao,par)},adicionaTemaSHP:function(funcao,path){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=adicionaTemaSHP&arq="+path,retorno=function(retorno){funcao.call(funcao,retorno)};cpJSON.call(p,"adicionaTemaSHP",retorno,par)},adicionaTemaIMG:function(funcao,path){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=adicionaTemaIMG&arq="+path,retorno=function(retorno){funcao.call(funcao,retorno)};cpJSON.call(p,"adicionaTemaIMG",retorno,par)},identifica3:function(funcao,x,y,resolucao,opcao,locaplic,sid,tema,ext,listaDeTemas,wkt){if(x===null||y===null||(x==0&&y==0)){return}if(arguments.length===4){opcao="tip";locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid;ext="";listaDeTemas="";resolucao=5;wkt="nao"}if(arguments.length===5){locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid;ext="";listaDeTemas="";wkt="nao"}if(listaDeTemas===undefined){listaDeTemas=""}ext=i3GEO.util.extOSM2Geo(ext);var p=locaplic+"/classesphp/mapa_controle.php",par="funcao=identifica3&wkt="+wkt+"&opcao="+opcao+"&xy="+x+","+y+"&resolucao="+resolucao+"&g_sid="+sid+"&ext="+ext+"&listaDeTemas="+listaDeTemas;if(opcao!=="tip"){par+="&tema="+tema}cpJSON.call(p,"identifica",funcao,par);return},reiniciaMapa:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=reiniciaMapa&g_sid="+i3GEO.configura.sid,retorno=function(retorno){funcao.call(funcao,retorno)};cpJSON.call(p,"reiniciaMapa",retorno,par)},procurartemas2:function(funcao,procurar,locaplic){if(arguments.length===2){locaplic=i3GEO.configura.locaplic}try{var p=locaplic+"/classesphp/mapa_controle.php",par="funcao=procurartemas2&map_file=&procurar="+procurar+"&idioma="+i3GEO.idioma.ATUAL,retorno=function(retorno){i3GEO.janela.fechaAguarde("procurartemas");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("procurartemas",$trad("o1"));cpJSON.call(p,"procurartemas",retorno,par)}catch(e){}},procurartemasestrela:function(funcao,nivel,fatorestrela,locaplic){if(arguments.length===3){locaplic=i3GEO.configura.locaplic}try{var p=locaplic+"/classesphp/mapa_controle.php",par="funcao=procurartemasestrela&map_file=&nivel="+nivel+"&fatorestrela="+fatorestrela+"&idioma="+i3GEO.idioma.ATUAL,retorno=function(retorno){i3GEO.janela.fechaAguarde("procurartemasestrela");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("procurartemasestrela",$trad("o1"));cpJSON.call(p,"foo",retorno,par)}catch(e){}},adtema:function(funcao,temas,locaplic,sid){if(arguments.length===2){i3GEO.php.verifica();locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid}var p=locaplic+"/classesphp/mapa_controle.php",par="funcao=adtema&temas="+temas+"&g_sid="+sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("adtema");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("adtema",$trad("o1"));cpJSON.call(p,"adtema",retorno,par)},escalagrafica:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=escalagrafica&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"escalagrafica",funcao,par)},googlemaps:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=googlemaps&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("googlemaps");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("googlemaps",$trad("o1"));cpJSON.call(p,"googlemaps",retorno,par)},openlayers:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=openlayers&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("openlayers");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("openlayers",$trad("o1"));cpJSON.call(p,"openlayers",retorno,par)},corpo:function(funcao,tipoimagem){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=corpo&tipoimagem="+tipoimagem+"&g_sid="+i3GEO.configura.sid+"&interface="+i3GEO.Interface.ATUAL;cpJSON.call(p,"corpo",funcao,par)},converte2googlemaps:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=converte2googlemaps&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("converte2googlemaps");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("converte2googlemaps",$trad("o1"));cpJSON.call(p,"converte2googlemaps",retorno,par)},converte2openlayers:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=converte2openlayers&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("converte2openlayers");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("converte2openlayers",$trad("o1"));cpJSON.call(p,"converte2openlayers",retorno,par)},criamapa:function(funcao,parametros){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=criaMapa&"+parametros,cp=new cpaint();cp.set_response_type("JSON");cp.set_async(true);cp.set_transfer_mode("POST");cp.call(p,"criaMapa",funcao,par)},inicia:function(funcao,w,h){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=inicia&w="+w+"&h="+h+"&g_sid="+i3GEO.configura.sid+"&interface=",cp=new cpaint();if(i3GEO.Interface.openlayers.googleLike===true){par+="googlemaps"}else{par+=i3GEO.Interface.ATUAL}cp.set_response_type("JSON");cp.set_async(true);cp.set_transfer_mode("POST");cp.call(p,"iniciaMapa",funcao,par)},chaveGoogle:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=chavegoogle&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"chavegoogle",funcao,par)},listaRSSwsARRAY:function(funcao,tipo){var p=i3GEO.configura.locaplic+"/classesphp/wscliente.php",par="funcao=listaRSSwsARRAY&rss="+["|"]+"&tipo="+tipo;cpJSON.call(p,"listaRSSwsARRAY",funcao,par)},listaLayersWMS:function(funcao,servico,nivel,id_ws,nomelayer,tipo_ws){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=listaLayersWMS&servico="+servico+"&nivel="+nivel+"&id_ws="+id_ws+"&nomelayer="+nomelayer+"&tipo_ws="+tipo_ws;cpJSON.call(p,"listaLayersWMS",funcao,par)},buscaRapida:function(funcao,locaplic,servico,palavra){var p=locaplic+"/classesphp/mapa_controle.php",par="map_file=&funcao=buscaRapida&palavra="+palavra+"&servico="+servico;cpJSON.call(p,"buscaRapida",funcao,par)},listaItensTema:function(funcao,tema){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=listaitens&tema="+tema+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"listaItensTema",funcao,par)},listaValoresItensTema:function(funcao,tema,itemTema){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=listaunica&tema="+tema+"&item="+itemTema+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"listaRegistros",funcao,par)},extRegistros:function(funcao,tema,reg){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=extregistros&registro="+reg+"&tema="+tema;cpJSON.call(p,"listaItensTema",funcao,par)},listaFontesTexto:function(funcao){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=listatruetype";cpJSON.call(p,"listaTrueType",funcao,par)},listaEpsg:function(funcao){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=listaEpsg&map_file=";cpJSON.call(p,"listaEpsg",funcao,par)},criatemaSel:function(funcao,tema){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/ferramentas/selecao/exec.php",par="g_sid="+i3GEO.configura.sid+"&funcao=criatemasel&tema="+tema+"&nome=Novo tema "+tema,retorno=function(retorno){i3GEO.janela.fechaAguarde("criatemaSel");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("criatemaSel",$trad("o1"));cpJSON.call(p,"chavegoogle",retorno,par)},pegaData:function(funcao,tema){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=pegadata&tema="+tema;cpJSON.call(p,"pegadata",funcao,par)},pegaMetaData:function(funcao,tema){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=pegametadata&tema="+tema;cpJSON.call(p,"pegametadata",funcao,par)},alteraData:function(funcao,tema,data,removemeta){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=alteradata&tema="+tema+"&novodata="+data+"&removemeta="+removemeta;cpJSON.call(p,"alteradata",funcao,par)},dadosPerfilRelevo:function(funcao,opcao,pontos,amostragem,item){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=dadosPerfilRelevo&opcao="+opcao,cp=new cpaint();cp.set_transfer_mode('POST');cp.set_response_type("JSON");cp.call(p,"foo",funcao,"&pontos="+pontos+"&amostragem="+amostragem+"&item="+item)},funcoesGeometriasWkt:function(funcao,listaWkt,operacao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=funcoesGeometriasWkt&operacao="+operacao,cp=new cpaint();cp.set_transfer_mode('POST');cp.set_response_type("JSON");cp.call(p,"foo",funcao,"&geometrias="+listaWkt)},listaVariavel:function(funcao,filtro_esquema){if(!filtro_esquema){filtro_esquema=""}var p=i3GEO.configura.locaplic+"/classesphp/metaestat_controle.php?funcao=listaVariavel&g_sid="+i3GEO.configura.sid+"&filtro_esquema="+filtro_esquema;i3GEO.util.ajaxGet(p,funcao)},listaMedidaVariavel:function(codigo_variavel,funcao){var p=i3GEO.configura.locaplic+"/classesphp/metaestat_controle.php?funcao=listaMedidaVariavel&codigo_variavel="+codigo_variavel+"&g_sid="+i3GEO.configura.sid;i3GEO.util.ajaxGet(p,funcao)},listaParametrosMedidaVariavel:function(id_medida_variavel,funcao){var p=i3GEO.configura.locaplic+"/classesphp/metaestat_controle.php?funcao=listaParametro&id_medida_variavel="+id_medida_variavel+"&g_sid="+i3GEO.configura.sid;i3GEO.util.ajaxGet(p,funcao)},listaRegioesMedidaVariavel:function(id_medida_variavel,funcao){var p=i3GEO.configura.locaplic+"/classesphp/metaestat_controle.php?funcao=listaRegioesMedida&id_medida_variavel="+id_medida_variavel+"&g_sid="+i3GEO.configura.sid;i3GEO.util.ajaxGet(p,funcao)},listaValoresParametroMedidaVariavel:function(id_parametro_medida,funcao){var p=i3GEO.configura.locaplic+"/classesphp/metaestat_controle.php?funcao=listaValoresParametro&id_parametro_medida="+id_parametro_medida+"&g_sid="+i3GEO.configura.sid;i3GEO.util.ajaxGet(p,funcao)},relatorioVariavel:function(codigo_variavel,funcao){var p=i3GEO.configura.locaplic+"/classesphp/metaestat_controle.php?funcao=relatorioCompleto&codigo_variavel="+codigo_variavel+"&g_sid="+i3GEO.configura.sid;i3GEO.util.ajaxGet(p,funcao)},listaClassificacaoMedida:function(id_medida_variavel,funcao){var p=i3GEO.configura.locaplic+"/classesphp/metaestat_controle.php?funcao=listaClassificacaoMedida&id_medida_variavel="+id_medida_variavel+"&g_sid="+i3GEO.configura.sid;i3GEO.util.ajaxGet(p,funcao)},listaClasseClassificacao:function(id_classificacao,funcao){var p=i3GEO.configura.locaplic+"/classesphp/metaestat_controle.php?funcao=listaClasseClassificacao&id_classificacao="+id_classificacao;i3GEO.util.ajaxGet(p,funcao)},mapfileMedidaVariavel:function(funcao,id_medida_variavel,filtro,todasascolunas,tipolayer,titulolayer,id_classificacao,agruparpor,codigo_tipo_regiao,opacidade){if(!opacidade){opacidade=""}var p=i3GEO.configura.locaplic+"/classesphp/metaestat_controle.php?funcao=mapfileMedidaVariavel&formato=json&codigo_tipo_regiao="+codigo_tipo_regiao+"&id_medida_variavel="+id_medida_variavel+"&filtro="+filtro+"&todasascolunas="+todasascolunas+"&tipolayer="+tipolayer+"&titulolayer="+titulolayer+"&id_classificacao="+id_classificacao+"&agruparpor="+agruparpor+"&opacidade="+opacidade+"&g_sid="+i3GEO.configura.sid;i3GEO.util.ajaxGet(p,funcao)},listaTipoRegiao:function(funcao,codigo_tipo_regiao){if(!codigo_tipo_regiao){codigo_tipo_regiao=""}var p=i3GEO.configura.locaplic+"/classesphp/metaestat_controle.php?funcao=listaTipoRegiao&codigo_tipo_regiao="+codigo_tipo_regiao+"&g_sid="+i3GEO.configura.sid;i3GEO.util.ajaxGet(p,funcao)},mapfileTipoRegiao:function(funcao,codigo_tipo_regiao,outlinecolor,width,nomes){if(!outlinecolor){outlinecolor="255,0,0"}if(!width){width=1}if(!nomes){nome="nao"}var p=i3GEO.configura.locaplic+"/classesphp/metaestat_controle.php?funcao=mapfileTipoRegiao&codigo_tipo_regiao="+codigo_tipo_regiao+"&g_sid="+i3GEO.configura.sid;p+="&outlinecolor="+outlinecolor+"&width="+width+"&nomes="+nomes;i3GEO.util.ajaxGet(p,funcao)},listaHierarquiaRegioes:function(funcao,codigo_tipo_regiao,codigoregiaopai,valorregiaopai){if(!codigoregiaopai){codigoregiaopai=""}if(!valorregiaopai){valorregiaopai=""}if(!codigo_tipo_regiao){codigo_tipo_regiao=""}var p=i3GEO.configura.locaplic+"/classesphp/metaestat_controle.php?funcao=listaHierarquiaRegioes&codigo_tipo_regiao="+codigo_tipo_regiao+"&codigoregiaopai="+codigoregiaopai+"&valorregiaopai="+valorregiaopai+"&g_sid="+i3GEO.configura.sid;i3GEO.util.ajaxGet(p,funcao)},aplicaFiltroRegiao:function(funcao,codigo_tipo_regiao,codigo_regiao){var p=i3GEO.configura.locaplic+"/ferramentas/metaestat/analise.php?funcao=aplicaFiltroRegiao&codigo_tipo_regiao="+codigo_tipo_regiao+"&codigo_regiao="+codigo_regiao+"&g_sid="+i3GEO.configura.sid;i3GEO.util.ajaxGet(p,funcao)},listaCamadasMetaestat:function(funcao){var p=i3GEO.configura.locaplic+"/ferramentas/metaestat/analise.php?funcao=listaCamadasMetaestat&g_sid="+i3GEO.configura.sid;i3GEO.util.ajaxGet(p,funcao)},listaGruposMapaMetaestat:function(funcao,id_mapa){var p=i3GEO.configura.locaplic+"/classesphp/metaestat_controle.php?funcao=listaGruposMapa&id_mapa="+id_mapa;i3GEO.util.ajaxGet(p,funcao)},listaTemasMapaMetaestat:function(funcao,id_mapa_grupo){var p=i3GEO.configura.locaplic+"/classesphp/metaestat_controle.php?funcao=listaTemasMapa&id_mapa_grupo="+id_mapa_grupo;i3GEO.util.ajaxGet(p,funcao)},marcadores2shp:function(funcao){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?";par="funcao=marcadores2shp";i3GEO.util.ajaxGet(p+par,funcao)},listaInterfaces:function(funcao){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="&map_file=&funcao=listainterfaces";cpJSON.call(p,"foo",funcao,par)},inde:function(funcao){var p=i3GEO.configura.locaplic+"/ferramentas/vinde/wmsindejson.php";cpJSON.call(p,"foo",funcao)}};
//
//compactados/configura_compacto.js
if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.configura={ferramentasLayers:{param:["tme","storymap","animagif"],"tme":{"arvoreDeCamadas":true,"metadata":"tme","classe":"i3GEOiconeTme",init:function(codigo){window.open(i3GEO.configura.locaplic+"/ferramentas/tme/cesium.php?&tema="+codigo)},icone:function(layer){var l,icone;if(typeof layer!="string"){if(layer.params.LAYERS){l=layer.params.LAYERS}else{l=layer.layername}}else{l=layer}icone="<img class='i3GEOiconeTme' onclick='i3GEO.util.animaClique(this);"+"i3GEO.configura.ferramentasLayers.tme.init(\""+l+"\");return false;'"+"title='3d' "+"src='"+i3GEO.configura.locaplic+"/imagens/branco.gif' />";return icone}},"storymap":{"arvoreDeCamadas":true,"metadata":"storymap","classe":"i3GEOiconeStorymap",init:function(codigo){window.open(i3GEO.configura.locaplic+"/ferramentas/storymap/default.php?&tema="+codigo)},icone:function(layer){var l,icone;if(typeof layer!="string"){if(layer.params.LAYERS){l=layer.params.LAYERS}else{l=layer.layername}}else{l=layer}icone="<img class='i3GEOiconeStorymap' onclick='i3GEO.util.animaClique(this);"+"i3GEO.configura.ferramentasLayers.storymap.init(\""+l+"\");return false;'"+"title='StoryMap' "+"src='"+i3GEO.configura.locaplic+"/imagens/branco.gif' />";return icone}},"animagif":{"arvoreDeCamadas":true,"metadata":"animagif","classe":"i3GEOiconeAnimagif",init:function(codigo){window.open(i3GEO.configura.locaplic+"/ferramentas/animagif/index.php?&tema="+codigo)},icone:function(layer){var l,icone;if(typeof layer!="string"){if(layer.params.LAYERS){l=layer.params.LAYERS}else{l=layer.layername}}else{l=layer}icone="<img class='i3GEOiconeAnimagif' onclick='i3GEO.util.animaClique(this);"+"i3GEO.configura.ferramentasLayers.animagif.init(\""+l+"\");return false;'"+"title='Animagif' "+"src='"+i3GEO.configura.locaplic+"/imagens/branco.gif' />";return icone}}},ferramentas:{identifica:{resolution:8}},grupoLayers:"",guardaExtensao:true,tipoimagem:"nenhum",alturatip:"100px",larguratip:"200px",mashuppar:"",sid:"",locaplic:""};
//
//compactados/calculo_compacto.js
if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.calculo={metododistancia:"vicenty",dms2dd:function(cd,cm,cs){try{var sinal,spm,mpg,dd;sinal='positivo';if(cd<0){cd=cd*-1;sinal='negativo'}spm=cs/3600;mpg=cm/60;dd=(cd*1)+(mpg*1)+(spm*1);if(sinal==='negativo'){dd=dd*-1}return(dd)}catch(e){return(0)}},dd2tela:function(vx,vy,docmapa,ext,cellsize){try{var pos,xyn,dc,imgext,c,xy;if(i3GEO.Interface.ATUAL==="googlemaps"&&docmapa.id!=="mapaReferencia"){pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));xyn=i3GeoMapOverlay.getProjection().fromLatLngToContainerPixel(new google.maps.LatLng(vy,vx));xy=[];return[(xyn.x)+pos[0],(xyn.y)+pos[1]]}if(i3GEO.Interface.ATUAL==="openlayers"&&docmapa.id!=="mapaReferencia"){pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));xy=i3GEO.util.extGeo2OSM(vx+" "+vy,true);xy=i3geoOL.getPixelFromCoordinate([xy[0]*1,xy[1]*1]);return[(xy[0])+pos[0],(xy[1])+pos[1]]}if(arguments.length===3){ext=i3GEO.util.extOSM2Geo(i3GEO.parametros.mapexten);cellsize=i3GEO.parametros.pixelsize}if(arguments.length===4){cellsize=i3GEO.parametros.pixelsize}if(!docmapa){docmapa=window.document}dc=docmapa;pos=i3GEO.util.pegaPosicaoObjeto(dc);imgext=ext.split(" ");vx=(vx*1)-(imgext[0]*1);vy=(vy*-1)+(imgext[3]*1);c=cellsize*1;return[(vx/c)+pos[0],(vy/c)+pos[1]]}catch(e){return([])}},dd2dms:function(x,y){var res,restod=0,sx="00.00",sy="00.00",mx,mm,restos,my,s,dx,dy;dx=parseInt(x,10);if(x>0){restod=x-dx}if(x<0){restod=(x*-1)-(dx*-1)}if(restod!==0){mm=restod*60;mx=parseInt(restod*60,10);restos=mm-mx;if(restos!==0){s=restos*60;s=(s+"").substring(0,5);sx=s}}else{mx="00";sx="00.00"}dy=parseInt(y,10);if(y>0){restod=y-dy}if(y<0){restod=(y*-1)-(dy*-1)}if(restod!==0){mm=restod*60;my=parseInt(restod*60,10);restos=mm-my;if(restos!==0){s=restos*60;s=(s+"").substring(0,5);sy=s}}else{my="00";sy="00.00"}if(y<0&&y>-1){dy="-"+dy}if(x<0&&x>-1){dx="-"+dx}res=[dx+" "+mx+" "+sx,dy+" "+my+" "+sy];return res},tela2dd:function(xfign,yfign,g_celula,imgext,idorigem){try{var amext,longdd,latdd;if(i3GEO.Interface.ATUAL==="googlemaps"&&arguments.length===4){amext=i3GeoMapOverlay.getProjection().fromContainerPixelToLatLng(new google.maps.Point(xfign,yfign));return[amext.lng(),amext.lat()]}if(navm){xfign=xfign-2.2;yfign=yfign-2.7}else{xfign=xfign-0.12;yfign=yfign-1.05}amext=imgext.split(" ");longdd=(amext[0]*1)+(g_celula*xfign);latdd=(amext[3]*1)-(g_celula*yfign);return[longdd,latdd]}catch(e){return(0)}},area:function(x,y,pixel){var n=x.length,$polygon_area,$i;try{if(n>2){x.push(x[0]);y.push(y[0]);$polygon_area=0;for($i=0;$i<n;$i+=1){$polygon_area+=((x[$i]*y[$i+1])-(y[$i]*x[$i+1]))}$polygon_area=Math.abs($polygon_area)/2}else{$polygon_area=0}return $polygon_area*pixel}catch(e){return(0)}},distancia:function(lon1,lat1,lon2,lat2){if(i3GEO.calculo.metododistancia==="haversine"){return i3GEO.calculo.distHaversine(lon1,lat1,lon2,lat2)}if(i3GEO.calculo.metododistancia==="vicenty"){return i3GEO.calculo.distVincenty(lon1,lat1,lon2,lat2)}},distHaversine:function(lon1,lat1,lon2,lat2){var dLat,dLon,a,c,d;dLat=((lat2-lat1))*Math.PI/180;dLon=((lon2-lon1))*Math.PI/180;a=Math.sin(dLat/2)*Math.sin(dLat/ 2) + Math.cos(lat1 * Math.PI/180)*Math.cos(lat2*Math.PI/180)*Math.sin(dLon/2)*Math.sin(dLon/2);c=2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a));d=6378.137*c;return d},distVincenty:function(lon1,lat1,lon2,lat2){var rad=function(x){return x*Math.PI/180},ct={a:6378137,b:6356752.3142,f:1/298.257223563},p1={lat:lat1,lon:lon1},p2={lat:lat2,lon:lon2},a=ct.a,b=ct.b,f=ct.f,L=rad(p2.lon-p1.lon),U1=Math.atan((1-f)*Math.tan(rad(p1.lat))),U2=Math.atan((1-f)*Math.tan(rad(p2.lat))),sinU1=Math.sin(U1),cosU1=Math.cos(U1),sinU2=Math.sin(U2),cosU2=Math.cos(U2),lambda=L,lambdaP=2*Math.PI,iterLimit=20,sinLambda,cosLambda,sinSigma=0,cosSigma=0,sigma=0,alpha,cosSqAlpha=0,cos2SigmaM=0,C,uSq,A,B,s,d,deltaSigma;while(Math.abs(lambda-lambdaP)>1e-12&&--iterLimit>0){sinLambda=Math.sin(lambda);cosLambda=Math.cos(lambda);sinSigma=Math.sqrt((cosU2*sinLambda)*(cosU2*sinLambda)+(cosU1*sinU2-sinU1*cosU2*cosLambda)*(cosU1*sinU2-sinU1*cosU2*cosLambda));if(sinSigma===0){return 0}cosSigma=sinU1*sinU2+cosU1*cosU2*cosLambda;sigma=Math.atan2(sinSigma,cosSigma);alpha=Math.asin(cosU1*cosU2*sinLambda/sinSigma);cosSqAlpha=Math.cos(alpha)*Math.cos(alpha);cos2SigmaM=cosSigma-2*sinU1*sinU2/cosSqAlpha;C=f/16*cosSqAlpha*(4+f*(4-3*cosSqAlpha));lambdaP=lambda;lambda=L+(1-C)*f*Math.sin(alpha)*(sigma+C*sinSigma*(cos2SigmaM+C*cosSigma*(-1+2*cos2SigmaM*cos2SigmaM)))}if(iterLimit===0){return NaN}uSq=cosSqAlpha*(a*a-b*b)/(b*b);A=1+uSq/16384*(4096+uSq*(-768+uSq*(320-175*uSq)));B=uSq/1024*(256+uSq*(-128+uSq*(74-47*uSq)));deltaSigma=B*sinSigma*(cos2SigmaM+B/4*(cosSigma*(-1+2*cos2SigmaM*cos2SigmaM)-B/6*cos2SigmaM*(-3+4*sinSigma*sinSigma)*(-3+4*cos2SigmaM*cos2SigmaM)));s=b*A*(sigma-deltaSigma);d=s.toFixed(3)/1000; return d},direcao:function(lon1,lat1,lon2,lat2){var dLon,y,x,r;lat1=lat1*(Math.PI/180);lat2=lat2*(Math.PI/180);dLon=(lon2-lon1)*(Math.PI/180);y=Math.sin(dLon)*Math.cos(lat2);x=Math.cos(lat1)*Math.sin(lat2)-Math.sin(lat1)*Math.cos(lat2)*Math.cos(dLon);r=Math.atan2(y,x);r=r*180/Math.PI;r=r+360;return r%360},destinoDD:function(lon,lat,d,direcao){var R,lat1,lon1,brng,lat2,lon2;R=6371;lat1=lat*(Math.PI/180);lon1=lon*(Math.PI/180);brng=direcao*(Math.PI/180);lat2=Math.asin(Math.sin(lat1)*Math.cos(d/R)+Math.cos(lat1)*Math.sin(d/R)*Math.cos(brng));lon2=lon1+Math.atan2(Math.sin(brng)*Math.sin(d/R)*Math.cos(lat1),Math.cos(d/R)-Math.sin(lat1)*Math.sin(lat2));lon2=(lon2+Math.PI)%(2*Math.PI)-Math.PI;if(isNaN(lat2)||isNaN(lon2)){return null}return[(lon2*180/Math.PI),(lat2*180/Math.PI)]},rect2ext:function(idrect,mapext,pixel){var bx,bxs,xfig,yfig,nx,ny,pos,amext,dy,x1,y1,x2,y2,pix=parseInt(document.getElementById(idrect).style.left,10),piy=parseInt(document.getElementById(idrect).style.top,10);if($i(idrect)){bx=$i(idrect);bxs=bx.style}else{i3GEO.janela.tempoMsg("Box nao encontrado");return}pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));xfig=pix+(parseInt(bxs.width,10))-pos[0];yfig=piy+(parseInt(bxs.height,10))-pos[1];amext=mapext.split(" ");dy=((amext[1]*1)-(amext[3]*1))/-1;if(dy<0){dy=dy*-1}nx=pixel*xfig;ny=pixel*yfig;x1=(amext[0]*1)+nx;y1=(amext[3]*1)-ny;xfig=pix-pos[0];yfig=piy-pos[1];if(dy<0){dy=dy*-1}nx=pixel*xfig;ny=pixel*yfig;x2=(amext[0]*1)+nx;y2=(amext[3]*1)-ny;return[x2+" "+y2+" "+x1+" "+y1,x1,y1,x2,y2]},ext2rect:function(idrect,mapext,boxext,pixel,documento){var rectbox,xyMin,xyMax,w,h,tl,pos,t,l,d,box;rectbox=boxext.split(" ");xyMin=i3GEO.calculo.dd2tela(rectbox[0],rectbox[1],documento,boxext,pixel);xyMax=i3GEO.calculo.dd2tela(rectbox[2],rectbox[3],documento,boxext,pixel);w=xyMax[0]-xyMin[0];h=xyMin[1]-xyMax[1];tl=i3GEO.calculo.dd2tela(rectbox[0],rectbox[3],documento,mapext,pixel);pos=i3GEO.util.pegaPosicaoObjeto(documento);t=tl[1]-pos[1];l=tl[0]-pos[0];d="block";if($i(idrect)){box=$i(idrect);box.style.width=w+"px";box.style.height=h+"px";box.style.top=t+"px";box.style.left=l+"px";box.style.display=d}return[w,h,xyMax[1],xyMin[0]]}};
//
//compactados/desenho_compacto.js
if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.desenho={layergrafico:null,estilos:{"normal":{fillcolor:'#ffffff',linecolor:'#ffcc33',linewidth:'2',circcolor:'#ffffff',textcolor:'#787A78'},"palido":{fillcolor:'#B5A8A8',linecolor:'#BAA4AE',linewidth:'1',circcolor:'#E0D7DC',textcolor:'#787A78'},"vermelho":{fillcolor:'#E8ACAC',linecolor:'#F50707',linewidth:'1',circcolor:'#F09EA6',textcolor:'#787A78'},"verde":{fillcolor:'#3CCC2F',linecolor:'#0C6642',linewidth:'1',circcolor:'#C7D9D2',textcolor:'#787A78'}},estilosOld:{"normal":{fillcolor:'red',linecolor:'black',linewidth:'1',circcolor:'white',textcolor:'gray'},"palido":{fillcolor:'gray',linecolor:'gray',linewidth:'1',circcolor:'gray',textcolor:'gray'},"vermelho":{fillcolor:'gray',linecolor:'red',linewidth:'1',circcolor:'pink',textcolor:'brown'},"verde":{fillcolor:'gray',linecolor:'green',linewidth:'1',circcolor:'DarkGreen',textcolor:'GreenYellow'}},estiloPadrao:"normal",caixaEstilos:function(){var lista=i3GEO.util.listaChaves(i3GEO.desenho.estilos),n=lista.length,i,caixa,sel;caixa="<select class='form-control' onchange='i3GEO.desenho.definePadrao(this.value)'>";for(i=0;i<n;i+=1){sel="";if(lista[i]===i3GEO.desenho.estiloPadrao){sel="select"}caixa+="<option value='"+lista[i]+"'"+sel+">"+lista[i]+"</option>"}caixa+="</select>";return caixa},definePadrao:function(valor){i3GEO.desenho.estiloPadrao=valor},addBox:function(xmin,ymin,xmax,ymax,namespace,strokeColor,strokeWidth){return i3GEO.desenho[i3GEO.Interface.ATUAL].addBox(xmin,ymin,xmax,ymax,namespace,strokeColor,strokeWidth)},moveBox:function(box,xmin,ymin,xmax,ymax){return i3GEO.desenho[i3GEO.Interface.ATUAL].moveBox(box,xmin,ymin,xmax,ymax)},removeBox:function(namespace){i3GEO.desenho.removePins(namespace)},addPin:function(x,y,w,h,imagem,namespace,centro,funcaoclick){return i3GEO.desenho[i3GEO.Interface.ATUAL].addPin(x,y,w,h,imagem,namespace,centro)},removePins:function(namespace){i3GEO.desenho[i3GEO.Interface.ATUAL].removePins(namespace)},movePin:function(pin,x,y){i3GEO.desenho[i3GEO.Interface.ATUAL].movePin(pin,x,y)},criaLayerGrafico:function(){if(!i3GEO.desenho.layergrafico){i3GEO.desenho[i3GEO.Interface.ATUAL].criaLayerGrafico()}},openlayers:{inicia:function(){if(!i3GEO.desenho.layergrafico){i3GEO.desenho.openlayers.criaLayerGrafico()}},addBox:function(xmin,ymin,xmax,ymax,namespace,strokeColor,strokeWidth){var pol,f;if(!namespace){namespace="box"}if(!strokeColor){strokeColor="#FF0000"}if(!strokeWidth){strokeWidth=2}i3GEO.desenho.openlayers.inicia();xmin=xmin*1;ymin=ymin*1;xmax=xmax*1;ymax=ymax*1;pol=new ol.geom.Polygon([[[xmin,ymin],[xmin,ymax],[xmax,ymax],[xmax,ymin],[xmin,ymin]]]);pol=i3GEO.util.extGeo2OSM(pol);f=new ol.Feature({geometry:pol});f.setStyle(new ol.style.Style({stroke:new ol.style.Stroke({color:strokeColor,width:strokeWidth})}));f.setProperties({origem:namespace});i3GEO.desenho.layergrafico.getSource().addFeature(f);return f},moveBox:function(box,xmin,ymin,xmax,ymax){box.getGeometry().setCoordinates([[[xmin,ymin],[xmin,ymax],[xmax,ymax],[xmax,ymin],[xmin,ymin]]]);return box},addPin:function(x,y,w,h,imagem,namespace,centro,funcaoclick){if(!imagem||imagem===""){imagem=i3GEO.configura.locaplic+"/imagens/google/confluence.png"}if(!namespace){namespace="pin"}if(!w||w===""){w=27}if(!h||h===""){h=27}if(!funcaoclick){funcaoclick=function(){i3GEO.desenho.openlayers.removePins(namespace)}}if(!centro){centro=false}i3GEO.desenho.openlayers.inicia();var point,f,ox,oy;if(centro===true){ox=0.5;oy=0.5}else{ox=0.5;oy=1}point=i3GEO.util.extGeo2OSM(new ol.geom.Point([x,y]));f=new ol.Feature({geometry:point});f.setProperties({origem:namespace});f.setStyle(new ol.style.Style({image:new ol.style.Icon({src:imagem,size:[w,h],anchor:[ox,oy]})}));i3GEO.desenho.layergrafico.getSource().addFeature(f);return f},removePins:function(namespace){if(!namespace){namespace="pin"}if(i3GEO.desenho.layergrafico){var features,n,f,i,remover=[];features=i3GEO.desenho.layergrafico.getSource().getFeatures();n=features.length;for(i=0;i<n;i++){if(features[i].get("origem")==namespace){remover.push(features[i])}}n=remover.length;for(i=0;i<n;i++){i3GEO.desenho.layergrafico.getSource().removeFeature(remover[i])}}},movePin:function(pin,x,y){var point=i3GEO.util.extGeo2OSM(new ol.geom.Point([x,y]));pin.getGeometry().setCoordinates(point.getCoordinates())},criaLayerGrafico:function(){if(!i3GEO.desenho.layergrafico){i3GEO.desenho.layergrafico=new ol.layer.Vector({source:new ol.source.Vector({features:new ol.Collection(),useSpatialIndex:false}),style:new ol.style.Style({fill:new ol.style.Fill({color:'rgba(255, 255, 255, 0.2)'}),stroke:new ol.style.Stroke({color:'#ffcc33',width:4}),image:new ol.style.Circle({radius:7,fill:new ol.style.Fill({color:'#ffcc33'})})})});i3GEO.desenho.layergrafico.setProperties({"layerGr":true,"name":"i3GEOdesenho","title":$trad("layerDesenho"),"isBaseLayer":false},true);i3GEO.desenho.layergrafico.setMap(i3geoOL);i3GEO.desenho.layergrafico.getFeatures=function(){return i3GEO.desenho.layergrafico.getSource().getFeatures()};i3GEO.editor.criaLayerBackup()}}},googlemaps:{shapes:[],inicia:function(){},addBox:function(xmin,ymin,xmax,ymax,namespace,strokeColor,strokeWidth){var f;if(!namespace){namespace="box"}if(!strokeColor){strokeColor="#FF0000"}if(!strokeWidth){strokeWidth=2}i3GEO.desenho.googlemaps.inicia();f=new google.maps.Rectangle({origem:namespace,strokeColor:strokeColor,strokeWeight:strokeWidth,fillOpacity:0,map:i3GeoMap,bounds:new google.maps.LatLngBounds(new google.maps.LatLng(ymin,xmin),new google.maps.LatLng(ymax,xmax))});i3GEO.desenho.googlemaps.shapes.push(f);return f},moveBox:function(box,xmin,ymin,xmax,ymax){box.setBounds(new google.maps.LatLngBounds(new google.maps.LatLng(ymin,xmin),new google.maps.LatLng(ymax,xmax)));return box},addPin:function(x,y,w,h,imagem,namespace,centro,funcaoclick){if(!imagem||imagem===""){imagem=i3GEO.configura.locaplic+"/imagens/google/confluence.png"}if(!namespace){namespace="pin"}if(!w||w===""){w=27}if(!h||h===""){h=27}if(!funcaoclick){funcaoclick=function(){i3GEO.desenho.googlemaps.removePins(namespace)}}if(!centro){centro=false}i3GEO.desenho.googlemaps.inicia();var point,f,icon;if(centro===false){icon={url:imagem,size:new google.maps.Size(w,h)}}else{icon={url:imagem,size:new google.maps.Size(w,h),origin:new google.maps.Point(0,0),anchor:new google.maps.Point(w/2,h/2)}}point=new google.maps.LatLng(y,x);f=new google.maps.Marker({position:point,map:i3GeoMap,origem:namespace,icon:icon});i3GEO.desenho.googlemaps.shapes.push(f);return f},removePins:function(namespace){if(!namespace){namespace="pin"}var f=i3GEO.desenho.googlemaps.getFeaturesByAttribute("origem",namespace);if(f&&f.length>0){i3GEO.desenho.googlemaps.destroyFeatures(f)}},movePin:function(pin,x,y){var point=new google.maps.LatLng(y,x);pin.setPosition(point)},getFeaturesByAttribute:function(atributo,valor){var i,s=[],n=i3GEO.desenho.googlemaps.shapes.length;for(i=0;i<n;i++){if(i3GEO.desenho.googlemaps.shapes[i]&&i3GEO.desenho.googlemaps.shapes[i]!=""){if(i3GEO.desenho.googlemaps.shapes[i][atributo]==valor){s.push(i3GEO.desenho.googlemaps.shapes[i])}}}return s},destroyFeatures:function(f){if(f){var i,n=f.length;for(i=0;i<n;i++){f[i].setMap(null);f[i]=""}}}}};
//
//compactados/interface_compacto.js
if(typeof(i3GEO)==='undefined'){var i3GEO={}}var i3GEOtouchesPosMapa="";var i3geoOL;i3GEO.Interface={RESTRICTATT:true,LAYEROPACITY:"",INFOOVERLAY:"",ATUAL:"openlayers",IDCORPO:"openlayers",IDMAPA:"",STATUS:{atualizando:[],trocando:false,pan:false},LAYERSUTFGRID:{},aposAdicNovaCamada:function(camada){i3GEO.tema.ativaFerramentas(camada)},redesenha:function(){i3GEO.Interface[i3GEO.Interface.ATUAL].redesenha()},grade:function(){i3GEO.Interface[i3GEO.Interface.ATUAL].grade()},aplicaOpacidade:function(opacidade,layer){i3GEO.Interface[i3GEO.Interface.ATUAL].aplicaOpacidade(opacidade,layer)},atualizaMapa:function(){switch(i3GEO.Interface.ATUAL){case"openlayers":i3GEO.Interface.openlayers.atualizaMapa();break;default:i3GEO.Interface[i3GEO.Interface.ATUAL].redesenha()}},atualizaTema:function(retorno,tema){i3GEO.Interface[i3GEO.Interface.ATUAL].atualizaTema(retorno,tema)},ligaDesliga:function(obj){i3GEO.Interface[i3GEO.Interface.ATUAL].ligaDesliga(obj);if(obj.checked&&obj.value!=""){i3GEO.mapa.ativaTema(obj.value)}},adicionaKml:function(){if(i3GEO.Interface.ATUAL==="googlemaps"){i3GEO.Interface.googlemaps.adicionaKml("foo")}if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.adicionaKml("foo")}},cria:function(w,h){i3GEO.Interface[i3GEO.Interface.ATUAL].cria(w,h)},inicia:function(w,h){var temp=window.location.href.split("?")[0],gadgets=i3GEO.gadgets;if($i("i3GEOcompartilhar")){i3GEO.social.compartilhar("i3GEOcompartilhar",temp,temp,"semtotal")}if($i("mst")){$i("mst").style.display="block"}i3GEO.navega.autoRedesenho.ativa();i3GEO.util.defineValor("i3geo_escalanum","value",i3GEO.parametros.mapscale);if((i3GEO.parametros.geoip==="nao")&&($i("ondeestou"))){$i("ondeestou").style.display="none"}i3GEO.Interface[i3GEO.Interface.ATUAL].inicia();i3GEO.desenho.criaLayerGrafico();if($i(i3GEO.login.divnomelogin)&&i3GEO.util.pegaCookie("i3geousuarionome")){$i(i3GEO.login.divnomelogin).innerHTML=i3GEO.util.pegaCookie("i3geousuarionome")}},alteraParametroLayers:function(parametro,valor){i3GEO.Interface[i3GEO.Interface.ATUAL].alteraParametroLayers(parametro,valor)},ativaBotoes:function(){},zoom2ext:function(mapexten){if(!mapexten){mapexten=i3GEO.parametros.mapexten}i3GEO.Interface[i3GEO.Interface.ATUAL].zoom2ext(mapexten)},zoomli:function(){i3GEO.Interface[i3GEO.Interface.ATUAL].zoomli()},getZoom:function(){return i3GEO.Interface[i3GEO.Interface.ATUAL].getZoom()},openlayers:{parametrosMap:{target:"openlayers",layers:[],controls:[],interactions:[],loadTilesWhileAnimating:true,loadTilesWhileInteracting:true},parametrosView:{},TILES:true,LAYERSADICIONAIS:[],googleLike:false,BALAOPROP:{url:"",templateModal:"",removeAoAdicionar:true,classeCadeado:"i3GEOiconeAberto",autoPan:true,autoPanAnimation:{duration:250},minWidth:'200px',modal:false,simple:true,openTipNoData:true,baloes:[]},GRADE:"",FULLSCREEN:"",fullscreen:function(){if(i3GEO.Interface.openlayers.FULLSCREEN==""){i3GEO.Interface.openlayers.FULLSCREEN=new ol.control.FullScreen();i3GEO.Interface.openlayers.FULLSCREEN.setMap(i3geoOL);return}if(i3GEO.Interface.openlayers.FULLSCREEN.getMap()==null){i3GEO.Interface.openlayers.FULLSCREEN.setMap(i3geoOL)}else{i3GEO.Interface.openlayers.FULLSCREEN.setMap(null)}},grade:function(){if(i3GEO.Interface.openlayers.GRADE==""){i3GEO.Interface.openlayers.GRADE=new ol.Graticule({strokeStyle:new ol.style.Stroke({color:'rgba(105,105,105,0.9)',width:2,lineDash:[0.5,4]}),showLabels:true,targetSize:200});i3GEO.Interface.openlayers.GRADE.setMap(i3geoOL);return}if(i3GEO.Interface.openlayers.GRADE.getMap()==null){i3GEO.Interface.openlayers.GRADE.setMap(i3geoOL)}else{i3GEO.Interface.openlayers.GRADE.setMap(null)}},zoomli:function(){if(DetectaMobile("DetectMobileLong")){i3GEO.janela.tempoMsg($trad("x70"))}else{i3GEO.janela.tempoMsg($trad("zoomliShift"))}},getZoom:function(){return i3geoOL.getZoom()},balao:function(texto,completo,x,y,botaoMais,botaoProp,nwkts){var icone,painel,b,cabecalho,conteudo,p=i3GEO.Interface.openlayers.BALAOPROP,removeBaloes;if(botaoMais===undefined){botaoMais=true}if(botaoProp===undefined){botaoProp=true}removeBaloes=function(removeWkt){var nd,t,n=i3GEO.Interface.openlayers.BALAOPROP.baloes.length,i;for(i=0;i<n;i++){t=i3GEO.Interface.openlayers.BALAOPROP.baloes[i];if(t.get("origem")=="balao"){t.setPosition(undefined);nd=t.getElement().parentNode;nd.parentNode.removeChild(nd)}}i3GEO.Interface.openlayers.BALAOPROP.baloes=[];if(removeWkt!==false&&i3GEO.desenho.layergrafico){i3GEO.desenho[i3GEO.Interface.ATUAL].removePins()}else if(i3GEO.desenho.layergrafico){var features,n,f,i;features=i3GEO.desenho.layergrafico.getSource().getFeatures();n=features.length;for(i=0;i<n;i++){if(features[i].get("origem")=="pin"){features[i].set("origem","identifica")}}}return false};if(p.classeCadeado==="i3GEOiconeAberto"){removeBaloes(true)}if(i3GEO.eventos.cliquePerm.ativo===false){return}painel=document.createElement("div");painel.style.minWidth=p.minWidth;painel.className="ol-popup";cabecalho=document.createElement("div");cabecalho.className="i3GEOCabecalhoInfoWindow";icone=document.createElement("div");icone.className=p.classeCadeado;icone.onclick=function(){if(p.classeCadeado==="i3GEOiconeAberto"){p.classeCadeado="i3GEOiconeFechado"}else{p.classeCadeado="i3GEOiconeAberto"}this.className=p.classeCadeado;p.removeAoAdicionar=!p.removeAoAdicionar;return false};cabecalho.appendChild(icone);if(botaoProp===true){icone=document.createElement("div");icone.className="i3GEOiconeFerramentas";icone.style.left="3px";icone.onclick=function(){i3GEO.janela.prompt($trad("tolerancia"),function(){i3GEO.configura.ferramentas.identifica.resolution=$i("i3GEOjanelaprompt").value},i3GEO.configura.ferramentas.identifica.resolution);return false};cabecalho.appendChild(icone)}if(botaoMais===true){icone=document.createElement("div");icone.className="i3GEOiconeMais";icone.style.left="9px";icone.onclick=function(){i3GEO.mapa.dialogo.cliqueIdentificaDefault(x,y);return false};cabecalho.appendChild(icone)}if(nwkts&&nwkts>0){icone=document.createElement("div");icone.className="i3GEOiconeMantemWkt";icone.style.left="15px";icone.title=$trad("naoremovewkt");icone.onclick=function(){removeBaloes(false)};cabecalho.appendChild(icone)}icone=document.createElement("div");icone.className="ol-popup-closer";icone.onclick=removeBaloes;cabecalho.appendChild(icone);painel.appendChild(cabecalho);conteudo=document.createElement("div");conteudo.className="tooltip-conteudo";conteudo.innerHTML=texto;painel.appendChild(conteudo);b=new ol.Overlay({element:painel,stopEvent:true,autoPan:p.autoPan,autoPanAnimation:p.autoPanAnimation});b.setProperties({origem:"balao"});p.baloes.push(b);i3geoOL.addOverlay(b);b.setPosition(i3GEO.util.projGeo2OSM(new ol.geom.Point([x,y])).getCoordinates())},redesenha:function(){var openlayers=i3GEO.Interface.openlayers;openlayers.criaLayers();openlayers.ordenaLayers();openlayers.recalcPar();i3GEO.janela.fechaAguarde()},fundoDefault:function(){var eng,oce,ims,wsm,tms,bra;eng=new ol.layer.Tile({title:"ESRI National Geographic",visible:true,isBaseLayer:true,name:"eng",source:new ol.source.TileArcGISRest({url:"http://server.arcgisonline.com/ArcGIS/rest/services/NatGeo_World_Map/MapServer",attributions:[new ol.Attribution({html:'Tiles &copy; <a href="http://server.arcgisonline.com/ArcGIS/rest/services/NatGeo_World_Map/MapServer">ArcGIS</a>'})]})});oce=new ol.layer.Tile({title:"ESRI Ocean Basemap",visible:false,isBaseLayer:true,name:"oce",source:new ol.source.TileArcGISRest({url:"http://server.arcgisonline.com/ArcGIS/rest/services/Ocean_Basemap/MapServer",attributions:[new ol.Attribution({html:'Tiles &copy; <a href="http://server.arcgisonline.com/ArcGIS/rest/services/Ocean_Basemap/MapServer">ArcGIS</a>'})]})});ims=new ol.layer.Tile({title:"ESRI Imagery World 2D",visible:false,isBaseLayer:true,name:"ims",source:new ol.source.TileArcGISRest({url:"http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_Imagery_World_2D/MapServer",attributions:[new ol.Attribution({html:'Tiles &copy; <a href="http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_Imagery_World_2D/MapServer">ArcGIS</a>'})]})});wsm=new ol.layer.Tile({title:"ESRI World Street Map",visible:false,isBaseLayer:true,name:"wsm",source:new ol.source.TileArcGISRest({url:"http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer",attributions:[new ol.Attribution({html:'Tiles &copy; <a href="http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer">ArcGIS</a>'})]})});bra=new ol.layer.Tile({title:"Base carto MMA",visible:false,isBaseLayer:true,name:"bra",source:new ol.source.TileWMS({url:"http://mapas.mma.gov.br/cgi-bin/mapserv?map=/opt/www/html/webservices/baseraster.map&",params:{'layers':"baseraster",'srs':"EPSG:4326",'format':"image/png"}})});tms=new ol.layer.Tile({title:"OSGEO",visible:false,isBaseLayer:true,name:"tms",source:new ol.source.TileWMS({url:"http://tilecache.osgeo.org/wms-c/Basic.py/",params:{'layers':"basic",'type':"png",'srs':"EPSG:4326",'format':"image/png",'VERSION':'1.1.1'},attributions:[new ol.Attribution({html:'&copy; <a href="http://www.tilecache.org/">2006-2010, TileCache Contributors</a>'})]})});i3GEO.Interface.openlayers.LAYERSADICIONAIS=[eng,oce,ims,wsm,tms,bra]},cria:function(w,h){var f,ins,i=$i(i3GEO.Interface.IDCORPO);if(i){if(!i.style.height){i.style.width="100vw";i.style.height="100vh"}f=$i("openlayers");if(!f){ins='<div id=openlayers style="display: block;position:relative;top: 0px; left: 0px;width:100%;height:100%;text-align:left;"></div>';i.innerHTML=ins;f=$i("openlayers")}}i3GEO.Interface.IDMAPA="openlayers";i3GEO.Interface.openlayers.parametrosMap.target="openlayers";if(i3GEO.Interface.openlayers.googleLike===false){i3GEO.Interface.openlayers.parametrosView.projection="EPSG:4326"}else{i3GEO.Interface.openlayers.parametrosView.projection="EPSG:3857"}i3GEO.Interface.openlayers.parametrosMap.view=new ol.View(i3GEO.Interface.openlayers.parametrosView);i3geoOL=new ol.Map(i3GEO.Interface.openlayers.parametrosMap);ol.layer.Layer.prototype.setVisibility=function(v){this.setVisible(v)};ol.layer.Layer.prototype.getVisibility=function(v){this.getVisible(v)};i3geoOL.panTo=function(x,y){this.getView().setCenter([x,y])};i3geoOL.getLayersByName=function(nome){var res=[],layers=this.getLayers(),n=layers.getLength(),i;for(i=0;i<n;i++){if(layers.item(i).get("name")&&layers.item(i).get("name")===nome){res.push(layers.item(i))}}return res};i3geoOL.addLayers=function(lista){var n=lista.length,i,lan,l;for(i=0;i<n;i++){if(lista[i].get!=undefined){lan=lista[i].get("name");if(lan){l=this.getLayersByName(lan);if(l.length===0){this.addLayer(lista[i])}}}}};i3geoOL.getLayersBase=function(){return i3geoOL.getLayersBy("isBaseLayer",true)};i3geoOL.getLayerBase=function(){var baseLayers,n,i;baseLayers=i3geoOL.getLayersBase();n=baseLayers.length;for(i=0;i<n;i++){if(baseLayers[i].getVisible()==true){return baseLayers[i]}}return false};i3geoOL.getLayersBy=function(chave,valor){var res=[],layers=this.getLayers(),n=layers.getLength(),i;for(i=0;i<n;i++){if(layers.item(i).get(chave)&&layers.item(i).get(chave)===valor){res.push(layers.item(i))}}return res};i3geoOL.getAllLayers=function(chave,valor){var res=[],layers=this.getLayers(),n=layers.getLength(),i;for(i=0;i<n;i++){res.push(layers.item(i))}return res};i3geoOL.getLayersGr=function(){var layers=i3geoOL.getLayersBy("layerGr",true);if(i3GEO.desenho.layergrafico){layers.unshift(i3GEO.desenho.layergrafico)}return layers};i3geoOL.getLayersGrBy=function(chave,valor){var res=[],layers=this.getLayersGr(),n=layers.length,i;for(i=0;i<n;i++){if(layers[i].get(chave)&&layers[i].get(chave)===valor){res.push(layers[i])}}return res};i3geoOL.getControlsBy=function(chave,valor){var res=[],controles=this.getControls(),n=controles.getLength(),i;for(i=0;i<n;i++){if(controles.item(i).get(chave)&&controles.item(i).get(chave)===valor){res.push(controles.item(i))}}return res};i3geoOL.getControlByType=function(type){var a=false;i3geoOL.getControls().forEach(function(c){if(c instanceof ol.control[type]==true){a=c}});return a},i3geoOL.getCenter=function(){var c=this.getView().getCenter();return{"lon":c[0],"lat":c[1]}};i3geoOL.getZoom=function(){var c=this.getView().getZoom();return c};i3geoOL.getExtent=function(){var e=this.getView().calculateExtent(this.getSize());return{toBBOX:function(){return e.join(",")}}};i3geoOL.getScale=function(){var resolution,units,dpi,mpu,scale;resolution=this.getView().getResolution();units=this.getView().getProjection().getUnits();dpi=25.4/0.28;mpu=ol.proj.METERS_PER_UNIT[units];scale=resolution*mpu*39.37*dpi;return scale};i3geoOL.zoomToScale=function(escala){var resolution,units,dpi,mpu;units=this.getView().getProjection().getUnits();dpi=25.4/0.28;mpu=ol.proj.METERS_PER_UNIT[units];resolution=escala/(mpu*39.37*dpi);this.getView().setResolution(resolution)};i3geoOL.zoomToExtent=function(mapext){this.getView().fit(mapext,this.getSize())}},inicia:function(){if(i3GEO.Interface.openlayers.googleLike===true&&i3geoOL.getView().getProjection().getCode()!="EPSG:3857"){alert("Alerta! Projecao diferente da esperada. Veja i3geo/guia_de_migracao.txt")}var montaMapa=function(){var openlayers=i3GEO.Interface.openlayers;i3geoOL.updateSize();var temp=i3geoOL.getControlByType("ScaleLine");if(temp&&temp.element){temp.element.onclick=function(e){if(temp.getUnits()=="metric"){temp.setUnits("nautical")}else{temp.setUnits("metric")}temp.changed()}}openlayers.registraEventos();openlayers.zoom2ext(i3GEO.parametros.mapexten);$i("openlayers").getElementsByClassName("ol-overlaycontainer-stopevent")[0].style.position="unset";openlayers.criaLayers()};if(i3GEO.arvoreDeCamadas.ATIVATEMA===""){i3GEO.arvoreDeCamadas.ATIVATEMA="i3GEO.Interface.ligaDesliga(this);i3GEO.eventos.executaEventos(i3GEO.eventos.ATUALIZAARVORECAMADAS);"}montaMapa();i3GEO.coordenadas.ativaEventos();i3GEO.idioma.mostraSeletor();if(i3GEO.parametros.kmlurl!==""){i3GEO.Interface.openlayers.adicionaKml(true,i3GEO.parametros.kmlurl)}if(jQuery.isFunction(i3GEO.finalizaAPI)){i3GEO.finalizaAPI.call()}},aplicaOpacidade:function(opacidade,layer){var nlayers=i3GEO.arvoreDeCamadas.CAMADAS.length,l,i,camada;if(!layer){layer=""}for(i=nlayers-1;i>=0;i--){camada=i3GEO.arvoreDeCamadas.CAMADAS[i];l=i3geoOL.getLayersByName(camada.name)[0];if(l&&l.get("isBaseLayer")===false){if(layer==""||layer==camada.name){l.setOpacity(opacidade)}}}},adicionaListaKml:function(){var monta=function(retorno){var raiz,nraiz,i;raiz=retorno.data.canais;nraiz=raiz.length;for(i=0;i<nraiz;i++){i3GEO.Interface.openlayers.adicionaKml(false,raiz[i].link,raiz[i].title,false)}};i3GEO.php.listaRSSwsARRAY(monta,"KML")},adicionaKml:function(pan,url,titulo,ativo){var ngeoxml,i;if(!$i("arvoreCamadasKml")){i3GEO.Interface.openlayers.criaArvoreKML()}ngeoxml="geoXml_"+i3GEO.mapa.GEOXML.length;if(arguments.length===1){i=$i("i3geo_urlkml");if(i){url=i.value}else{url=""}titulo=ngeoxml;ativo=true}if(arguments.length===2){titulo=ngeoxml;ativo=true}if(url===""){return}i3GEO.mapa.GEOXML.push(ngeoxml);i3GEO.Interface.openlayers.adicionaNoArvoreKml(url,titulo,ativo,ngeoxml)},criaArvoreKML:function(){var arvore,a,root,titulo,d,node;arvore=$i("arvoreCamadasKml");if(!arvore){d=document.createElement("div");d.id="arvoreCamadasKml";d.style.top="40px";a=$i(i3GEO.arvoreDeCamadas.IDHTML);if(a){a.parentNode.appendChild(d)}else{return}}i3GEO.Interface.openlayers.ARVORE=new YAHOO.widget.TreeView("arvoreCamadasKml");root=i3GEO.Interface.openlayers.ARVORE.getRoot();titulo="<table><tr><td><b>Kml</b></td></tr></table>";d={html:titulo,idkml:"raiz"};node=new YAHOO.widget.HTMLNode(d,root,true,true);node.enableHighlight=false},adicionaNoArvoreKml:function(url,nomeOverlay,ativo,id){var node,d,nodekml;if(!$i("arvoreCamadasKml")){i3GEO.Interface.openlayers.criaArvoreKML()}if(arguments.length===2){ativo=true;id=nomeOverlay}if(arguments.length===2){id=nomeOverlay}node=i3GEO.Interface.openlayers.ARVORE.getNodeByProperty("idkml","raiz");html="<input onclick='i3GEO.Interface.openlayers.ativaDesativaCamadaKml(this,\""+url+"\")' class=inputsb style='cursor:pointer;' type='checkbox' value='"+id+"'";if(ativo===true){html+=" checked "}html+="/>";if(navm){estilo="cursor:default;vertical-align:35%;padding-top:0px;"}else{estilo="cursor:default;vertical-align:top;"}html+="&nbsp;<span style='"+estilo+"'>"+nomeOverlay+"</span>";d={html:html};nodekml=new YAHOO.widget.HTMLNode(d,node,true,true);nodekml.enableHighlight=false;nodekml.isleaf=true;i3GEO.Interface.openlayers.ARVORE.draw();i3GEO.Interface.openlayers.ARVORE.collapseAll();node.expand();if(ativo===true){i3GEO.Interface.openlayers.insereLayerKml(id,url)}},insereLayerKml:function(id,url){var l,temp;url=i3GEO.configura.locaplic+"/classesphp/proxy.php?url="+url;l=new ol.layer.Vector({title:url,name:id,isBaseLayer:false,source:new ol.source.Vector({url:url,format:new ol.format.KML({extractStyles:true}),tipoServico:"kml"})});i3geoOL.addLayer(l);temp=function(pixel){var feature,chaves,c,i=0,html="",prop,g;feature=i3geoOL.forEachFeatureAtPixel(pixel,function(feature,layer){return feature});if(feature){i3GEO.Interface.openlayers.BALAOPROP.removeAoAdicionar=false;i3GEO.Interface.openlayers.BALAOPROP.classeCadeado="i3GEOiconeFechado";chaves=feature.getKeys();prop=feature.getProperties();c=chaves.length;for(i=0;i<c;i++){if(chaves[i]!="geometry"&&chaves[i]!="styleUrl"){html+=chaves[i]+": "+prop[chaves[i]]}}g=feature.getGeometry().getCoordinates();i3GEO.Interface.openlayers.balao(html,"",g[0],g[1],"kml")}};i3geoOL.on('click',function(evt){evt.stopPropagation();evt.preventDefault();if(evt.dragging){return}temp(i3geoOL.getEventPixel(evt.originalEvent))})},ativaDesativaCamadaKml:function(obj,url){if(!obj.checked){i3geoOL.getLayersByName(obj.value)[0].setVisibility(false)}else{if(!(i3geoOL.getLayersByName(obj.value)[0])){i3GEO.Interface.openlayers.insereLayerKml(obj.value,url)}else{i3geoOL.getLayersByName(obj.value)[0].setVisibility(true)}}},criaLayers:function(){var matrixIds,resolutions,size,z,projectionExtent,source,configura=i3GEO.configura,url,nlayers=i3GEO.arvoreDeCamadas.CAMADAS.length,layer,camada,urllayer,opcoes,i,temp;temp=$i("i3GEOprogressoDiv");if(temp){i3GEO.Interface.STATUS.atualizando=[];temp.style.display="none"}if(i3GEO.Interface.openlayers.googleLike===true){url=configura.locaplic+"/classesphp/mapa_googlemaps.php?";projectionExtent=ol.proj.get('EPSG:3857').getExtent()}else{url=configura.locaplic+"/classesphp/mapa_openlayers.php?";projectionExtent=ol.proj.get('EPSG:4326').getExtent()}url+="TIPOIMAGEM="+configura.tipoimagem;size=ol.extent.getWidth(projectionExtent)/256;resolutions=new Array(40);matrixIds=new Array(40);for(z=0;z<40;++z){resolutions[z]=size/Math.pow(2,z);matrixIds[z]=z}$i("openlayers").style.backgroundColor="rgb("+i3GEO.parametros.cordefundo+")";i3geoOL.addLayers(i3GEO.Interface.openlayers.LAYERSADICIONAIS);opcoes={gutter:0,isBaseLayer:false,opacity:1,visible:false,singleTile:!(i3GEO.Interface.openlayers.TILES),tilePixelRatio:1,preload:0,projection:'EPSG:4326'};if(i3GEO.Interface.openlayers.googleLike===true){opcoes.projection='EPSG:3857'}for(i=nlayers-1;i>=0;i--){layer="";camada=i3GEO.arvoreDeCamadas.CAMADAS[i];opcoes.singleTile=!(i3GEO.Interface.openlayers.TILES);if(i3geoOL.getLayersByName(camada.name).length===0&&camada.name.toLowerCase()!="copyright"){if(camada.plugini3geo&&camada.plugini3geo!=""&&camada.plugini3geo.parametros!=undefined){i3GEO.pluginI3geo.inicia(camada);continue}else{try{temp=camada.transitioneffect==="nao"?opcoes.preload=0:opcoes.preload=Infinity;if(i3GEO.Interface.openlayers.googleLike===false&&camada.connectiontype===7&&camada.wmsurl!==""&&camada.usasld.toLowerCase()!="sim"){urllayer=camada.wmsurl;if(camada.wmstile==10){source=new ol.source.WMTS({url:urllayer,matrixSet:opcoes.projection,format:'image/png',projection:opcoes.projection,tileGrid:new ol.tilegrid.WMTS({origin:ol.extent.getTopLeft(projectionExtent),resolutions:resolutions,matrixIds:matrixIds}),wrapX:true});source.set("tipoServico","WMTS");opcoes.singleTile=false}else{source=new ol.source.TileWMS({url:urllayer,params:{'VERSION':'1.1.0'},projection:camada.wmssrs});source.set("tipoServico","ImageWMS");opcoes.singleTile=false}opcoes.title=camada.tema;opcoes.name=camada.name;opcoes.isBaseLayer=false;opcoes.visible=true}else{if(i3GEO.Interface.openlayers.TILES==false){opcoes.singleTile=true}else{if(camada.tiles==="nao"||camada.escondido.toLowerCase()==="sim"||camada.connectiontype===10||(camada.type===0&&camada.cache==="nao")||camada.type===8){opcoes.singleTile=true}else{temp=camada.type===3?opcoes.singleTile=false:opcoes.singleTile=!(i3GEO.Interface.openlayers.TILES)}if(camada.tiles==="nao"){opcoes.singleTile=true}if(camada.tiles==="sim"||camada.cache==="sim"||(camada.cortepixels&&camada.cortepixels>0)){opcoes.singleTile=false}}if(camada.cache){urllayer=url+"&cache="+camada.cache}else{urllayer=url+"&cache=nao"}urllayer+="&layer="+camada.name;if(camada.utfgrid=="sim"){if(i3GEO.Interface.openlayers.googleLike===false){source=new ol.source.TileUTFGrid({projection:opcoes.projection,wrapX:true,tileJSON:{"tilejson":"2.1.0","scheme":"xyz","grids":[urllayer+"&FORMAT=utfgrid&tms=&TileCol={x}&TileRow={y}&TileMatrix={z}"]}})}else{source=new ol.source.TileUTFGrid({projection:opcoes.projection,wrapX:true,tileJSON:{"tilejson":"2.1.0","scheme":"xyz","grids":[urllayer+"&FORMAT=utfgrid&tms=&X={x}&Y={y}&Z={z}"]}})}source.set("tipoServico","WMTS");opcoes.singleTile=false;opcoes.title="";opcoes.name=camada.name+"_utfgrid";opcoes.source=source;opcoes.isBaseLayer=false;opcoes.visible=true;source.set("name",camada.name+"_utfgrid");var layerutfgrid=new ol.layer.Tile(opcoes);camada.status==0?layerutfgrid.setVisible(false):layerutfgrid.setVisible(true);i3GEO.Interface.LAYERSUTFGRID[camada.name+"_utfgrid"]=layerutfgrid;if(i3GEO.Interface.INFOOVERLAY==""){$("#"+i3GEO.Interface.IDMAPA).after(i3GEO.template.utfGridInfo);i3GEO.Interface.INFOOVERLAY=new ol.Overlay({element:$i("i3GEOoverlayInfo"),offset:[3,-3],stopEvent:true,positioning:'bottom-left'});i3GEO.Interface.INFOOVERLAY.setProperties({origem:"infoOverlay"});i3geoOL.addOverlay(i3GEO.Interface.INFOOVERLAY)}i3geoOL.addLayer(layerutfgrid)}if(opcoes.singleTile===true){source=new ol.source.ImageWMS({url:urllayer,params:{'LAYERS':camada.name,'VERSION':'1.1.0'},projection:opcoes.projection,ratio:1});source.set("tipoServico","ImageWMS")}else{if(i3GEO.Interface.openlayers.googleLike===false){source=new ol.source.WMTS({url:urllayer+"&WIDTH=256&HEIGHT=256",matrixSet:opcoes.projection,format:'image/png',projection:opcoes.projection,tileGrid:new ol.tilegrid.WMTS({origin:ol.extent.getTopLeft(projectionExtent),resolutions:resolutions,matrixIds:matrixIds,tileSize:[256,256]}),wrapX:true});source.set("tipoServico","WMTS")}else{source=new ol.source.XYZ({url:urllayer+"&X={x}&Y={y}&Z={z}",matrixSet:opcoes.projection,format:'image/png',projection:opcoes.projection,wrapX:true});source.set("tipoServico","WMTS")}}opcoes.title=camada.tema;opcoes.name=camada.name}if(camada.link_tema!=""&&i3GEO.Interface.RESTRICTATT==false){source.setAttributions([new ol.Attribution({html:'<li><a  href="'+camada.link_tema+'">'+camada.tema+'</a></li>'})])}source.set("name",camada.name);source.set("parametrosUrl",{par:""});opcoes.source=source;opcoes.isBaseLayer=false;opcoes.visible=true;if($i("i3GEOprogressoCamadas")){source.on('tileloadstart',function(event){i3GEO.Interface.openlayers.loadStartLayer(source.get("name"))});source.on('tileloadend',function(event){i3GEO.Interface.openlayers.loadStopLayer(source.get("name"))});source.on('tileloaderror',function(event){i3GEO.Interface.openlayers.loadStopLayer(source.get("name"))})}if(opcoes.singleTile===true){layer=new ol.layer.Image(opcoes)}else{layer=new ol.layer.Tile(opcoes)}}catch(e){}}if(layer&&layer!=""){if(camada.escondido.toLowerCase()==="sim"){layer.preload=0}if(camada.type>1&&i3GEO.Interface.LAYEROPACITY!=""){layer.setOpacity(i3GEO.Interface.LAYEROPACITY)}i3geoOL.addLayer(layer);i3GEO.Interface.aposAdicNovaCamada(camada)}}else{layer=i3geoOL.getLayersByName(camada.name)[0]}if(layer&&layer!=""){temp=camada.status==0?layer.setVisible(false):layer.setVisible(true)}}if(i3GEO.parametros.copyright!=""&&!$i("i3GEOcopyright")){temp=document.createElement("div");temp.id="i3GEOcopyright";temp.innerHTML="<p class=paragrafo >"+i3GEO.parametros.copyright+"</p>";if($i(i3GEO.Interface.IDMAPA)){$i(i3GEO.Interface.IDMAPA).appendChild(temp)}}else if(i3GEO.parametros.copyright!=""&&$i("i3GEOcopyright")){$i("i3GEOcopyright").innerHTML=i3GEO.parametros.copyright}},sobeLayersGraficos:function(){},inverteModoTile:function(){if(i3GEO.Interface.openlayers.TILES===true){i3GEO.Interface.openlayers.TILES=false}else{i3GEO.Interface.openlayers.TILES=true}i3GEO.Interface.openlayers.removeTodosOsLayers();i3GEO.Interface.openlayers.criaLayers()},removeTodosOsLayers:function(){var nlayers=i3GEO.arvoreDeCamadas.CAMADAS.length,layer,i,camada;for(i=nlayers-1;i>=0;i--){camada=i3GEO.arvoreDeCamadas.CAMADAS[i];layer=i3geoOL.getLayersByName(camada.name)[0];if(layer){i3geoOL.removeLayer(layer,false);i3GEO.pluginI3geo.removeCamada(camada.name)}}},alteraParametroLayers:function(parametro,valor){var layer,layers=i3GEO.arvoreDeCamadas.CAMADAS,nlayers=layers.length,i,param,source,k,url="",n,j;for(i=0;i<nlayers;i+=1){layer=i3geoOL.getLayersByName(layers[i].name)[0];if(layer&&layer!=undefined&&layer.get("isBaseLayer")===false){url="";source=layer.getSource();param=source.getProperties().parametrosUrl;param[parametro]=valor;chaves=i3GEO.util.listaTodasChaves(param);n=chaves.length;for(j=0;j<n;j++){k=chaves[j];if(param[k]!=""&&k!="par"){url+="&"+k+"="+param[k]}}param.par=url;source.set("parametrosUrl",param)}}},loadStartLayer:function(name){var p=$i("i3GEOprogressoCamadas");var n100=i3geoOL.getLayers().getLength()-i3GEO.Interface.openlayers.LAYERSADICIONAIS.length;if(p){i3GEO.Interface.STATUS.atualizando.push(" ");var x=i3GEO.Interface.STATUS.atualizando.length;p.style.width=((x*100)/n100)+"%"}},loadStopLayer:function(name){var p=$i("i3GEOprogressoCamadas");if(p){i3GEO.Interface.STATUS.atualizando.pop();if(i3GEO.Interface.STATUS.atualizando.length==0){p.style.width="0%"}}},ordenaLayers:function(){var ordem=i3GEO.arvoreDeCamadas.CAMADAS,nordem=ordem.length,layer,layers,i;layers=i3geoOL.getLayers();for(i=nordem-1;i>=0;i--){layer=i3geoOL.getLayersByName(ordem[i].name);layer=layer[0];if(layer){layers.remove(layer);layers.push(layer)}}},ligaDesliga:function(obj){var layers=i3geoOL.getLayersByName(obj.value),desligar="",ligar="",b;if(layers.length>0){layers[0].setVisibility(obj.checked);if(obj.checked===true){i3GEO.pluginI3geo.ligaCamada(obj.value)}else{i3GEO.pluginI3geo.desligaCamada(obj.value)}}if(obj.checked){ligar=obj.value;i3GEO.arvoreDeCamadas.alteraPropCamadas("status","2",obj.value);if(i3GEO.Interface.LAYERSUTFGRID[obj.value+"_utfgrid"]){i3GEO.arvoreDeCamadas.alteraPropCamadas("status","2",obj.value+"_utfgrid");i3GEO.Interface.LAYERSUTFGRID[obj.value+"_utfgrid"].setVisibility(true)}}else{desligar=obj.value;i3GEO.arvoreDeCamadas.alteraPropCamadas("status","0",obj.value);if(i3GEO.Interface.LAYERSUTFGRID[obj.value+"_utfgrid"]){i3GEO.arvoreDeCamadas.alteraPropCamadas("status","0",obj.value+"_utfgrid");i3GEO.Interface.LAYERSUTFGRID[obj.value+"_utfgrid"].setVisibility(false)}}i3GEO.php.ligatemas(i3GEO.legenda.atualiza,desligar,ligar)},ativaFundo:function(nome){var baseLayers,n,i,t,ck=true;baseLayers=i3geoOL.getLayersBase();n=baseLayers.length;for(i=0;i<n;i++){baseLayers[i].setVisible(false)}for(i=0;i<n;i++){if(baseLayers[i].get("name")===nome){baseLayers[i].setVisible(true)}}if(i3GEO.maparef.APIOBJ!=""){i3GEO.maparef.inicia()}},atualizaMapa:function(){var camadas=i3GEO.arvoreDeCamadas.CAMADAS,n=camadas.length,i;for(i=0;i<n;i++){i3GEO.Interface.openlayers.atualizaTema("",camadas[i].name)}},atualizaTema:function(retorno,tema){var layer=i3geoOL.getLayersByName(tema),objtemas,funcaoLoad,servico,source;if(layer.length==0){return""}else{layer=layer[0]}if(layer&&layer!=undefined){source=layer.getSource();servico=source.getProperties().tipoServico;if(servico==="WMTS"){funcaoLoad=source.getTileUrlFunction();if(funcaoLoad){layer.getSource().setTileUrlFunction(function(){var url=funcaoLoad.apply(this,arguments);url=url.replace("&cache=sim","&cache=nao");return url.split('&r=')[0]+'&r='+Math.random()+source.getProperties().parametrosUrl.par})}}if(servico==="ImageWMS"){funcaoLoad=source.getImageLoadFunction();if(funcaoLoad){layer.getSource().setImageLoadFunction(function(image,src){src=src.replace("&cache=sim","&cache=nao");src=src.split('&r=')[0]+'&r='+Math.random();image.getImage().src=src+source.getProperties().parametrosUrl.par})}}source.refresh()}if(retorno===""){return}objtemas=i3GEO.arvoreDeCamadas.converteChaveValor2normal(retorno.data.temas);i3GEO.Interface.openlayers.recalcPar();try{i3GEO.arvoreDeCamadas.atualiza(objtemas)}catch(e){i3GEO.arvoreDeCamadas.atualiza()}i3GEO.janela.fechaAguarde()},registraEventos:function(){i3GEOtouchesPosMapa="";var modoAtual="";var contadorPan=0;i3GEO.eventos.ativa(i3geoOL.getTargetElement());i3geoOL.on("pointerdrag",function(e){i3GEO.Interface.STATUS.pan=true;modoAtual="move"});i3geoOL.on("click",function(e){e.stopPropagation();e.preventDefault()});i3geoOL.on("dbclick",function(e){e.stopPropagation();e.preventDefault()});i3geoOL.on("moveend",function(e){if(e.changedTouches){return}var xy;contadorPan++;var timer=setTimeout(function(){contadorPan--;if(contadorPan==0){modoAtual="";i3GEO.navega.registraExt(i3GEO.parametros.mapexten);i3GEO.Interface.openlayers.recalcPar();i3GEO.Interface.STATUS.pan=false;i3GEO.eventos.navegaMapa();i3GEO.util.escondePin();i3GEO.eventos.cliquePerm.status=false;i3GEO.Interface.STATUS.pan=false}},350)});i3geoOL.on("pointermove",function(e){if(modoAtual==="move"||e.dragging){return}var lonlat=false,d,pos="";lonlat=e.coordinate;if(i3GEO.Interface.openlayers.googleLike===true){lonlat=ol.proj.transform(lonlat,'EPSG:3857','EPSG:4326')}d=i3GEO.calculo.dd2dms(lonlat[0],lonlat[1]);objposicaocursor.ddx=lonlat[0];objposicaocursor.ddy=lonlat[1];objposicaocursor.dmsx=d[0];objposicaocursor.dmsy=d[1];objposicaocursor.imgx=e.pixel[0];objposicaocursor.imgy=e.pixel[1];objposicaocursor.telax=e.pixel[0]+pos[0];objposicaocursor.telay=e.pixel[1]+pos[1];var viewResolution=(i3geoOL.getView().getResolution());if(i3GEO.Interface.INFOOVERLAY!=""){i3GEO.Interface.INFOOVERLAY.getElement().innerHTML="";i3GEO.Interface.INFOOVERLAY.getElement().style.visibility="hidden"}for(var k in i3GEO.Interface.LAYERSUTFGRID){if(!i3GEO.arvoreDeCamadas.CAMADASINDEXADAS[k.replace("_utfgrid","")]){i3GEO.Interface.LAYERSUTFGRID[k]=null}else{if(i3GEO.Interface.LAYERSUTFGRID[k]&&i3GEO.Interface.LAYERSUTFGRID[k].getVisible()){i3GEO.Interface.LAYERSUTFGRID[k].getSource().forDataAtCoordinateAndResolution(e.coordinate,viewResolution,function(data){var ei=i3GEO.Interface.INFOOVERLAY.getElement();if(data){ei.style.visibility="visible";ei.innerHTML+="<span style='display:block;'>"+data.text+"<span>";i3GEO.Interface.INFOOVERLAY.setPosition(e.coordinate);i3GEO.eventos.mouseOverData()}else if(ei.innerHTML==""){ei.style.visibility="hidden";i3GEO.Interface.INFOOVERLAY.setPosition(undefined);i3GEO.eventos.mouseOutData()}})}}}});i3geoOL.on("touchend",function(e){e.preventDefault();calcCoord(e);if(i3GEO.eventos.cliquePerm.status===true&&i3GEO.eventos.CONTATOUCH<10){i3GEO.eventos.mouseupMapa(e)}i3GEO.eventos.cliquePerm.status=true;i3GEO.eventos.CONTATOUCH=0;i3GEO.Interface.STATUS.pan=false})},ativaBotoes:function(){},recalcPar:function(){i3GEOtouchesPosMapa="";var bounds=i3geoOL.getExtent().toBBOX().split(","),escalaAtual=i3geoOL.getScale();i3GEO.parametros.mapexten=bounds[0]+" "+bounds[1]+" "+bounds[2]+" "+bounds[3];i3GEO.parametros.mapscale=escalaAtual;i3GEO.parametros.pixelsize=i3geoOL.getView().getResolution();i3GEO.navega.atualizaEscalaNumerica(parseInt(escalaAtual,10));if(i3GEO.parametros.mapscale!==escalaAtual){i3GEO.arvoreDeCamadas.atualizaFarol(escalaAtual)}},zoom2ext:function(ext){var m,v;if(!ext){ext=i3GEO.parametros.extentTotal}ext=i3GEO.util.extGeo2OSM(ext);m=ext.split(" ");m=[m[0]*1,m[1]*1,m[2]*1,m[3]*1];v=i3geoOL.getView();v.fit(m,i3geoOL.getSize());i3GEO.eventos.cliquePerm.status=true},pan2ponto:function(x,y){if(i3GEO.Interface.openlayers.googleLike===true){var metrica;if(x<180&&x>-180){metrica=ol.proj.transform([x,y],'EPSG:4326','EPSG:3857');x=metrica[0];y=metrica[1]}}i3geoOL.panTo(x,y)}},googlemaps:{ESTILOS:{'Red':[{featureType:'all',stylers:[{hue:'#ff0000'}]}],'Countries':[{featureType:'all',stylers:[{visibility:'off'}]},{featureType:'water',stylers:[{visibility:'on'},{lightness:-100}]}],'Night':[{featureType:'all',stylers:[{invert_lightness:'true'}]}],'Blue':[{featureType:'all',elementType:'geometry',stylers:[{hue:'#0000b0'},{invert_lightness:'true'},{saturation:-30}]}],'Greyscale':[{featureType:'all',stylers:[{saturation:-100},{gamma:0.50}]}],'No roads':[{featureType:'road',stylers:[{visibility:'off'}]}],'Mixed':[{featureType:'landscape',stylers:[{hue:'#00dd00'}]},{featureType:'road',stylers:[{hue:'#dd0000'}]},{featureType:'water',stylers:[{hue:'#000040'}]},{featureType:'poi.park',stylers:[{visibility:'off'}]},{featureType:'road.arterial',stylers:[{hue:'#ffff00'}]},{featureType:'road.local',stylers:[{visibility:'off'}]}],'Chilled':[{featureType:'road',elementType:'geometry',stylers:[{'visibility':'simplified'}]},{featureType:'road.arterial',stylers:[{hue:149},{saturation:-78},{lightness:0}]},{featureType:'road.highway',stylers:[{hue:-31},{saturation:-40},{lightness:2.8}]},{featureType:'poi',elementType:'label',stylers:[{'visibility':'off'}]},{featureType:'landscape',stylers:[{hue:163},{saturation:-26},{lightness:-1.1}]},{featureType:'transit',stylers:[{'visibility':'off'}]},{featureType:'water',stylers:[{hue:3},{saturation:-24.24},{lightness:-38.57}]}]},ESTILOPADRAO:"",MAPOPTIONS:{scaleControl:true,mapTypeControlOptions:{position:1}},OPACIDADE:0.8,TIPOMAPA:"terrain",ZOOMSCALE:[591657550,295828775,147914387,73957193,36978596,18489298,9244649,4622324,2311162,1155581,577790,288895,144447,72223,36111,18055,9027,4513,2256,1128],PARAMETROSLAYER:"&TIPOIMAGEM="+i3GEO.configura.tipoimagem,posfixo:0,BALAOPROP:{url:"",templateModal:"",removeAoAdicionar:true,modal:false,simple:true,classeCadeado:"i3GEOiconeAberto",baloes:[]},grade:function(){return false},barraProgressoStart:function(){var p=$i("i3GEOprogressoCamadas");if(p){p.style.width="100%"}},barraProgressoStop:function(){var p=$i("i3GEOprogressoCamadas"),n=0,d=0;if(p){n=i3GeoMap.overlayMapTypes.length;d=parseInt(p.style.width,10);if(d<10||n==0){p.style.width="0%"}else{p.style.width=d-(100/n)+"%";if(d-(100/n)<0){p.style.width="0%"}}}},zoomli:function(){if(DetectaMobile("DetectMobileLong")){i3GEO.janela.tempoMsg($trad("x70"))}else{i3GEO.janela.tempoMsg($trad("zoomliCtrl"))}},getZoom:function(){return i3GeoMap.getZoom()},removeBaloes:function(){var p=i3GEO.Interface.googlemaps.BALAOPROP.baloes,n=p.length,i;for(i=0;i<n;i++){p[i].close()}p=[]},balao:function(texto,completo,x,y){var temp,elem,b,c,p;if(x===null||y===null){return}p=i3GEO.Interface.googlemaps.BALAOPROP;if(p.removeAoAdicionar===true){i3GEO.Interface.googlemaps.removeBaloes()}temp=document.createElement("div");temp.className="i3GEOCabecalhoInfoWindow";temp.style.top="0px";elem=document.createElement("img");elem.src=i3GEO.configura.locaplic+"/imagens/branco.gif";elem.className=p.classeCadeado;elem.onclick=function(){if(p.classeCadeado==="i3GEOiconeAberto"){p.classeCadeado="i3GEOiconeFechado"}else{p.classeCadeado="i3GEOiconeAberto"}this.className=p.classeCadeado;p.removeAoAdicionar=!p.removeAoAdicionar};temp.appendChild(elem);elem=document.createElement("img");elem.src=i3GEO.configura.locaplic+"/imagens/branco.gif";elem.className="i3GEOiconeFerramentas";elem.style.marginLeft="5px";elem.onclick=function(){i3GEO.janela.prompt($trad("tolerancia"),function(){i3GEO.configura.ferramentas.identifica.resolution=$i("i3GEOjanelaprompt").value},i3GEO.configura.ferramentas.identifica.resolution)};temp.appendChild(elem);elem=document.createElement("img");elem.src=i3GEO.configura.locaplic+"/imagens/branco.gif";elem.className="i3GEOiconeMais";elem.style.marginLeft="7px";elem.onclick=function(){i3GEO.mapa.dialogo.cliqueIdentificaDefault(x,y);return false};temp.appendChild(elem);c=document.createElement("div");c.innerHTML=texto;e=document.createElement("div");e.appendChild(temp);e.appendChild(c);b=new google.maps.InfoWindow({content:e,position:new google.maps.LatLng(y,x),pixelOffset:new google.maps.Size(0,-24)});b.open(i3GeoMap);p.baloes.push(b)},atualizaTema:function(retorno,tema){var indice=i3GEO.Interface.googlemaps.retornaIndiceLayer(tema),objtemas;i3GeoMap.overlayMapTypes.removeAt(indice);i3GEO.Interface.googlemaps.posfixo+=1;i3GEO.Interface.googlemaps.insereLayer(tema,indice);if(retorno===""){return}objtemas=i3GEO.arvoreDeCamadas.converteChaveValor2normal(retorno.data.temas);i3GEO.Interface.googlemaps.recalcPar();try{i3GEO.arvoreDeCamadas.atualiza(objtemas)}catch(e){i3GEO.arvoreDeCamadas.atualiza()}i3GEO.janela.fechaAguarde()},removeTodosLayers:function(){var nlayers=i3GEO.arvoreDeCamadas.CAMADAS.length,i,camada,indice;for(i=0;i<nlayers;i++){camada=i3GEO.arvoreDeCamadas.CAMADAS[i];indice=i3GEO.Interface.googlemaps.retornaIndiceLayer(camada.name);if(indice!==false){try{i3GeoMap.overlayMapTypes.removeAt(indice);i3GEO.pluginI3geo.removeCamada(camada.name)}catch(e){}}}},redesenha:function(){i3GEO.Interface.googlemaps.posfixo+=1;i3GEO.Interface.googlemaps.removeTodosLayers();i3GEO.Interface.googlemaps.criaLayers()},cria:function(w,h){var i,f,ins;google.maps.visualRefresh=true;posfixo="&nd=0";i=$i(i3GEO.Interface.IDCORPO);if(i){f=$i("googlemapsdiv");if(!f){ins='<div id=googlemapsdiv style="width:0px;height:0px;text-align:left;background-image:url('+i3GEO.configura.locaplic+'/imagens/i3geo1bw.jpg)"></div>';i.innerHTML=ins}f=$i("googlemapsdiv");if(w){f.style.width=w+"px";f.style.height=h+"px"}}i3GeoMap="";i3GEO.Interface.IDMAPA="googlemapsdiv"},ativaZoomBox:function(){i3GeoMap.enableKeyDragZoom({key:'ctrl'})},inicia:function(){var pol,ret,montaMapa;pol=i3GEO.parametros.mapexten;ret=pol.split(" ");if($i("i3GEOprogressoDiv")){$i("i3GEOprogressoDiv").style.display="block"}montaMapa=function(retorno){var sw,ne,estilo,dobra=$i("i3GEOdobraPagina");try{i3GeoMap=new google.maps.Map($i(i3GEO.Interface.IDMAPA),i3GEO.Interface.googlemaps.MAPOPTIONS)}catch(e){alert(e);return}if(i3GEO.Interface.googlemaps.ESTILOS&&i3GEO.Interface.googlemaps.ESTILOPADRAO!=""){estilo=i3GEO.Interface.googlemaps.ESTILOS[i3GEO.Interface.googlemaps.ESTILOPADRAO];i3GeoMap.mapTypes.set(i3GEO.Interface.googlemaps.ESTILOPADRAO,new google.maps.StyledMapType(estilo,{name:i3GEO.Interface.googlemaps.ESTILOPADRAO}))}else{i3GeoMap.setMapTypeId(i3GEO.Interface.googlemaps.TIPOMAPA)}if(dobra){$i(i3GEO.Interface.IDMAPA).appendChild(dobra)}if(!i3GEO.Interface.googlemaps.MAPOPTIONS.center&&!i3GEO.Interface.googlemaps.MAPOPTIONS.zoom){sw=new google.maps.LatLng(ret[1],ret[0]);ne=new google.maps.LatLng(ret[3],ret[2]);i3GeoMap.fitBounds(new google.maps.LatLngBounds(sw,ne))}if(!$i("keydragzoom_script")){js=i3GEO.configura.locaplic+"/pacotes/google/keydragzoom.js";i3GEO.util.scriptTag(js,"i3GEO.Interface.googlemaps.ativaZoomBox()","keydragzoom_script")}i3GeoMapOverlay=new google.maps.OverlayView();i3GeoMapOverlay.draw=function(){};i3GEO.Interface.googlemaps.criaLayers();i3GeoMapOverlay.setMap(i3GeoMap);i3GEO.Interface.googlemaps.registraEventos();i3GEO.eventos.ativa($i(i3GEO.Interface.IDMAPA));if(i3GEO.Interface.STATUS.trocando===false){i3GEO.idioma.mostraSeletor()}if(i3GEO.Interface.STATUS.trocando===true&&$i(i3GEO.arvoreDeCamadas.IDHTML)){$i(i3GEO.arvoreDeCamadas.IDHTML).innerHTML=""}if(i3GEO.arvoreDeCamadas.ATIVATEMA===""){i3GEO.arvoreDeCamadas.ATIVATEMA="i3GEO.Interface.ligaDesliga(this)"}if(i3GEO.parametros.kmlurl!==""){i3GEO.Interface.googlemaps.adicionaKml(true,i3GEO.parametros.kmlurl)}if(jQuery.isFunction(i3GEO.finalizaAPI)){i3GEO.finalizaAPI.call()}else{if(i3GEO.finalizaAPI!=""){eval(i3GEO.finalizaAPI)}}google.maps.event.addListenerOnce(i3GeoMap,'idle',function(){var z=i3GeoMap.getZoom();if(z!=undefined){i3GeoMap.setZoom(parseInt(z,10)+1)}});i3GEO.coordenadas.ativaEventos()};i3GEO.php.googlemaps(montaMapa)},criaLayers:function(){var nlayers=i3GEO.arvoreDeCamadas.CAMADAS.length,i,camada,indice;for(i=0;i<nlayers;i++){camada=i3GEO.arvoreDeCamadas.CAMADAS[i];indice=i3GEO.Interface.googlemaps.retornaIndiceLayer(camada.name);if(!indice){if(camada.status!=0){if(camada.plugini3geo&&camada.plugini3geo!=""&&camada.plugini3geo.parametros!=undefined){i3GEO.pluginI3geo.inicia(camada);continue}else{i3GEO.Interface.googlemaps.insereLayer(camada.name,0,camada.cache)}}i3GEO.Interface.aposAdicNovaCamada(camada)}}i3GEO.Interface.googlemaps.recalcPar()},criaImageMap:function(nomeLayer,cache){var i3GEOTileO="";if(cache=="undefined"||cache==undefined){cache=""}i3GEOTileO=new google.maps.ImageMapType({getTileUrl:function(coord,zoom){var url=i3GEO.configura.locaplic+"/classesphp/mapa_googlemaps.php?"+"cache="+cache+"&Z="+zoom+"&X="+coord.x+"&Y="+coord.y+"&layer="+nomeLayer+i3GEO.Interface.googlemaps.PARAMETROSLAYER+'&r='+Math.random();return url+'&nd='+i3GEO.Interface.googlemaps.posfixo},tileSize:new google.maps.Size(256,256),isPng:true,name:nomeLayer});if($i("i3GEOprogressoCamadas")){google.maps.event.addListener(i3GEOTileO,'tilesloaded',function(){i3GEO.Interface.googlemaps.barraProgressoStop()})}return i3GEOTileO},bbox2mercator:function(bbox){var c=bbox.split(" "),p1,p2;p1=i3GEO.Interface.googlemaps.geo2mercator(c[0],c[1]);p2=i3GEO.Interface.googlemaps.geo2mercator(c[2],c[3]);return p1.x+" "+p1.y+" "+p2.x+" "+p2.y},geo2mercator:function(x,y){var source="+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs",dest="+title= Google Mercator EPSG:900913 +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs",p=new Proj4js.Point(parseInt(x,10),parseInt(y,10));Proj4js.defs["WGS84"]=source;Proj4js.defs["EPSG:900913"]=dest;source=new Proj4js.Proj('WGS84');dest=new Proj4js.Proj('EPSG:900913');Proj4js.transform(source,dest,p);return p},insereLayer:function(nomeLayer,indice,cache){if(i3GEO.pluginI3geo.existeObjeto(nomeLayer)===false){if($i("i3GEOprogressoCamadas")){i3GEO.Interface.googlemaps.barraProgressoStart()}var i=i3GEO.Interface.googlemaps.criaImageMap(nomeLayer,cache);i3GeoMap.overlayMapTypes.insertAt(indice,i)}},registraEventos:function(){i3GEOtouchesPosMapa="";modoAtual="";google.maps.event.addListener(i3GeoMap,"dragstart",function(){modoAtual="move";i3GEO.eventos.cliquePerm.status=false});google.maps.event.addListener(i3GeoMap,"dragend",function(){var xy;i3GEO.Interface.googlemaps.recalcPar();i3GEO.eventos.navegaMapa();i3GEO.util.escondePin();i3GEO.navega.registraExt(i3GEO.parametros.mapexten);i3GEO.Interface.googlemaps.barraProgressoStop()});google.maps.event.addListener(i3GeoMap,"tilesloaded",function(){i3GEO.Interface.googlemaps.recalcPar();i3GEO.navega.registraExt(i3GEO.parametros.mapexten);i3GEO.Interface.googlemaps.barraProgressoStop()});google.maps.event.addListener(i3GeoMap,'idle',function(){i3GEO.Interface.googlemaps.barraProgressoStop()});google.maps.event.addListener(i3GeoMap,"bounds_changed",function(){i3GEO.Interface.googlemaps.barraProgressoStart();i3GEO.Interface.googlemaps.recalcPar();i3GEO.eventos.navegaMapa()});google.maps.event.addListener(i3GeoMap,"mousemove",function(ponto){if(i3GEOtouchesPosMapa===""){i3GEOtouchesPosMapa=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDMAPA))}var teladms,tela,pos=i3GEOtouchesPosMapa;if(modoAtual==="move"){return}ponto=ponto.latLng;teladms=i3GEO.calculo.dd2dms(ponto.lng(),ponto.lat());tela=i3GeoMapOverlay.getProjection().fromLatLngToContainerPixel(ponto);objposicaocursor={ddx:ponto.lng(),ddy:ponto.lat(),dmsx:teladms[0],dmsy:teladms[1],imgx:tela.x,imgy:tela.y,telax:tela.x+pos[0],telay:tela.y+pos[1]}})},retornaIndiceLayer:function(nomeLayer){var i=false;try{i3GeoMap.overlayMapTypes.forEach(function(elemento,number){if(elemento.name===nomeLayer){i=number}});return i}catch(e){return false}},retornaObjetoLayer:function(nomeLayer){var i=false;try{i3GeoMap.overlayMapTypes.forEach(function(elemento,number){if(elemento.name===nomeLayer){i=elemento}});return i}catch(e){return false}},retornaDivLayer:function(nomeLayer){var i,divmapa=$i("googlemapsdiv"),divimg,n;divimg=divmapa.getElementsByTagName("img");n=divimg.length;if(divimg&&n>0){for(i=0;i<n;i++){if(divimg[i].src.search("&layer="+nomeLayer+"&")>0){return divimg[i].parentNode.parentNode.parentNode}}}return false},ligaDesliga:function(obj){var plugin,indice,temp,desligar="",ligar="",n,i,lista=[],listatemp;indice=i3GEO.Interface.googlemaps.retornaIndiceLayer(obj.value);temp=function(){i3GEO.legenda.atualiza()};plugin=i3GEO.pluginI3geo.existeObjeto(obj.value);if(obj.checked&&(!indice||plugin===true)){ligar=obj.value;listatemp=i3GEO.arvoreDeCamadas.listaLigadosDesligados()[0];n=i3GEO.arvoreDeCamadas.CAMADAS.length;for(i=0;i<n;i++){if(i3GEO.util.in_array(i3GEO.arvoreDeCamadas.CAMADAS[i].name,listatemp)){lista.push(i3GEO.arvoreDeCamadas.CAMADAS[i].name)}}lista.reverse();if(plugin===false){n=lista.length;indice=0;for(i=0;i<n;i++){if(lista[i]==obj.value){indice=i}}i3GEO.Interface.googlemaps.insereLayer(obj.value,(indice))}else{i3GEO.pluginI3geo.ligaCamada(obj.value)}i3GEO.arvoreDeCamadas.alteraPropCamadas("status","2",obj.value)}else{if(plugin===true){desligar=obj.value;i3GEO.arvoreDeCamadas.alteraPropCamadas("status","0",obj.value);i3GEO.pluginI3geo.desligaCamada(obj.value)}else if(indice!==false){desligar=obj.value;i3GEO.arvoreDeCamadas.alteraPropCamadas("status","0",obj.value);i3GeoMap.overlayMapTypes.removeAt(indice)}}if(desligar!==""||ligar!==""){i3GEO.php.ligatemas(temp,desligar,ligar)}},bbox:function(){var bd,so,ne,bbox;bd=i3GeoMap.getBounds();so=bd.getSouthWest();ne=bd.getNorthEast();bbox=so.lng()+" "+so.lat()+" "+ne.lng()+" "+ne.lat();return(bbox)},ativaBotoes:function(){},aplicaOpacidade:function(opacidade,layer){var nlayers=i3GEO.arvoreDeCamadas.CAMADAS.length,i,camada,div;if(!layer){layer=""}for(i=0;i<nlayers;i++){camada=i3GEO.arvoreDeCamadas.CAMADAS[i];if(camada&&camada.name){div=i3GEO.Interface.googlemaps.retornaDivLayer(camada.name);if(div){if(layer==""||layer==camada.name){$(div).css("opacity",opacidade)}}}}},mudaOpacidade:function(valor){i3GEO.Interface.googlemaps.OPACIDADE=valor;i3GEO.Interface.googlemaps.redesenha()},recalcPar:function(){i3GEOtouchesPosMapa="";try{var sw,ne,escalaAtual=i3GEO.parametros.mapscale;sw=i3GeoMap.getBounds().getSouthWest();ne=i3GeoMap.getBounds().getNorthEast();i3GEO.parametros.mapexten=sw.lng()+" "+sw.lat()+" "+ne.lng()+" "+ne.lat();i3GEO.parametros.mapscale=i3GEO.Interface.googlemaps.calcescala();sw=i3GeoMapOverlay.getProjection().fromContainerPixelToLatLng(new google.maps.Point(0,1));ne=i3GeoMapOverlay.getProjection().fromContainerPixelToLatLng(new google.maps.Point(1,0));i3GEO.parametros.pixelsize=sw.lng()-ne.lng();if(i3GEO.parametros.pixelsize<0){i3GEO.parametros.pixelsize=i3GEO.parametros.pixelsize*-1}if(i3GEO.parametros.mapscale!==escalaAtual&&escalaAtual!==0){i3GEO.arvoreDeCamadas.atualizaFarol(i3GEO.parametros.mapscale)}}catch(e){i3GEO.parametros.mapexten="0 0 0 0";i3GEO.parametros.mapscale=0}},calcescala:function(){var zoom=i3GeoMap.getZoom();return(i3GEO.Interface.googlemaps.ZOOMSCALE[zoom])},escala2nzoom:function(escala){var n,i;n=i3GEO.Interface.googlemaps.ZOOMSCALE.length;for(i=0;i<n;i++){if(i3GEO.Interface.googlemaps.ZOOMSCALE[i]<escala){return(i)}}},zoom2extent:function(mapexten){var re=new RegExp(",","g"),pol=mapexten.replace(re," "),ret=pol.split(" "),sw=new google.maps.LatLng(ret[1],ret[0]),ne=new google.maps.LatLng(ret[3],ret[2]);i3GeoMap.fitBounds(new google.maps.LatLngBounds(sw,ne))},zoom2ext:function(mapexten){i3GEO.Interface.googlemaps.zoom2extent(mapexten)},pan2ponto:function(x,y){i3GeoMap.panTo(new google.maps.LatLng(y,x))},adicionaKml:function(pan,url,titulo,ativo){var ngeoxml,i;if(!$i("arvoreCamadasKml")){i3GEO.Interface.googlemaps.criaArvoreKML()}ngeoxml="geoXml_"+i3GEO.mapa.GEOXML.length;if(arguments.length===1){i=$i("i3geo_urlkml");if(i){url=i.value}else{url=""}titulo=ngeoxml;ativo=true}if(arguments.length===2){titulo=ngeoxml;ativo=true}if(url===""){return}i3GEO.mapa.GEOXML.push(ngeoxml);i3GEO.Interface.googlemaps.adicionaNoArvoreGoogle(url,titulo,ativo,ngeoxml)},adicionaListaKml:function(){var monta=function(retorno){var raiz,nraiz,i;raiz=retorno.data.canais;nraiz=raiz.length;for(i=0;i<nraiz;i++){i3GEO.Interface.googlemaps.adicionaKml(false,raiz[i].link,raiz[i].title,false)}};i3GEO.php.listaRSSwsARRAY(monta,"KML")},adicionaNoArvoreGoogle:function(url,nomeOverlay,ativo,id){var node,d,nodekml;if(!$i("arvoreCamadasKml")){i3GEO.Interface.googlemaps.criaArvoreKML()}if(arguments.length===2){ativo=true;id=nomeOverlay}if(arguments.length===2){id=nomeOverlay}node=i3GEO.Interface.googlemaps.ARVORE.getNodeByProperty("idkml","raiz");html="<input onclick='i3GEO.Interface.googlemaps.ativaDesativaCamadaKml(this,\""+url+"\")' class=inputsb style='cursor:pointer;' type='checkbox' value='"+id+"'";if(ativo===true){html+=" checked "}html+="/>";if(navm){estilo="cursor:default;vertical-align:35%;padding-top:0px;"}else{estilo="cursor:default;vertical-align:top;"}html+="&nbsp;<span style='"+estilo+"'>"+nomeOverlay+"</span>";d={html:html};nodekml=new YAHOO.widget.HTMLNode(d,node,true,true);nodekml.enableHighlight=false;nodekml.isleaf=true;i3GEO.Interface.googlemaps.ARVORE.draw();i3GEO.Interface.googlemaps.ARVORE.collapseAll();node.expand();if(ativo===true){eval(id+" = new google.maps.KmlLayer('"+url+"',{map:i3GeoMap,preserveViewport:true});")}},criaArvoreKML:function(){var arvore,a,root,titulo,d,node;arvore=$i("arvoreCamadasKml");if(!arvore){d=document.createElement("div");d.id="arvoreCamadasKml";d.style.top="40px";a=$i(i3GEO.arvoreDeCamadas.IDHTML);if(a){a.parentNode.appendChild(d)}else{return}}i3GEO.Interface.googlemaps.ARVORE=new YAHOO.widget.TreeView("arvoreCamadasKml");root=i3GEO.Interface.googlemaps.ARVORE.getRoot();titulo="<table><tr><td><b>Kml</b></td></tr></table>";d={html:titulo,idkml:"raiz"};node=new YAHOO.widget.HTMLNode(d,root,true,true);node.enableHighlight=false},ativaDesativaCamadaKml:function(obj,url){if(!obj.checked){eval(obj.value+".setMap(null);")}else{eval(obj.value+" = new google.maps.KmlLayer(url,{map:i3GeoMap,preserveViewport:true});")}},alteraParametroLayers:function(parametro,valor){parametro=parametro.toUpperCase();var reg=new RegExp(parametro+"([=])+([a-zA-Z0-9_]*)");i3GEO.Interface.googlemaps.PARAMETROSLAYER=i3GEO.Interface.googlemaps.PARAMETROSLAYER.replace(reg,"");i3GEO.Interface.googlemaps.PARAMETROSLAYER+="&"+parametro+"="+valor;i3GEO.Interface.googlemaps.redesenha()}}};
//
//compactados/mapa_compacto.js
if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.mapa={BALAOATIVO:true,OPENTIPIFEMPTY:true,TEMASINICIAISLIGADOS:"",TEMASINICIAIS:"",GEOXML:[],limpasel:function(){i3GEO.php.limpasel(function(retorno){i3GEO.atualiza();i3GEO.Interface.atualizaMapa()},"")},ativaAutoResize:function(){var ativo=true;window.onresize=function(){var Dw,Dh;Dw=window.innerWidth;Dh=window.innerHeight;i3GEO.tamanhodoc=[Dw,Dh];if(ativo===true){setTimeout(function(){i3GEO.reCalculaTamanho();i3GEO.guias.abreFecha("fecha");ativo=true},2000)}ativo=false}},ativaIdentifica:function(){i3GEO.eventos.MOUSECLIQUE=["i3GEO.mapa.dialogo.cliqueIdentificaDefault()"];i3GEO.eventos.adicionaEventos("MOUSECLIQUEPERM",["i3GEO.mapa.dialogo.cliqueIdentificaDefault()"]);i3GEO.eventos.removeEventos("MOUSECLIQUEPERM",["i3GEO.mapa.dialogo.verificaTipDefault()"]);i3GEO.eventos.cliquePerm.ativa()},ativaIdentificaBalao:function(){i3GEO.eventos.removeEventos("MOUSECLIQUEPERM",["i3GEO.mapa.dialogo.cliqueIdentificaDefault()"]);i3GEO.eventos.MOUSECLIQUE=["i3GEO.mapa.dialogo.verificaTipDefault()"];i3GEO.eventos.cliquePerm.ativa()},ativaTema:function(codigo){if(codigo){i3GEO.temaAtivo=codigo}},ativaLogo:function(){if(i3GEO.Interface.ATUAL==="googlemaps"){alert($trad("x21"));return}i3GEO.php.ativalogo(i3GEO.atualiza);var cr=$i("i3GEOcopyright");if(cr){if(cr.style.display==="block"){cr.style.display="none"}else{cr.style.display="block"}}},verifica:function(retorno){try{if(retorno.data){retorno=retorno.data}if(retorno.variaveis){retorno=retorno.variaveis}if((retorno==="erro")||(typeof(retorno)==='undefined')){i3GEO.janela.fechaAguarde();i3GEO.mapa.recupera.inicia()}i3GEO.mapa.recupera.TENTATIVA=0}catch(e){if(i3GEO.Interface.ATUAL==="openlayers"||i3GEO.Interface.ATUAL==="googlemaps"){i3GEO.janela.fechaAguarde();return}if(this.recupera.TENTATIVA===0){i3GEO.janela.tempoMsg("Erro no mapa. Sera feita uma tentativa de recuperacao.");i3GEO.mapa.recupera.inicia()}else{i3GEO.janela.tempoMsg("Recuperacao impossivel. Sera feita uma tentativa de reiniciar o mapa.");if(this.recupera.TENTATIVA===1){this.recupera.TENTATIVA=2;i3GEO.php.reiniciaMapa(i3GEO.atualiza)}}}},recupera:{TENTATIVA:0,inicia:function(){i3GEO.janela.fechaAguarde();if(this.recupera&&this.recupera.TENTATIVA===0){this.recupera.TENTATIVA++;this.recupera.restaura()}},restaura:function(){i3GEO.php.recuperamapa(i3GEO.atualiza)}},legendaIMAGEM:{obtem:function(funcao){i3GEO.php.criaLegendaImagem(funcao)}},compactaLayerGrafico:function(){var geos=false,geometrias=[],n=0,i,g;if(i3GEO.editorOL&&i3GEO.desenho.layergrafico&&i3GEO.desenho.layergrafico.features){geos=i3GEO.desenho.layergrafico.features;n=geos.length;for(i=0;i<n;i++){g={"atributos":geos[i].attributes,"geometria":geos[i].geometry.toString()};geometrias.push(g)}}g=JSON.stringify(geometrias);return i3GEO.util.base64encode(g)},desCompactaLayerGrafico:function(geometrias){geometrias=JSON.parse(geometrias);if(geometrias.length>0){var inicia=function(){if(!i3GEO.desenho.layergrafico){i3GEO.editorOL.criaLayerGrafico()}i3GEO.editor[i3GEO.Interface.ATUAL].ativaPainel();var n=geometrias.length,i;for(i=0;i<n;i++){i3GEO.editorOL.adicionaFeatureWkt(geometrias[i].geometria,geometrias[i].atributos)}i3GEO.editorOL.sobeLayersGraficos()};if(!i3GEO.editorOL){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/classesjs/compactados/classe_editorol_compacto.js",inicia,"editorol.js",true)}}},restauraGraficos:function(graficos){if(graficos.length>0){var inicia=function(){i3GEOF.graficointerativo1.restauraGraficos(graficos)};i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/graficointerativo1/dependencias.php",inicia,"graficointerativo1",true)}},restauraTabelas:function(tabelas){if(tabelas.length>0){var inicia=function(){i3GEOF.tabela.restauraTabelas(tabelas)};i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/tabela/dependencias.php",inicia,"tabela",true)}},aplicaPreferencias:function(cookies){var props,nprops,i,temp=[],pint;if(!cookies){cookies=i3GEO.util.pegaDadosLocal("preferenciasDoI3Geo")}if(cookies){props=cookies.split("::");nprops=props.length;for(i=0;i<nprops;i++){try{temp=props[i].split("|");pint=parseInt(temp[1],10);if(temp[1]==='true'||temp[1]==='false'){if(temp[1]==='true'){temp[1]=true}if(temp[1]==='false'){temp[1]=false}eval(temp[0]+" = "+temp[1]+";")}else if(pint+"px"==temp[1]){eval(temp[0]+" = '"+temp[1]+"';")}else if($.isNumeric(pint)){eval(temp[0]+" = "+temp[1]+";")}else{eval(temp[0]+" = '"+temp[1]+"';")}}catch(e){}}}},dialogo:{listaLayersWms:function(servico){i3GEO.janela.cria("400px","300px",i3GEO.configura.locaplic+"/ferramentas/conectarwms/listalayers.php?servico="+servico,"","","<div class='i3GeoTituloJanela'>"+$trad("a4")+"<a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=28' ><b> </b></a></div>","i3GEO.conectarwms",false,"hd","","","",true)},wms:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.wms()","conectarwms","conectarwms","dependencias.php","i3GEOF.conectarwms.iniciaJanelaFlutuante()")},mascara:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.mascara()","mascara","mascara","dependencias.php","i3GEOF.mascara.iniciaJanelaFlutuante()")},html2canvas:function(obj){var temp=function(){i3GEOF.html2canvas.iniciaJanelaFlutuante(obj)};i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.html2canvas()","html2canvas","html2canvas","dependencias.php",temp)},wkt2layer:function(wkt,texto){var temp=function(){i3GEOF.wkt2layer.iniciaJanelaFlutuante(wkt,texto)};i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.wkt2layer()","wkt2layer","wkt2layer","dependencias.php",temp)},atalhosedicao:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.atalhosedicao()","atalhosedicao","atalhosedicao","dependencias.php","i3GEOF.atalhosedicao.iniciaJanelaFlutuante()")},geolocal:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.geolocal()","geolocal","geolocal","dependencias.php","i3GEOF.geolocal.iniciaJanelaFlutuante()")},listaDeMapasBanco:function(idonde){if(idonde){i3GEO.guias.CONFIGURA["mapas"].click.call(this,idonde);return}if(i3GEO.guias.CONFIGURA["mapas"]){var temp,janela,id="listaMapa"+Math.random();janela=i3GEO.janela.cria("800px","500px",i3GEO.configura.locaplic+"/mapas/indexnomenu.php","","","<span class='i3GeoTituloJanelaBsNolink' ></span></div>",id)}else{window.open(i3GEO.configura.locaplic+"/rss/rssmapas.php","_blank")}},congelaMapa:function(){var url="",idjanela=i3GEO.util.generateId(),cabecalho=function(){},titulo,minimiza=function(){i3GEO.janela.minimiza(idjanela)};if(i3GEO.Interface.ATUAL==="openlayers"||i3GEO.Interface.ATUAL==="googlemaps"){url=i3GEO.configura.locaplic+"/ferramentas/congelamapa/openlayers3.php?g_sid="+i3GEO.configura.sid+"&ext="+i3GEO.util.extOSM2Geo(i3GEO.parametros.mapexten);titulo="<span class='i3GeoTituloJanelaBsNolink' ></span></div>";i3GEO.janela.cria("520px","370px",url,"","",titulo,idjanela,false,"hd",cabecalho,minimiza,"","","","",false,"","123")}},metaestat:function(largura,altura,topo,esquerda,Interface,conexao){var temp=function(){i3GEOF.metaestat.MULTIPARAMETROS=true;if(Interface){i3GEOF.metaestat.INTERFACE=Interface}if(conexao){i3GEOF.metaestat.CONEXAODEFAULT=conexao}i3GEOF.metaestat.INTERFACE="flutuante";i3GEOF.metaestat.principal.inicia(null,largura,altura,topo,esquerda)};i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.metaestat()","metaestat","metaestat","dependencias.php",temp)},metaestatListaMapas:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.metaestatListaMapas()","metaestat","listamapas","listamapas.js","i3GEOF.listamapas.iniciaJanelaFlutuante()")},preferencias:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.preferencias()","preferencias","preferencias")},locregiao:function(largura,altura,topo,esquerda){var temp=function(){i3GEOF.locregiao.iniciaDicionario(largura,altura,topo,esquerda)};i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.locregiao()","metaestat","locregiao","locregiao.js",temp)},filtraregiao:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.filtraregiao()","metaestat","locregiao","locregiao.js","i3GEOF.locregiao.abreComFiltro()")},filtraperiodo:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.filtraperiodo()","filtraperiodo","filtraperiodo","dependencias.php","i3GEOF.filtraperiodo.iniciaJanelaFlutuante()")},animacao:function(){i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.animacao()","animacao","animacao","dependencias.php","i3GEOF.animacao.iniciaJanelaFlutuante()")},opacidade:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.opacidade()","opacidademapa","opacidademapa","dependencias.php","i3GEOF.opacidademapa.iniciaJanelaFlutuante()")},t3d:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.t3d()","3d","t3d")},imprimir:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.imprimir()","imprimir","imprimir","dependencias.php","i3GEOF.imprimir.iniciaJanelaFlutuante()")},mostraExten:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.mostraExten()","mostraexten","mostraExten","dependencias.php","i3GEOF.mostraExten.iniciaJanelaFlutuante()")},outputformat:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.outputformat()","outputformat","outputformat","dependencias.php","i3GEOF.outputformat.iniciaJanelaFlutuante()")},autoredesenha:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.autoredesenha()","opcoes_autoredesenha","opcoesTempo","dependencias.php","i3GEOF.opcoesTempo.iniciaJanelaFlutuante()")},salvaMapa:function(){if(i3GEO.parametros===""){i3GEO.janela.tempoMsg("Essa opcao nao pode ser ativada. Consulte o administrador do sistema. Mapfile nao esta exposto.");return}i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.salvaMapa()","salvamapa","salvaMapa","dependencias.php","i3GEOF.salvaMapa.iniciaJanelaFlutuante()")},carregaMapa:function(){i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.carregaMapa()","carregamapa","carregaMapa","dependencias.php","i3GEOF.carregaMapa.iniciaJanelaFlutuante()")},convertews:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.convertews()","convertews","converteMapaWS","dependencias.php","i3GEOF.converteMapaWS.iniciaJanelaFlutuante()")},convertekml:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.convertekml()","convertemapakml","converteMapaKml","dependencias.php","i3GEOF.converteMapaKml.iniciaJanelaFlutuante()")},queryMap:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.queryMap()","opcoes_querymap","opcoesQuery","dependencias.php","i3GEOF.opcoesQuery.iniciaJanelaFlutuante()")},template:function(){i3GEO.janela.cria("300px","400px",i3GEO.configura.locaplic+"/ferramentas/template/index.htm","","","<div class='i3GeoTituloJanela'>Template<a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=1&idajuda=8' ><b> </b></a></div>")},tamanho:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.tamanho()","opcoes_tamanho","opcoesTamanho","dependencias.php","i3GEOF.opcoesTamanho.iniciaJanelaFlutuante()")},tipoimagem:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.tipoimagem()","tipoimagem","tipoimagem","dependencias.php","i3GEOF.tipoimagem.iniciaJanelaFlutuante()")},corFundo:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.corFundo()","opcoes_fundo","opcoesFundo","dependencias.php","i3GEOF.opcoesFundo.iniciaJanelaFlutuante()")},opcoesEscala:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.opcoesEscala()","opcoes_escala","opcoesEscala","dependencias.php","i3GEOF.opcoesEscala.iniciaJanelaFlutuante()")},opcoesLegenda:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.opcoesLegenda()","opcoes_legenda","opcoesLegenda","dependencias.php","i3GEOF.opcoesLegenda.iniciaJanelaFlutuante()")},opcoesMapaRef:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.opcoesMapaRef()","opcoes_maparef","opcoesMaparef","dependencias.php","i3GEOF.opcoesMaparef.iniciaJanelaFlutuante()")},gradeCoord:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.gradeCoord()","gradecoord","gradeCoord","dependencias.php","i3GEOF.gradeCoord.iniciaJanelaFlutuante()")},cliqueTexto:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.cliqueTexto()","inseretxt","inseretxt","dependencias.php","i3GEOF.inseretxt.iniciaJanelaFlutuante()")},selecao:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.selecao()","selecao","selecao","dependencias.php","i3GEOF.selecao.iniciaJanelaFlutuante()")},cliquePonto:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.cliquePonto()","inserexy2","inserexy","dependencias.php","i3GEOF.inserexy.iniciaJanelaFlutuante()")},cliqueGrafico:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.cliqueGrafico()","inseregrafico","insereGrafico","dependencias.php","i3GEOF.insereGrafico.iniciaJanelaFlutuante()")},cliqueIdentificaDefault:function(x,y){if(i3GEO.eventos.cliquePerm.ativo===false){return}if(typeof(i3GEOF.identifica)==='undefined'){var js=i3GEO.configura.locaplic+"/ferramentas/identifica/dependencias.php",temp=function(){if(x){i3GEOF.identifica.criaJanelaFlutuante(x,y)}else{i3GEOF.identifica.criaJanelaFlutuante(objposicaocursor.ddx,objposicaocursor.ddy)}};i3GEO.util.scriptTag(js,temp,"i3GEOF.identifica_script")}else{if(x){i3GEOF.identifica.buscaDadosTema(i3GEO.temaAtivo,x,y)}else{i3GEOF.identifica.buscaDadosTema(i3GEO.temaAtivo,objposicaocursor.ddx,objposicaocursor.ddy)}return}},verificaTipDefault:function(e){if(i3GEO.mapa.BALAOATIVO==false){return}if(i3GEO.eventos.cliquePerm.ativo==false){return}if(i3GEO.eventos.cliquePerm.status===false){return}else{i3GEO.eventos.cliquePerm.status=false}var ntemas,etiquetas,j,x=objposicaocursor.ddx,y=objposicaocursor.ddy,temp;if(x===-1||y===-1){return}objposicaocursor.ddx=-1;objposicaocursor.ddy=-1;ntemas=i3GEO.arvoreDeCamadas.CAMADAS.length;etiquetas=false;for(j=0;j<ntemas;j+=1){if(i3GEO.arvoreDeCamadas.CAMADAS[j].etiquetas!==""||i3GEO.arvoreDeCamadas.CAMADAS[j].identifica=="SIM"){etiquetas=true}}if(etiquetas===false){return}if(i3GEO.Interface[i3GEO.Interface.ATUAL].BALAOPROP.url!=""&&i3GEO.Interface[i3GEO.Interface.ATUAL].BALAOPROP.templateModal==""){$.get(i3GEO.Interface[i3GEO.Interface.ATUAL].BALAOPROP.url+"&xx="+x+"&yy="+y,function(data){i3GEO.janela.closeMsg(data)});return}if(i3GEO.Interface[i3GEO.Interface.ATUAL].BALAOPROP.templateModal!=""){if(i3GEO.Interface[i3GEO.Interface.ATUAL].BALAOPROP.url!=""){var temp=i3GEO.Interface[i3GEO.Interface.ATUAL].BALAOPROP.url+"&xx="+x+"&yy="+y;temp=i3GEO.Interface[i3GEO.Interface.ATUAL].BALAOPROP.templateModal.replace("{{{url}}}",temp);i3GEO.janela.closeMsg(temp)}else{i3GEO.janela.closeMsg(i3GEO.Interface[i3GEO.Interface.ATUAL].BALAOPROP.templateModal)}return}temp=function(retorno){i3GEO.mapa.montaTip(retorno,x,y)};i3GEO.php.identifica3(temp,x,y,i3GEO.configura.ferramentas.identifica.resolution,"tip",i3GEO.configura.locaplic,i3GEO.configura.sid,"ligados",i3GEO.parametros.mapexten,"","sim")}},montaTip:function(retorno,xx,yy){var textoCompleto="",textoSimples="",textoTempCompleto="",textoTempSimples="",x,y,temp,n,mostra,res,temas,ntemas,titulo,tips,j,ntips,r,ds,nds,s,configura=i3GEO.configura,wkts=[];i3GEO.eventos.cliquePerm.status=true;mostra=false;if(retorno==""){}if(retorno.data){retorno=retorno.data;temp=retorno[0].xy.split(",");x=temp[0]*1;y=temp[1]*1}else{x=xx;y=yy;mostra=true;textoSimples=$trad("balaoVazio");textoCompleto="";wkt=[];if(i3GEO.Interface[i3GEO.Interface.ATUAL].BALAOPROP.openTipNoData==false){mostra=false}}if(retorno!==""){res="";ntemas=0;temas=retorno;if(temas){ntemas=temas.length}for(j=0;j<ntemas;j+=1){titulo=temas[j].nome;var temp1=[];$.each(temas[j].funcoesjs,function(key,value){if(value.tipo=="layer"){var parametros=[x,y,temas[j].tema];$.each(value.parametros,function(key1,value1){parametros.push(ds[s][value1].valor)});parametros="\""+parametros.join("\",\"")+"\"";temp1.push("<a class='toolTipBalaoFuncoes' href='javascript:void(0);' onclick='"+value.funcao+"("+parametros+")' >"+value.titulo+"</a><br>");if(value.script&&value.script!=""){i3GEO.util.scriptTag(value.script,"","funcaolayer"+value.funcao,false)}}});temp1=temp1.join(" ");titulo="<div class='toolTipBalaoTitulo'><b>"+titulo+"</b><br>"+temp1+"</div>";tips=temas[j].resultado.todosItens;ntips=tips.length;ins="";textoTempCompleto="";textoTempSimples="";ds=temas[j].resultado.dados;if(ds!==" "&&ds[0]&&ds[0]!=" "){try{nds=ds.length;for(s=0;s<nds;s+=1){textoTempCompleto+="<div class='toolTipBalaoTexto'>";textoTempSimples+="<div class='toolTipBalaoTexto'>";for(r=0;r<ntips;r+=1){try{temp="";var alias=ds[s][tips[r]].alias;var valor=ds[s][tips[r]].valor;var link=ds[s][tips[r]].link;var img=ds[s][tips[r]].img;var estilo="tooltip-"+temas[j].tema;if(valor!==""&&link===""){temp+="<span class='"+estilo+"'><label>"+alias+": </label>"+valor+"</span><br>"}if(valor!==""&&link!==""){temp+="<span class='"+estilo+"'><label>"+alias+" : </label><a style='color:blue;cursor:pointer' target=_blanck href='"+link+"' >"+valor+"</a></span><br>"}if(img!==""){temp+=img+"<br>"}if(ds[s][tips[r]].tip.toLowerCase()==="sim"){textoTempSimples+=temp}textoTempCompleto+=temp;mostra=true}catch(e){}}textoTempCompleto+="</div>";var temp1=[];$.each(temas[j].funcoesjs,function(key,value){if(value.tipo=="registro"){var parametros=[x,y,temas[j].tema];$.each(value.parametros,function(key1,value1){parametros.push(ds[s][value1].valor)});parametros="\""+parametros.join("\",\"")+"\"";temp1.push("<a class='toolTipBalaoFuncoes' href='javascript:void(0);' onclick='"+value.funcao+"("+parametros+")' >"+value.titulo+"</a><br>");if(value.script&&value.script!=""){i3GEO.util.scriptTag(value.script,"","funcaolayer"+value.funcao,false)}}});temp1=temp1.join(" ");textoTempSimples+=temp1+"</div>";if(ds[s].wkt&&ds[s].wkt.valor!=""){ds[s].tema=temas[j].tema;ds[s].titulo=titulo;wkts.push(ds[s])}}}catch(e){}}if(textoTempSimples!==""){textoCompleto+=titulo+textoTempCompleto;textoSimples+=titulo+textoTempSimples}}if(mostra===true){res=textoSimples;if(i3GEO.Interface[i3GEO.Interface.ATUAL].BALAOPROP.modal==true){if(i3GEO.Interface[i3GEO.Interface.ATUAL].BALAOPROP.simple==true){i3GEO.janela.closeMsg(textoSimples);return}else{i3GEO.janela.closeMsg(textoCompleto);return}}else{if(i3GEO.Interface[i3GEO.Interface.ATUAL].BALAOPROP.simple==true){i3GEO.Interface[i3GEO.Interface.ATUAL].balao(textoSimples,textoCompleto,x,y,true,true,wkts.length)}else{i3GEO.Interface[i3GEO.Interface.ATUAL].balao(textoCompleto,textoSimples,x,y)}}}}n=wkts.length;if(n>0){if(i3GEO.Interface.ATUAL!="openlayers"){return}i3GEO.desenho.openlayers.criaLayerGrafico();var g,format,f,idunico,c=i3GEO.desenho.layergrafico.getSource();format=new ol.format.WKT();for(r=0;r<n;r+=1){f=format.readFeatures(wkts[r].wkt.valor);f=f[0];f.setProperties({origem:"pin"});g=f.getGeometry();g=i3GEO.util.projGeo2OSM(g);f.setGeometry(g);f.setId(i3GEO.util.uid());i3GEO.editor.setStyleByTypeFeature(f);i3GEO.editor.sel.setPropertiesDefault(f);wkts[r].wkt="",f.setProperties({"fat":wkts[r]});c.addFeature(f)}}}};
//
//compactados/tema_compacto.js
if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.tema={TEMPORIZADORESID:{},ativaFerramentas:function(camada){if(camada.ferramentas&&camada.ferramentas!=""){var f=camada.ferramentas;if(f.tme&&f.tme.auto&&f.tme.auto.toLowerCase()==="sim"){i3GEO.tema.dialogo.tme(camada.name)}if(f.storymap&&f.storymap.auto&&f.storymap.auto.toLowerCase()==="sim"){i3GEO.tema.dialogo.storymap(camada.name)}if(f.animagif&&f.animagif.auto&&f.animagif.auto.toLowerCase()==="sim"){i3GEO.tema.dialogo.animagif(camada.name)}}},exclui:function(tema,confirma){if(confirma&&confirma===true){i3GEO.janela.confirma($trad("removerDoMapa"),300,$trad("x14"),"",function(){i3GEO.tema.exclui(tema)});return}try{i3GEO.pluginI3geo.removeCamada(tema)}catch(r){}var excluir=[tema];var camada=i3GEO.arvoreDeCamadas.CAMADASINDEXADAS[tema];$.each(i3GEO.arvoreDeCamadas.CAMADAS,function(index,v){if((camada.group!=""&&camada.group==v.group)||camada.name==v.group){excluir.push(v.name)}});i3GEO.php.excluitema(function(){i3GEO.atualiza()},excluir);i3GEO.mapa.ativaTema();i3GEO.temaAtivo=""},fonte:function(tema,popup,link){i3GEO.mapa.ativaTema(tema);if(!link){link=i3GEO.configura.locaplic+"/ferramentas/abrefontemapfile.php?tema="+tema}if(!popup){window.open(link)}else{i3GEO.janela.cria((i3GEO.parametros.w/2)+25+"px",(i3GEO.parametros.h/2)+18+"px",link,"","","<div class='i3GeoTituloJanela'>Metadata</div>","metadata"+tema)}},sobe:function(tema){i3GEO.php.sobetema(function(retorno){i3GEO.atualiza(retorno);if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.ordenaLayers()}},tema)},desce:function(tema){i3GEO.php.descetema(function(retorno){i3GEO.atualiza(retorno);if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.ordenaLayers()}},tema)},zoom:function(tema){i3GEO.mapa.ativaTema(tema);i3GEO.php.zoomtema(i3GEO.atualiza,tema)},zoomsel:function(tema){i3GEO.mapa.ativaTema(tema);i3GEO.php.zoomsel(i3GEO.atualiza,tema)},limpasel:function(tema){i3GEO.mapa.ativaTema(tema);i3GEO.php.limpasel(function(retorno){i3GEO.atualiza(retorno);i3GEO.Interface.atualizaTema(retorno,tema)},tema)},mudatransp:function(idtema,valor){i3GEO.mapa.ativaTema(idtema);if(!valor){if($i("tr"+idtema)){valor=$i("tr"+idtema).value}}if(valor!==""){i3GEO.php.mudatransp(function(retorno){i3GEO.atualiza(retorno);i3GEO.Interface.atualizaTema(retorno,idtema)},idtema,valor)}else{i3GEO.janela.tempoMsg($trad("x16"))}},invertestatuslegenda:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.php.invertestatuslegenda(function(retorno){i3GEO.atualiza(retorno);i3GEO.arvoreDeCamadas.atualiza()},idtema)},alteracorclasse:function(idtema,idclasse,rgb,objImg){var w=25,h=25,temp;if(objImg&&objImg.style&&objImg.style.width){w=parseInt(objImg.style.width,10);h=parseInt(objImg.style.height,10)}i3GEO.mapa.ativaTema(idtema);temp=function(retorno){if(objImg){objImg.src=retorno.data}else{i3GEO.legenda.CAMADAS="";i3GEO.atualiza()}i3GEO.Interface.atualizaTema("",idtema)};i3GEO.php.aplicaCorClasseTema(temp,idtema,idclasse,rgb,w,h)},mudanome:function(idtema,valor){i3GEO.mapa.ativaTema(idtema);if(!valor){return}if(valor!==""){i3GEO.php.mudanome(i3GEO.atualiza,idtema,valor)}else{i3GEO.janela.tempoMsg($trad("x18"))}},copia:function(idtema){i3GEO.php.copiatema(i3GEO.atualiza,idtema)},contorno:function(idtema){var temp=function(){i3GEO.atualiza();i3GEO.Interface.atualizaTema("",idtema);i3GEO.arvoreDeCamadas.atualizaLegenda(idtema)};i3GEO.php.contorno(temp,idtema)},temporizador:function(idtema,tempo){var t;if(!tempo){if($i("temporizador"+idtema)){tempo=$i("temporizador"+idtema).value}else{tempo=0}}if(tempo!=""&&parseInt(tempo,10)>0){t=function(){if(!$i("arrastar_"+idtema)){delete(i3GEO.tema.TEMPORIZADORESID[idtema]);return}i3GEO.Interface.atualizaTema("",idtema)};i3GEO.tema.TEMPORIZADORESID[idtema]={tempo:tempo,idtemporizador:setInterval(t,parseInt(tempo,10)*1000)}}else{try{window.clearInterval(i3GEO.tema.TEMPORIZADORESID[idtema].idtemporizador);delete(i3GEO.tema.TEMPORIZADORESID[idtema])}catch(e){}}},dialogo:{animagif:function(tema){if(!tema){tema=""}var temp=function(){i3GEOF.animagif.iniciaJanelaFlutuante(tema)};i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.animagif()","animagif","animagif","dependencias.php",temp)},storymap:function(tema){if(!tema){tema=""}var temp=function(){i3GEOF.storymap.iniciaJanelaFlutuante(tema)};i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.storymap()","storymap","storymap","dependencias.php",temp)},tme:function(tema){if(!tema){tema=""}var temp=function(){i3GEOF.tme.iniciaJanelaFlutuante(tema)};i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.tme()","tme","tme","dependencias.php",temp)},mostraWms:function(tema){i3GEO.janela.mensagemSimples(i3GEO.configura.locaplic+"/ogc.php?tema="+tema,"WMS url")},comentario:function(tema){i3GEO.janela.cria("530px","330px",i3GEO.configura.locaplic+"/ferramentas/comentarios/index.php?tema="+tema+"&g_sid="+i3GEO.configura.sid+"&locaplic="+i3GEO.configura.locaplic,"","","<img src='"+i3GEO.configura.locaplic+"/imagens/player_volta.png' style=cursor:pointer onclick='javascript:history.go(-1)'><span style=position:relative;top:-2px; > "+$trad("x19")+" "+tema+"</span><a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=7&idajuda=68' ><b> </b></a>","comentario"+Math.random())},cortina:function(idtema){if(idtema&&idtema!=""){var t=i3GEO.arvoreDeCamadas.pegaTema(idtema);if(t.status<2){i3GEO.janela.tempoMsg($trad("deveLigada"));return}i3GEO.mapa.ativaTema(idtema)}i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.cortina()","cortina","cortina","dependencias.php","i3GEOF.cortina.iniciaJanelaFlutuante()")},mmscale:function(tema){i3GEO.mapa.ativaTema(tema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.mmscale()","mmscale","mmscale","dependencias.php","i3GEOF.mmscale.iniciaJanelaFlutuante()")},atalhoscamada:function(tema){i3GEO.mapa.ativaTema(tema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.atalhoscamada()","atalhoscamada","atalhoscamada","dependencias.php","i3GEOF.atalhoscamada.iniciaJanelaFlutuante()")},abreKml:function(tema,tipo){if(arguments.lenght===1){tipo="kml"}if(typeof(i3GEOF.converteKml)==='undefined'){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/convertekml/index.js","i3GEOF.converteKml.criaJanelaFlutuante('"+tema+"','"+tipo+"')","i3GEOF.converteKml_script")}else{i3GEOF.converteKml.criaJanelaFlutuante(tema,tipo)}},salvaMapfile:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.salvaMapfile()","salvamapfile","salvamapfile")},graficotema:function(idtema,propriedades){if(idtema&&idtema!=""){var t=i3GEO.arvoreDeCamadas.pegaTema(idtema);if(t.status<2){i3GEO.janela.tempoMsg($trad("deveLigada"));return}}i3GEO.mapa.ativaTema(idtema);var temp=function(){i3GEOF.graficoTema.iniciaJanelaFlutuante(propriedades)};i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.graficotema()","graficotema","graficoTema","dependencias.php",temp)},toponimia:function(idtema){if(idtema&&idtema!=""){var t=i3GEO.arvoreDeCamadas.pegaTema(idtema);if(t.status<2){i3GEO.janela.tempoMsg($trad("deveLigada"));return}}i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.toponimia()","toponimia","toponimia","dependencias.php","i3GEOF.toponimia.iniciaJanelaFlutuante()")},filtro:function(idtema,modoCalculadora,idRetorno){if(idtema&&idtema!=""){var t=i3GEO.arvoreDeCamadas.pegaTema(idtema);if(t.status<2){i3GEO.janela.tempoMsg($trad("deveLigada"));return}}i3GEO.mapa.ativaTema(idtema);var temp=function(){i3GEOF.filtro.iniciaJanelaFlutuante(modoCalculadora,idRetorno)};i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.filtro()","filtro","filtro","dependencias.php",temp)},procuraratrib:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.procuraratrib()","busca","busca","dependencias.php","i3GEOF.busca.iniciaJanelaFlutuante()")},tabela:function(idtema){if(idtema&&idtema!=""){var t=i3GEO.arvoreDeCamadas.pegaTema(idtema);if(t.status<2){i3GEO.janela.tempoMsg($trad("deveLigada"));return}}i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.tabela()","tabela","tabela","dependencias.php","i3GEOF.tabela.iniciaJanelaFlutuante()")},etiquetas:function(idtema){if(idtema&&idtema!=""){var t=i3GEO.arvoreDeCamadas.pegaTema(idtema);if(t.status<2){i3GEO.janela.tempoMsg($trad("deveLigada"));return}}i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.etiquetas()","etiqueta","etiqueta","dependencias.php","i3GEOF.etiqueta.iniciaJanelaFlutuante()")},funcaojstip:function(){i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.funcaojstip()","funcaojstip","funcaojstip","dependencias.php","i3GEOF.funcaojstip.iniciaJanelaFlutuante()")},editaLegenda:function(idtema){if(idtema&&idtema!=""){var t=i3GEO.arvoreDeCamadas.pegaTema(idtema);if(t.status<2){i3GEO.janela.tempoMsg($trad("deveLigada"));return}}i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.editaLegenda()","legenda","legenda","dependencias.php","i3GEOF.legenda.iniciaJanelaFlutuante()")},editaClasseLegenda:function(idtema,idclasse){var t=i3GEO.arvoreDeCamadas.pegaTema(idtema);if(t.status<2){i3GEO.janela.tempoMsg($trad("deveLigada"));return}i3GEO.mapa.ativaTema(idtema);var temp=function(){i3GEOF.legenda.aposIniciar=function(){i3GEOF.legenda.classe=0;i3GEOF.legenda.estilo=0;i3GEOF.legenda.editaSimbolo('i3GEOlegendaid_'+idtema+"-"+idclasse);i3GEOF.legenda.aposIniciar=function(){}};i3GEOF.legenda.iniciaJanelaFlutuante(idtema)};i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.editaLegenda()","legenda","legenda","dependencias.php",temp)},download:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.download()","download","download")},ogcwindow:function(idtema){i3GEO.mapa.ativaTema(idtema);window.open(i3GEO.configura.locaplic+"/ogc.htm?temaOgc="+idtema)},sld:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.janela.cria("500px","350px",i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=tema2sld&tema="+idtema+"&g_sid="+i3GEO.configura.sid,"","","<div class='i3GeoTituloJanela'>SLD<a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=5&idajuda=41' ><b> </b></a></div>")},aplicarsld:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.aplicarsld()","aplicarsld","aplicarsld","dependencias.php","i3GEOF.aplicarsld.iniciaJanelaFlutuante()")},editorsql:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.editorsql()","editorsql","editorsql","dependencias.php","i3GEOF.editorsql.iniciaJanelaFlutuante()")},mudanome:function(idtema){i3GEO.mapa.ativaTema(idtema);var temp=function(){var valor=$i("i3GEOjanelaprompt").value;i3GEO.tema.mudanome(idtema,valor)};i3GEO.janela.prompt($trad("novonome"),temp)}}};
//
//compactados/analise_compacto.js
if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.analise={pontos:{xpt:[],ypt:[]},dialogo:{markercluster:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.markercluster()","markercluster","markercluster","dependencias.php","i3GEOF.markercluster.iniciaJanelaFlutuante()")},heatmap:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.heatmap()","heatmap","heatmap","dependencias.php","i3GEOF.heatmap.iniciaJanelaFlutuante()")},saiku:function(){if(i3GEO.parametros.statusFerramentas&&i3GEO.parametros.statusFerramentas.saiku===false){i3GEO.janela.tempoMsg($trad("naoInstalado"));return}i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.saiku()","saiku","saiku")},saikuMapa:function(){if(i3GEO.parametros.statusFerramentas&&i3GEO.parametros.statusFerramentas.saiku===false){i3GEO.janela.tempoMsg($trad("naoInstalado"));return}i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.saiku()","saiku","saiku","index.js","i3GEOF.saiku.iniciaJanelaFlutuante2()")},graficoInterativo:function(){alert("depreciado. Use graficointerativo1")},graficoInterativo1:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.graficointerativo1()","graficointerativo1","graficointerativo1","dependencias.php","i3GEOF.graficointerativo1.iniciaJanelaFlutuante()")},linhaDoTempo:function(){i3GEO.janela.cria("650px","450px",i3GEO.configura.locaplic+"/ferramentas/linhadotempo/index.php","","","<span class='i3GeoTituloJanelaBsNolink' >"+$trad("d30")+"</span></div>","i3GEOFlinhaDoTempo",false,"hd","","","",true,"","","","","88");i3GEO.analise.atualizaLinhaDoTempo=function(){var doc="",ifr="";try{ifr=$i("i3GEOF.linhaDoTempoi");if(navn){if(ifr){doc=ifr.contentDocument}}else{if(document.frames("i3GEOF.linhaDoTempoi")){doc=document.frames("i3GEOF.linhaDoTempoi").document}}doc.getElementById("tl")?window.parent["i3GEOF.linhaDoTempoi"].carregaDados():i3GEO.eventos.removeEventos("NAVEGAMAPA",["i3GEO.analise.atualizaLinhaDoTempo()"])}catch(e){i3GEO.eventos.removeEventos("NAVEGAMAPA",["i3GEO.analise.atualizaLinhaDoTempo()"])}};i3GEO.eventos.adicionaEventos("NAVEGAMAPA",["i3GEO.analise.atualizaLinhaDoTempo()"]);var ifr=$i("i3GEOF.linhaDoTempoi");if(ifr){ifr.style.width="100%"}},perfil:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.perfil()","perfil","perfil")},rota:function(){if(i3GEO.Interface.ATUAL!=="googlemaps"){alert("Operacao disponivel apenas na interface Google Maps");return}counterClick=1;var parametrosRota=function(overlay,latlng){var temp,janela;if(counterClick===1){counterClick++;alert("Clique o ponto de destino da rota");pontoRota1=latlng;return}if(counterClick===2){pontoRota2=latlng;counterClick=0;GEvent.removeListener(rotaEvento);janela=i3GEO.janela.cria("300px","300px","","center","","<div class='i3GeoTituloJanela'>"+$trad("x48")+"</div>");janela[2].style.overflow="auto";janela[2].style.height="300px";directions=new GDirections(i3GeoMap,janela[2]);temp=function(){$i("wdoca_corpo").innerHTML="N&atilde;o foi poss&iacute;vel criar a rota"};GEvent.addListener(directions,"error",temp);directions.load("from: "+pontoRota1.lat()+","+pontoRota1.lng()+" to: "+pontoRota2.lat()+","+pontoRota2.lng())}};rotaEvento=GEvent.addListener(i3GeoMap,"click",parametrosRota);i3GEO.janela.tempoMsg("Clique o ponto de origem da rota")},melhorcaminho:function(){if(i3GEO.parametros.statusFerramentas&&i3GEO.parametros.statusFerramentas.melhorcaminho===false){i3GEO.janela.tempoMsg($trad("naoInstalado"));return}i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.melhorcaminho()","melhorcaminho","melhorcaminho")},gradePontos:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.gradePontos()","gradepontos","gradeDePontos","dependencias.php","i3GEOF.gradeDePontos.iniciaJanelaFlutuante()")},gradePol:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.gradePol()","gradepol","gradeDePoligonos","dependencias.php","i3GEOF.gradeDePoligonos.iniciaJanelaFlutuante()")},gradeHex:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.gradeHex()","gradehex","gradeDeHex","dependencias.php","i3GEOF.gradeDeHex.iniciaJanelaFlutuante()")},analisaGeometrias:function(){i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.tabela()","analisageometrias","analisaGeometrias","dependencias.php","i3GEOF.analisaGeometrias.iniciaJanelaFlutuante()")},pontosdistri:function(){i3GEO.parametros.r==="nao"?i3GEO.janela.tempoMsg($trad("x22")):i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.pontosdistri()","pontosdistri","pontosDistri","dependencias.php","i3GEOF.pontosDistri.iniciaJanelaFlutuante()")},pontoempoligono:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.pontoempoligono()","pontoempoligono","pontoEmPoligono","dependencias.php","i3GEOF.pontoEmPoligono.iniciaJanelaFlutuante()")},centromassa:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.centromassa()","centromassa","centromassa","dependencias.php","i3GEOF.centromassa.iniciaJanelaFlutuante()")},nptPol:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.nptpol()","nptpol","nptpol","dependencias.php","i3GEOF.nptpol.iniciaJanelaFlutuante()")},buffer:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.buffer()","buffer","buffer","dependencias.php","i3GEOF.buffer.iniciaJanelaFlutuante()")},distanciaptpt:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.distanciaptpt()","distanciaptpt","distanciaptpt","dependencias.php","i3GEOF.distanciaptpt.iniciaJanelaFlutuante()")},centroide:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.centroide()","centroide","centroide","dependencias.php","i3GEOF.centroide.iniciaJanelaFlutuante()")},dissolve:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.dissolve()","dissolve","dissolve","dependencias.php","i3GEOF.dissolve.iniciaJanelaFlutuante()")},agrupaElementos:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.agrupaElementos()","agrupaelementos","agrupaElementos","dependencias.php","i3GEOF.agrupaElementos.iniciaJanelaFlutuante()")},distancia:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.distancia()","distancia","distancia","dependencias.php","i3GEOF.distancia.iniciaJanelaFlutuante()")},area:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.area()","area","area","dependencias.php","i3GEOF.area.iniciaJanelaFlutuante()")},juntamedidasvariavel:function(tema){if(!tema){tema=i3GEO.temaAtivo}var temp=function(){i3GEOF.juntamedidasvariavel.iniciaJanelaFlutuante(tema)};i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.juntamedidasvariavel()","juntamedidasvariavel","juntamedidasvariavel","dependencias.php",temp)}}};
//
//compactados/maparef_compacto.js
if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.maparef={fatorZoomDinamico:-3,TOP:4,RIGHT:120,DEFAULTMAP:"wms",APIOBJ:"",W:function(){var w=parseInt(i3GEO.parametros.w,10)/5;if(w<150){w=150}return parseInt(w,10)},H:function(){var h=parseInt(i3GEO.parametros.h,10)/5;if(i3GEO.maparef.W()<=150){return 150}else{return parseInt(h,10)}},inicia:function(){if(i3GEO.maparef.DEFAULTMAP=="api"&&i3GEO.Interface.ATUAL=="openlayers"){if(i3GEO.maparef.APIOBJ==""){i3GEO.maparef.APIOBJ=new ol.control.OverviewMap({collapsible:true,collapsed:false,layers:[i3geoOL.getLayerBase()],view:new ol.View(i3GEO.Interface.openlayers.parametrosView)});i3GEO.maparef.APIOBJ.setMap(i3geoOL)}else{i3GEO.maparef.APIOBJ.setCollapsed(!i3GEO.maparef.APIOBJ.getCollapsed());if(i3GEO.maparef.APIOBJ.getCollapsed()==true){i3GEO.maparef.APIOBJ.setMap(null);i3GEO.maparef.APIOBJ=""}}return}else if(i3GEO.Interface.ATUAL=="googlemaps"){i3GEO.Interface.ATUAL="wms"}var r,pos,novoel,ins,temp,moveX,moveY,escondeRef,janela;if($i("i3geo_winRef")){janela=YAHOO.i3GEO.janela.manager.find("i3geo_winRef");janela.show();janela.bringToTop();return}if(!$i("i3geo_winRef")){novoel=document.createElement("div");novoel.id="i3geo_winRef";novoel.style.display="none";novoel.style.borderColor="gray";ins="";ins+='<div class="hd" style="border:0px solid black;text-align:left;z-index:20;padding-left: 0px;padding-bottom: 3px;padding-top: 1px;">';ins+='<span id=maparefmaismenosZoom style=display:none > ';temp="javascript:if(i3GEO.maparef.fatorZoomDinamico == -1){i3GEO.maparef.fatorZoomDinamico = 1};i3GEO.maparef.fatorZoomDinamico = i3GEO.maparef.fatorZoomDinamico + 1 ;$i(\"refDinamico\").checked = true;i3GEO.maparef.atualiza();";ins+="<button onclick='"+temp+"' class='btn btn-xs' style='margin:2px;padding:2px;'><span class='material-icons'>add_circle_outline</span></button>";temp="javascript:if(i3GEO.maparef.fatorZoomDinamico == 1){i3GEO.maparef.fatorZoomDinamico = -1};i3GEO.maparef.fatorZoomDinamico = i3GEO.maparef.fatorZoomDinamico - 1 ;$i(\"refDinamico\").checked = true;i3GEO.maparef.atualiza();";ins+="<button onclick='"+temp+"' class='btn btn-xs' style='margin:2px;padding:2px;'><span class='material-icons'>remove_circle_outline</span></button>";ins+="<div style='width: 100px;display:inline-table' class='form-group label-fixed condensed'>";ins+="<div style='width: 100%;' class='input-group'>";ins+="<select class='form-control' style='background-color:#094672' id='refDinamico' onchange='javascript:i3GEO.parametros.celularef=\"\";i3GEO.maparef.atualiza()'>";if(i3GEO.maparef.DEFAULTMAP=="map"){ins+="<option value='mapa' >"+$trad("refMapaAtual")+"</option>";ins+="<option value='dinamico' >"+$trad("refMapaDinamico")+"</option>"}else{ins+="<option value='dinamico' >"+$trad("refMapaDinamico")+"</option>";ins+="<option value='mapa'>"+$trad("refMapaAtual")+"</option>"}ins+="</select>";ins+="</div></div></div>";ins+='<div class="bd" style="border:0px solid black;text-align:left;padding:3px;height: '+i3GEO.maparef.H()+'px;" id="mapaReferencia" onmouseover="this.onmousemove=function(exy){i3GEO.eventos.posicaoMouseMapa(exy)}"  >';ins+='<img style="cursor:pointer;display:none"class="img-rounded" onload="javascript:this.style.display = \'block\'" id="imagemReferencia" src="" onclick="javascript:i3GEO.maparef.click()">';ins+='</div>';novoel.innerHTML=ins;$(novoel).css("opacity",1);document.body.appendChild(novoel)}if($i("i3geo_winRef").style.display!=="block"){$i("i3geo_winRef").style.display="block";janela=new YAHOO.widget.Panel("i3geo_winRef",{height:i3GEO.maparef.H()+47+"px",width:i3GEO.maparef.W()+6+"px",fixedcenter:false,constraintoviewport:false,underlay:"shadow",close:true,visible:true,draggable:true,modal:false,iframe:false,strings:{close:"<span class='material-icons'>cancel</span>"}});YAHOO.i3GEO.janela.manager.register(janela);janela.cfg.setProperty("effect",[{effect:YAHOO.widget.ContainerEffect.FADE,duration:0.5}]);janela.render();janela.show();try{janela.header.style.height="40px"}catch(e){};r=$i("i3geo_winRef_c");if(r){r.style.position="absolute"}pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));$i("mapaReferencia").style.height=i3GEO.maparef.H()+"px";$i("i3geo_winRef").style.border="0px solid gray";moveX=pos[0]+i3GEO.parametros.w-i3GEO.maparef.W()+3-i3GEO.maparef.RIGHT;moveY=pos[1]+i3GEO.maparef.TOP;if(i3GEO.Interface.ATUAL==="googlemaps"){moveY+=30}janela.moveTo(moveX,moveY);escondeRef=function(){$i("imagemReferencia").src="";janela.destroy()};$(janela.close).click(escondeRef);if($i("localizarxygeoProjxg")){var temp=function(){i3GEO.coordenadas.atualizaGeo(objposicaocursor.dmsx,objposicaocursor.dmsy,"localizarxygeoProj")};$("#imagemReferencia").mousemove(temp)}}i3GEO.eventos.adicionaEventos("NAVEGAMAPA",["i3GEO.maparef.atualiza()"]);i3GEO.maparef.atualiza(true);$i("i3geo_winRef_h").className="hd2"},atualiza:function(forca){if(arguments.length===0){forca=false}var tiporef,temp;temp=$i("refDinamico")?tiporef=$i("refDinamico").value:tiporef="fixo";if($i("mapaReferencia")){temp=$i("maparefmaismenosZoom");if(tiporef==="dinamico"){i3GEO.php.referenciadinamica(i3GEO.maparef.processaImagem,i3GEO.maparef.fatorZoomDinamico,tiporef,i3GEO.maparef.W(),i3GEO.maparef.H());if(temp){temp.style.display="inline-table"}}if(tiporef==="mapa"){i3GEO.php.referenciadinamica(i3GEO.maparef.processaImagem,i3GEO.maparef.fatorZoomDinamico,tiporef,i3GEO.maparef.W(),i3GEO.maparef.H());if(temp){temp.style.display="inline-table"}}}else{i3GEO.eventos.removeEventos("NAVEGAMAPA",["i3GEO.maparef.atualiza()"])}},processaImagem:function(retorno){var m,box,temp,tiporef="fixo";if((retorno.data!=="erro")&&(retorno.data!==undefined)){eval(retorno.data);i3GEO.parametros.celularef=g_celularef;i3GEO.parametros.extentref=extentref;temp=$i("imagemReferencia");if(temp){m=new Image();m.src=refimagem;temp.src=m.src}temp=$i("refDinamico");if(temp){tiporef=temp.value}if(tiporef!=="fixo"){box=$i("boxref");if(box){box.style.display="none"}}i3GEO.maparef.atualizaBox()}},atualizaBox:function(){var box=i3GEO.maparef.criaBox(),w;i3GEO.calculo.ext2rect("boxref",i3GEO.parametros.extentref,i3GEO.parametros.mapexten,i3GEO.parametros.celularef,$i("mapaReferencia"));w=parseInt(box.style.width,10);if(w>120){box.style.display="none";return}box.style.display="block";box.style.top=parseInt(box.style.top,10)+4+"px";box.style.left=parseInt(box.style.left,10)+4+"px";if(w<3){box.style.width="3px";box.style.height="3px"}},criaBox:function(){var box=$i("boxref");if(!box){novoel=document.createElement("div");novoel.id="boxref";novoel.style.zIndex=10;novoel.style.position='absolute';novoel.style.cursor="move";novoel.style.backgroundColor="RGB(120,220,220)";novoel.style.borderWidth="3px";if(navm){novoel.style.filter='alpha(opacity=40)'}else{novoel.style.opacity=0.4}$i("mapaReferencia").appendChild(novoel);novoel.onmouseup=function(){var rect,telaminx,telamaxx,telaminy,m,x,ext;rect=$i("boxref");telaminx=parseInt(rect.style.left,10);telamaxy=parseInt(rect.style.top,10);telamaxx=telaminx+parseInt(rect.style.width,10);telaminy=telamaxy+parseInt(rect.style.height,10);m=i3GEO.calculo.tela2dd(telaminx,telaminy,i3GEO.parametros.celularef,i3GEO.parametros.extentref,"imagemReferencia");x=i3GEO.calculo.tela2dd(telamaxx,telamaxy,i3GEO.parametros.celularef,i3GEO.parametros.extentref,"imagemReferencia");ext=m[0]+" "+m[1]+" "+x[0]+" "+x[1];i3GEO.navega.zoomExt(i3GEO.configura.locaplic,i3GEO.configura.sid,"",ext)};return novoel}else{return box}},click:function(){if(i3GEO.Interface.ATUAL==="openlayers"||i3GEO.Interface.ATUAL==="googlemaps"){i3GEO.Interface[i3GEO.Interface.ATUAL].pan2ponto(objposicaocursor.ddx,objposicaocursor.ddy)}}};
//
//compactados/ajuda_compacto.js
if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.ajuda={abreDoc:function(url){if(!url){url="/documentacao/index.html"}window.open(i3GEO.configura.locaplic+url)},redesSociais:function(){i3GEO.janela.cria("400px","400px",i3GEO.configura.locaplic+"/ferramentas/redessociais/index.php","","","<div class='i3GeoTituloJanela'>"+$trad("u5c")+"</div>",i3GEO.util.generateId("redes"))},ferramenta:function(idajuda){var url=i3GEO.configura.locaplic+"/ferramentas/ajuda_usuario.php?"+"&idajuda="+idajuda;$.get(url).done(function(data){var json=jQuery.parseJSON(data);var texto=json[i3GEO.idioma.ATUAL];var titulo=json["titulo"][i3GEO.idioma.ATUAL];i3GEO.janela.closeMsg(texto)}).fail(function(){return})},dialogo:{sobre:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.sobre()","sobre","sobre","dependencias.php","i3GEOF.sobre.iniciaJanelaFlutuante()")}}};
//
//compactados/janela_compacto.js
if(typeof(i3GEO)==='undefined'){var i3GEO={}}YAHOO.namespace("i3GEO.janela");YAHOO.i3GEO.janela.manager=new YAHOO.widget.OverlayManager();YAHOO.namespace("janelaDoca.xp");YAHOO.janelaDoca.xp.manager=new YAHOO.widget.OverlayManager();YAHOO.i3GEO.janela.managerAguarde=new YAHOO.widget.OverlayManager();i3GEO.janela={scrollBar:{theme:"3d-dark",axis:"yx",scrollbarPosition:"inside",advanced:{autoExpandHorizontalScroll:true},scrollButtons:{enable:true}},ULTIMOZINDEX:5,applyScrollBar:function(iddiv,seletor,config){var a=i3GEO.janela.scrollBar;if(config){a=i3GEO.util.cloneObj(i3GEO.janela.scrollBar);$.each(config,function(key,value){a[key]=value})}var i=$($i(iddiv));if(seletor&&selector!=""){i.find(seletor).mCustomScrollbar(a)}else{i.mCustomScrollbar(a)}},prepara:function(){var iu=i3GEO.util;iu.escondeBox()},cria:function(wlargura,waltura,wsrc,nx,ny,texto,id,modal,classe,funcaoCabecalho,funcaoMinimiza,funcaoAposRedim,dimensionavel,icone,funcaoDuplica,opacidade,classeAdicional,idajuda){if(waltura&&waltura==""){waltura="auto"}if(arguments.length<13){dimensionavel=true}if(arguments.length<17){classeAdicional="i3geo6"}if(!icone){icone=""}var i,wlargurA,ins,novoel,wdocaiframe,temp,fix,underlay,ifr,janela;if($i(id)){janela=YAHOO.i3GEO.janela.manager.find(id);janela.show();janela.bringToTop();return}i3GEO.janela.prepara();if(!classe||classe==""){classe="hd"}if(!id||id===""){id="wdoca"}if(!modal||modal===""){modal=false}ifr=false;fix="contained";if(nx===""||nx==="center"){fix=true}if(modal===true){underlay="none"}else{underlay="shadow"}temp=navm?0:2;wlargurA=parseInt(wlargura,10)+temp+"px";ins='<div id="'+id+'_cabecalho" class="'+classe+' '+classeAdicional+'" >';if(i3GEO.configura!==undefined){ins+=Mustache.render(i3GEO.template.janela.aguarde,{id:id})}if(icone!=""){}if(idajuda){ins+=texto}else{ins+="<span style='font-size:10px;'>"+texto+"</span>"}if(funcaoDuplica&&funcaoDuplica!=""){ins+="<div id='"+id+"_duplicaJanela' class='container-duplica'><span class='material-icons'>add_circle_outline</span></div>"}if(funcaoMinimiza&&funcaoMinimiza!=""){ins+="<div id='"+id+"_minimizaCabecalho' class='container-minimiza'><span class='material-icons'>aspect_ratio</span></div>"}ins+='</div><div id="'+id+'_corpo" class="bd '+classeAdicional+'" style="display:block;padding:0px">';if(wsrc!==""){ins+='<div class="container-fluid"><iframe name="'+id+'i" id="'+id+'i" valign="top" style="border:0px white solid;width:100%"></iframe></div>'}ins+='</div>';if(idajuda){ins+='<div class="ft '+classeAdicional+'"><i onclick="i3GEO.ajuda.ferramenta(\''+idajuda+'\')" class="material-icons iconeAjudaFerramentas" >help</i></div>'}else{ins+='<div class="ft '+classeAdicional+'"></div>'}novoel=document.createElement("div");novoel.id=id;novoel.style.display="block";novoel.innerHTML=ins;document.body.appendChild(novoel);wdocaiframe=$i(id+"i");if(wdocaiframe){temp=wdocaiframe.style;temp.height=waltura;temp.display="block";wdocaiframe.src=wsrc}else{if(waltura!=="auto"){$i(id+'_corpo').style.height=parseInt(waltura,10)+"px"}$i(id+'_corpo').style.width='100%';$i(id+'_corpo').style.overflow="auto"}if(waltura==="auto"||dimensionavel==false){janela=new YAHOO.widget.Panel(id,{iframe:ifr,modal:modal,width:wlargurA,underlay:underlay,fixedcenter:fix,constraintoviewport:true,visible:true,monitorresize:false,dragOnly:true,keylisteners:null,strings:{close:"<span class='material-icons'>cancel</span>"}})}else{janela=new YAHOO.widget.Panel(id,{hideMode:'offsets',iframe:ifr,underlay:underlay,modal:modal,width:wlargurA,fixedcenter:fix,constraintoviewport:true,visible:true,monitorresize:false,dragOnly:true,keylisteners:null,strings:{close:"<span class='material-icons'>cancel</span>"}})}if(YAHOO.util.Resize&&dimensionavel==true){var resize=new YAHOO.util.Resize(id,{handles:['br'],autoRatio:false,minWidth:10,minHeight:10,status:false,proxy:true,ghost:false,animate:false,useShim:true});resize.on('resize',function(args){this.cfg.setProperty("height",args.height+"px");if(wdocaiframe){wdocaiframe.style.height=args.height-50+"px"}},janela,true);if(funcaoAposRedim&&funcaoAposRedim!=""){resize.on('endResize',function(args){i3GEO.janela.minimiza();funcaoAposRedim.call()},janela,true)}resize.getProxyEl().style.height="0px"}if(nx!==""&&nx!=="center"){janela.moveTo(nx,ny+50)}YAHOO.i3GEO.janela.manager.register(janela);janela.cfg.setProperty("effect",[{effect:YAHOO.widget.ContainerEffect.FADE,duration:0.5}]);janela.cfg.setProperty("zIndex",[4]);janela.render();if(ifr===true){janela.iframe.style.zIndex=4}YAHOO.util.Event.addListener($i(id+'_corpo'),"click",YAHOO.util.Event.stopPropagation);if(funcaoDuplica&&funcaoDuplica!=""){$i(id+'_duplicaJanela').onclick=funcaoDuplica}if(funcaoCabecalho&&funcaoCabecalho!=""){$i(id+'_cabecalho').onclick=funcaoCabecalho}if(funcaoMinimiza&&funcaoMinimiza!=""){$i(id+"_minimizaCabecalho").onclick=funcaoMinimiza}YAHOO.util.Event.addListener(janela.close,"click",i3GEO.janela.fecha,janela,{id:id},true);temp=$i(id+"_c");if(temp&&temp.style){temp.style.maxWidth="90%"}temp=$i(id);if(temp&&temp.style){temp.style.maxWidth="100%"}temp=$i(id+"_corpo");janela.bringToTop();if(waltura!=="auto"&&wsrc==""){i3GEO.janela.applyScrollBar(temp.id,"",{live:true,liveSelector:".customScrollBar"});i3GEO.janela.applyScrollBar(temp.id,"",{live:true,liveSelector:".customScrollBarXY",advanced:{autoExpandHorizontalScroll:false}})}return([janela,$i(id+"_cabecalho"),temp])},iconiza:function(id,w,rodape){var j,r,t=i3GEO.janela.minimiza(id,w+"px",rodape);r=YAHOO.util.Resize.getResizeById(id);j=$i(id+"I");if(!j){return}if(t==="min"){j.style.display="none";if(r){r.lock()}if(rodape){$i(rodape).style.display="none"}}else{j.style.display="block";if(r){r.unlock()}if(rodape){$i(rodape).style.display="block"}}},minimiza:function(id,min){var temp=$i(id+"_corpo"),n,i,m=YAHOO.i3GEO.janela.manager.find(id),c=$i(id),t="min",r=YAHOO.util.Resize.getResizeById(id),tipo="";if(temp){if(temp.style.display==="block"){temp.style.display="none";if(m){m.hideIframe()}m.winicial=c.style.width;if(min){c.style.width=parseInt(min,10)+"px"}tipo="none";if(r){r.lock()}}else{temp.style.display="block";if(m){m.showIframe()}c.style.width=m.winicial;t="max";tipo="block";if(r){r.unlock()}}}temp=$i(id+"_c");if(temp){$(temp).find(".comboTemasCabecalhoBs,.ft,.yui-resize-handle,.underlay,.bd").css("display",tipo)}temp=$i(id+"_corpo");if(temp){temp.style.display=tipo}temp=$i(id);if(temp){if(tipo==="block"){temp.style.height="100%"}else{temp.style.height="10%"}}return t},fecha:function(event,args){var i,id;i3GEO.util.escondeBox();if(i3GEO.janela.id){id=i3GEO.janela.id}else{id=event.id}if(id==undefined){id=args.id}i3GEO.janela.destroi(id)},destroi:function(id){if(typeof(YAHOO)!="undefined"){var janela=YAHOO.i3GEO.janela.manager.find(id);i3GEO.util.removeScriptTag(id+"_script");i3GEO.util.removeScriptTag(id+".dicionario_script");if(janela){YAHOO.i3GEO.janela.manager.remove(janela);janela=$i(id+"_c");if(janela){janela.parentNode.removeChild(janela);try{YAHOO.util.Resize.getResizeById(id).destroy()}catch(e){}}}}},alteraTamanho:function(w,h,id){var i;if(arguments.length===3){i=$i(id)}else{i=$i("wdoca")}if(i){i.style.width=w+"px";i.style.height=h+"px"}},CONTADORAGUARDE:[],abreAguarde:function(){var p=$i("i3GEObarraAguarde");if(p){p.style.width="100%"}i3GEO.janela.CONTADORAGUARDE.push(" ")},fechaAguarde:function(){var p=$i("i3GEObarraAguarde");if(p){if(i3GEO.janela.CONTADORAGUARDE.length==1){p.style.width="0px"}i3GEO.janela.CONTADORAGUARDE.pop()}},tempoMsg:function(texto,tempo){if(!i3GEO.janela.tempoModal){i3GEO.janela.tempoModal=$(Mustache.render(i3GEO.template.janela.msg,{"texto":texto}))}else{$i("i3GEOMensagemTempoModal").innerHTML=texto}i3GEO.janela.tempoModal.modal("show");if(!tempo){tempo=3000}setTimeout(function(){i3GEO.janela.tempoModal.modal("hide")},tempo)},closeModal:false,closeMsg:function(texto){if(!i3GEO.janela.closeModal){i3GEO.janela.closeModal=$(Mustache.render(i3GEO.template.janela.msg,{"texto":texto}))}else{$("#i3GEOMensagemCloseModal").html(texto);i3GEO.janela.closeModal.modal("show");return}i3GEO.janela.closeModal.modal("show")},ativaAlerta:function(){window.alert=function(texto){var textoI,janela=YAHOO.i3GEO.janela.managerAguarde.find("alerta");if(!janela){janela=new YAHOO.widget.SimpleDialog("alerta",{width:"300px",fixedcenter:true,visible:false,draggable:false,zIndex:100000,textAlign:"left",close:false,modal:false,effect:{effect:YAHOO.widget.ContainerEffect.FADE,duration:0.25},constraintoviewport:true,text:""});YAHOO.i3GEO.janela.managerAguarde.register(janela);janela.setHeader(" ");janela.render(document.body);janela.setFooter("<div class='form-group condensed' id='alertFooter'></div>");var ins=Mustache.render(i3GEO.template.botoes.padrao,{text:$trad("x74")});var fecha=function(){YAHOO.i3GEO.janela.managerAguarde.find("alerta").destroy()};$('#alertFooter').append($(ins).click(fecha))}textoI=janela.cfg.getProperty("text");if(textoI!=""){textoI+="<br>"}texto=textoI+texto;janela.cfg.setProperty("text","<h4 class='alertTitulo'>"+texto+"</h4>");janela.show()}},confirma:function(pergunta,w,resposta1,resposta2,funcao1,funcao2){var b,f1,f2,f3,janela=YAHOO.i3GEO.janela.managerAguarde.find("confirma");if(!w||w==""){w=300}if(!funcao1||funcao1==""){f1=function(){YAHOO.i3GEO.janela.managerAguarde.find("confirma").destroy();return true}}else{f1=function(){funcao1.call();YAHOO.i3GEO.janela.managerAguarde.find("confirma").destroy()}}if(!funcao2||funcao2==""){f2=function(){YAHOO.i3GEO.janela.managerAguarde.find("confirma").destroy();return false}}else{f2=function(){funcao2.call();YAHOO.i3GEO.janela.managerAguarde.find("confirma").destroy()}}f3=function(){YAHOO.i3GEO.janela.managerAguarde.find("confirma").destroy()};if(!resposta1||resposta1==""){resposta1=$trad("confirma")}if(janela){janela.destroy()}b=[{text:$trad("x75"),handler:f3},{text:resposta1,handler:f1}];if(resposta2&&resposta2!=""){b.push({text:resposta2,handler:f2})}janela=new YAHOO.widget.SimpleDialog("confirma",{width:w+"px",fixedcenter:true,visible:false,draggable:false,zIndex:100000,textAlign:"left",close:false,modal:false,effect:{effect:YAHOO.widget.ContainerEffect.FADE,duration:0.25},constraintoviewport:true,text:"<h4 class='alertTitulo'>"+pergunta+"</h4>"});YAHOO.i3GEO.janela.managerAguarde.register(janela);janela.setHeader(" ");janela.setFooter("<div class='form-group condensed' id='confirmaFooter'></div>");janela.render(document.body);var ins="";$.each(b,function(index,value){ins=Mustache.render(i3GEO.template.botoes.padrao,{style:'margin-right:10px;',text:value.text});$('#confirmaFooter').append($(ins).click(value.handler))});janela.show()},prompt:function(pergunta,funcaoOk,valorDefault){if($i("i3GEOjanelaprompt")){return}if(!valorDefault){valorDefault=""}var i="<div class='form-group label-fixed condensed' ><label class='control-label' for='i3GEOjanelaprompt'>"+pergunta+"</label><input placeholder='"+pergunta+"' class='form-control input-lg' type='text' id='i3GEOjanelaprompt' value='"+valorDefault+"' /></div>";i3GEO.janela.confirma(i,"","","",funcaoOk)},mensagemSimples:function(texto,cabecalho,largura,altura){var janela;if(!largura){largura=300}if(!altura){altura=300}if(!cabecalho){cabecalho=""}janela=new YAHOO.widget.SimpleDialog(i3GEO.util.generateId(),{width:parseInt(largura,10)+"px",height:parseInt(altura,10)+"px",fixedcenter:true,visible:true,draggable:true,zIndex:100000,textAlign:"left",close:true,modal:false,effect:{effect:YAHOO.widget.ContainerEffect.FADE,duration:0.25},constraintoviewport:true,text:""});YAHOO.i3GEO.janela.manager.register(janela);janela.setHeader(cabecalho);janela.render(document.body);janela.setHeader("<div class='i3GeoTituloJanela'>"+cabecalho+"</div>");janela.cfg.setProperty("text",texto);janela.bringToTop();janela.show();return janela},comboCabecalhoTemas:function(idDiv,idCombo,ferramenta,tipo,onButtonClick,temaSel){var temp=$i(idDiv);if(!temaSel){temaSel=""}if(temaSel==""&&i3GEOF[ferramenta]&&i3GEOF[ferramenta].tema&&i3GEOF[ferramenta].tema!=""){temaSel=i3GEOF[ferramenta].tema}if(temp){i3GEO.util.comboTemas(temp.id+"Sel",function(retorno){var tema,container=$i(idDiv),botao;container.innerHTML=retorno.dados;botao=new YAHOO.widget.Button(idCombo,{type:"menu",menu:idCombo+"select"});if(temaSel!=""){tema=i3GEO.arvoreDeCamadas.pegaTema(temaSel);if(tema&&tema!=undefined){botao.set("label","<span class='cabecalhoTemas' >"+tema.tema+"</span>&nbsp;&nbsp;")}else{botao.set("label","<span class='cabecalhoTemas' >"+$trad("x92")+"</span>&nbsp;&nbsp;")}}else{botao.set("label","<span class='cabecalhoTemas' >"+$trad("x92")+"</span>&nbsp;&nbsp;")}if(!onButtonClick){onButtonClick=function(p_sType,p_aArgs){var oMenuItem=p_aArgs[1];if(oMenuItem){i3GEO.mapa.ativaTema(oMenuItem.value);if(oMenuItem.value===""){i3GEO.temaAtivo="";botao.set("label","<span class='cabecalhoTemas' >"+$trad("x92")+"</span>&nbsp;&nbsp;")}else{botao.set("label","<span class='cabecalhoTemas' >"+oMenuItem.cfg.getProperty("text")+"</span>&nbsp;&nbsp;")}if(i3GEOF[ferramenta]){i3GEOF[ferramenta].tema=oMenuItem.value;if($i("i3GEOF."+ferramenta+"_corpo")){$i("i3GEOF."+ferramenta+"_corpo").innerHTML="";eval("i3GEOF."+ferramenta+".inicia('i3GEOF."+ferramenta+"_corpo');")}}}};if(i3GEO.eventos.ATUALIZAARVORECAMADAS.length>20){i3GEO.eventos.ATUALIZAARVORECAMADAS=[]}i3GEO.eventos.adicionaEventos("ATUALIZAARVORECAMADAS",["i3GEO.janela.comboCabecalhoTemas('"+idDiv+"','"+idCombo+"','"+ferramenta+"','"+tipo+"')"])}botao.getMenu().subscribe("click",onButtonClick,botao)},temp.id,"",false,tipo,"",true,true,"")}},comboCabecalhoTemasBs:function(idDiv,idCombo,ferramenta,tipo,onButtonClick,temaSel){var temp=$i(idDiv);if(!temaSel){temaSel=""}if(temaSel==""&&i3GEOF[ferramenta]&&i3GEOF[ferramenta].tema&&i3GEOF[ferramenta].tema!=""){temaSel=i3GEOF[ferramenta].tema}else{temaSel=i3GEO.temaAtivo;if(i3GEOF[ferramenta]&&i3GEOF[ferramenta].tema){i3GEOF[ferramenta].tema=temaSel}}if(temp){i3GEO.util.comboTemas(temp.id+"Sel",function(retorno){var tema,container=$i(idDiv),botao;container.innerHTML+=retorno.dados;botao=$i(temp.id+"Sel");if(temaSel!=""){tema=i3GEO.arvoreDeCamadas.pegaTema(temaSel);if(tema&&tema!=undefined){botao.value=tema.name}else{botao.value=""}}else{botao.value=""}if(!onButtonClick){onButtonClick=function(botao){i3GEO.mapa.ativaTema(botao.value);if(botao.value==""){i3GEO.temaAtivo=""}if(i3GEOF[ferramenta]){i3GEOF[ferramenta].tema=botao.value;if($i("i3GEOF."+ferramenta+"_corpo")){$i("i3GEOF."+ferramenta+"_corpo").innerHTML="";eval("i3GEOF."+ferramenta+".inicia('i3GEOF."+ferramenta+"_corpo');")}}}}botao.onchange=onButtonClick},temp.id,"",false,tipo,"font-size: 12px;width: 95%;color:white;",false,true,"form-control comboTema")}}};
//
//compactados/guias_compacto.js
if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.guias={LARGURAGUIAMOVEL:350,CONFIGURA:{"zoomanterior":{icone:"imagens/gisicons/zoom-last.png",titulo:"",id:"guiaZoomanterior",idconteudo:"",click:function(){i3GEO.navega.extensaoAnterior()}},"zoomli":{icone:"imagens/gisicons/zoom-region.png",titulo:$trad("d3"),id:"guiaZoomli",idconteudo:"",click:function(){if(DetectaMobile("DetectMobileLong")){i3GEO.janela.tempoMsg($trad("x70"))}else{i3GEO.janela.tempoMsg($trad("x69"))}if(i3GEO.Interface.ATUAL==="googlemaps"){i3GeoMap.setOptions({draggable:true})}}},"zoomproximo":{icone:"imagens/gisicons/zoom-next.png",titulo:"",id:"guiaZoomproximo",idconteudo:"",click:function(){i3GEO.navega.extensaoProximo()}},"zoomtot":{icone:"imagens/gisicons/zoom-extent.png",titulo:$trad("d2"),id:"guiaZoomtot",idconteudo:"",click:function(){if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.zoom2ext(i3GEO.parametros.extentTotal);return}if(i3GEO.Interface.ATUAL==="googlemaps"){i3GEO.Interface.googlemaps.zoom2extent(i3GEO.parametros.extentTotal);return}}},"identificaBalao":{icone:"imagens/gisicons/tips.png",titulo:$trad("d7a"),id:"guiaIdentificaBalao",idconteudo:"",click:function(){i3GEO.mapa.ativaIdentificaBalao()}},"identifica":{icone:"imagens/gisicons/pointer-info.png",titulo:$trad("d7"),id:"guiaIdentifica",idconteudo:"",click:function(){i3GEO.mapa.ativaIdentifica()}},"mapas":{icone:"imagens/gisicons/show-links.png",titulo:"Links",id:"guia5",idconteudo:"guia5obj",mostraLink:function(id,url){$i("i3geoMapasLink_"+id).innerHTML="<a href='"+url+"' target=_blank >"+$trad("abreMapa")+"</a>"},click:function(onde){if(!onde){onde=i3GEO.guias.CONFIGURA.mapas.idconteudo}var pegaMapas=function(retorno){var ins,mapa,ig1lt,ig1,nome,lkd,link,temp,combo,urlinterface;ins="<br><div id='banners' style='overflow:auto;text-align:center'>";ins+="<br>";mapa=retorno.data.mapas;ig1lt=mapa.length;ig1=0;urlinterface=window.location.origin+window.location.pathname;if(ig1lt>0){do{temp=mapa[ig1];nome=temp.NOME;if(temp.PUBLICADO){if(temp.PUBLICADO.toLowerCase()==="nao"){nome="<s>"+nome+"</s>"}}lkd=temp.LINK;link=i3GEO.configura.locaplic+"/ms_criamapa.php?temasa="+temp.TEMAS+"&layers="+temp.LIGADOS;if(temp.EXTENSAO!==""){link+="&mapext="+temp.EXTENSAO}if(temp.OUTROS!==""){link+="&"+temp.OUTROS}if(lkd!==""){link=lkd}ins+="<div style='cursor:pointer; height: 120px;float: left;width:45%;background-color:white;padding:5px;margin:5px;border: 1px solid #F0F0F0;border-radius: 5px;box-shadow: 1px 1px 1px 1px #D3D3D3;' >";if(temp.IMAGEM&&temp.IMAGEM!=""){ins+="<div style='float:left;margin:2px' ><a href='"+link+"' style=text-align:center;text-decoration:none; >"+"<img src='"+temp.IMAGEM+"'></a></div>"}nome+=" ("+temp.ID_MAPA+")";if(temp.CONTEMMAPFILE=="nao"){ins+="<div class=paragrafo style='text-align:left;'>"+"<a href='"+link+"' style=text-align:left;text-decoration:none; >"+nome+"</a></div>"}else{combo="<select style='width:170px;' onchange='i3GEO.guias.CONFIGURA.mapas.mostraLink("+ig1+",this.value)'>"+"<option value=''>"+$trad("x103")+":</option>"+"<option value='"+link+"'>Como foi salvo</option>"+"<option value='"+link+"&interface="+urlinterface+"'>Com a interface atual</option>"+"<option value='"+i3GEO.configura.locaplic+"/mashups/openlayers.php?numzoomlevels=18&restauramapa="+temp.ID_MAPA+"&fundo=e_wsm'>Openlayers com todos os botoes</option>"+"<option value='"+i3GEO.configura.locaplic+"/mashups/openlayers.php?numzoomlevels=18&restauramapa="+temp.ID_MAPA+"&fundo=est_wms'>Sem o fundo</option>"+"<option value='"+i3GEO.configura.locaplic+"/mashups/openlayers.php?numzoomlevels=18&restauramapa="+temp.ID_MAPA+"&fundo=e_wsm&botoes=legenda pan zoombox zoomtot zoomin zoomout distancia area identifica'>Com botoes principais</option>"+"<option value='"+i3GEO.configura.locaplic+"/mashups/osm.php?numzoomlevels=18&restauramapa="+temp.ID_MAPA+"&fundo=e_wsm&botoes=legenda pan zoombox zoomtot zoomin zoomout distancia area identifica'>Com botoes principais e OSM</option>"+"<option value='"+i3GEO.configura.locaplic+"/mashups/openlayers.php?numzoomlevels=18&restauramapa="+temp.ID_MAPA+"&botoes=legenda pan zoombox zoomtot zoomin zoomout'>Botoes de navegacao</option>"+"</select>";ins+="<div style='float:left;margin:2px'>"+"<img src='"+i3GEO.configura.locaplic+"/ferramentas/salvamapa/geraminiatura.php?w=100&h=67&restauramapa="+temp.ID_MAPA+"'></div><div class=paragrafo style='text-align:left;'><a href='"+link+"' style=text-align:center;text-decoration:none; >"+nome+"</a></div>"+combo+"<br><div style='cursor:pointer;' id='i3geoMapasLink_"+ig1+"' ></div>"}ins+="</div>";ig1++}while(ig1<ig1lt)}$i(onde).innerHTML=ins+"</div>"};if($i(i3GEO.guias.CONFIGURA.mapas.idconteudo)){$i(i3GEO.guias.CONFIGURA.mapas.idconteudo).innerHTML="Aguarde..."}i3GEO.php.pegaMapas(pegaMapas);i3GEO.navega.removeCookieExtensao()}},"dobraPagina":{icone:"imagens/googlemaps.png",titulo:$trad("trocaInterface"),id:"guia6",idconteudo:"",inicializa:function(){if(i3GEO.Interface.ATUAL==="googlemaps"){i3GEO.guias.CONFIGURA.dobraPagina.icone="imagens/openlayers.png"}else{i3GEO.guias.CONFIGURA.dobraPagina.icone="imagens/googlemaps.png"}},click:function(){i3GEO.Interface.atual2gm.insereIcone=false;i3GEO.Interface.atual2ol.insereIcone=false;if(i3GEO.Interface.ATUAL==="googlemaps"){if(typeof i3GeoMap.getStreetView!="undefined"){if(i3GeoMap.getStreetView().getVisible()===true){i3GeoMap.getStreetView().setVisible(false)}}i3GEO.Interface.atual2ol.inicia();i3GEO.guias.CONFIGURA.dobraPagina.icone="imagens/googlemaps.png"}if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.atual2gm.inicia();i3GEO.guias.CONFIGURA.dobraPagina.icone="imagens/openlayers.png"}$i("iconeTrocaInterface").src=i3GEO.configura.locaplic+"/"+i3GEO.guias.CONFIGURA.dobraPagina.icone}},"buscaRapida":{icone:"imagens/gisicons/search.png",titulo:"",id:"guia7",idconteudo:"guia7obj",idBuscaRapida:"buscaRapidaGuia",click:function(obj){var f=i3GEO.guias.CONFIGURA.buscaRapida;obj=$(obj);if(obj.attr("data-idconteudo")!=undefined){f.idconteudo=obj.attr("data-idconteudo")}}},"legenda":{icone:"imagens/legenda.png",titulo:$trad("g3"),id:"guia4",idconteudo:"guia4obj",idLegenda:"legendaHtml",click:function(obj){var f=i3GEO.guias.CONFIGURA.legenda;obj=$(obj);if(obj.attr("data-idLegenda")!=undefined){f.idLegenda=obj.attr("data-idLegenda")}if($i(f.idLegenda)){$i(f.idLegenda).style.display="block";i3GEO.legenda.CAMADAS="";i3GEO.legenda.inicia({"idLegenda":f.idLegenda,"templateLegenda":$("#"+f.idLegenda).attr("data-template"),"janela":false})}}},"temas":{icone:"imagens/layer.png",titulo:$trad("g4a"),id:"guia1",idconteudo:"guia1obj",idListaDeCamadas:"listaTemas",idListaFundo:"listaFundo",idListaLayersGr:"listaLayersGr",verificaAbrangencia:"",click:function(obj){var f=i3GEO.guias.CONFIGURA.temas;obj=$(obj);if(obj.attr("data-verificaAbrangencia")!=undefined){f.verificaAbrangencia=obj.attr("data-verificaAbrangencia")}if(obj.attr("data-idconteudo")!=undefined){f.idconteudo=obj.attr("data-idconteudo")}if(obj.attr("data-idListaDeCamadas")!=undefined){f.idListaDeCamadas=obj.attr("data-idListaDeCamadas")}if(obj.attr("data-idListaFundo")!=undefined){f.idListaFundo=obj.attr("data-idListaFundo")}if(obj.attr("data-idListaLayersGr")!=undefined){f.idListaLayersGr=obj.attr("data-idListaLayersGr")}if($("#"+obj.attr("data-idListaFundo")).attr("data-idTemplateCamada")!=undefined){f.idTemplateCamadaFundo=$("#"+obj.attr("data-idListaFundo")).attr("data-idTemplateCamada")}if($i(f.idListaDeCamadas)){i3GEO.arvoreDeCamadas.inicia({"idOnde":f.idListaDeCamadas,"templateCamada":$("#"+f.idListaDeCamadas).attr("data-template"),"idListaFundo":f.idListaFundo,"templateCamadaFundo":$("#"+f.idListaFundo).attr("data-template"),"idListaLayersGr":f.idListaLayersGr,"templateCamadaGr":$("#"+f.idListaLayersGr).attr("data-template"),"verificaAbrangencia":f.verificaAbrangencia})}}},"adiciona":{icone:"imagens/catalogo.png",titulo:$trad("g1a"),id:"guia2",idconteudo:"guia2obj",idMenus:"catalogoMenus",idCatalogo:"catalogoPrincipal",idNavegacao:"catalogoNavegacao",idMigalha:"catalogoMigalha",click:function(obj){var f=i3GEO.guias.CONFIGURA.adiciona;if($(obj).attr("data-idconteudo")!=undefined){f.idconteudo=$(obj).attr("data-idconteudo")}if($(obj).attr("data-idMenus")!=undefined){f.idMenus=$(obj).attr("data-idMenus")}if($(obj).attr("data-idCatalogo")!=undefined){f.idCatalogo=$(obj).attr("data-idCatalogo")}if($(obj).attr("data-idNavegacao")!=undefined){f.idNavegacao=$(obj).attr("data-idNavegacao")}if($(obj).attr("data-idMigalha")!=undefined){f.idMigalha=$(obj).attr("data-idMigalha")}if($(obj).attr("data-folderFirst")!=undefined){f.folderFirst=$(obj).attr("data-folderFirst")}else{f.folderFirst="false"}var ondeMenus=$("#"+f.idMenus);i3GEO.catalogoMenus.listaMenus({"templateDir":ondeMenus.attr("data-templateDir"),"templateTema":ondeMenus.attr("data-templateTema"),"idOndeMenus":f.idMenus,"idCatalogoPrincipal":f.idCatalogo,"idCatalogoNavegacao":f.idNavegacao,"idOndeMigalha":f.idMigalha,"folderFirst":f.folderFirst})}},"ferramentas":{icone:"imagens/gisicons/tools.png",titulo:$trad("u15a"),id:"guia8",idconteudo:"guia8obj",idLista:"listaFerramentas",idMigalha:"migalhaFerramentas",idLinks:"listaFerramentasLinks",status:false,click:function(obj){if($(obj).attr("data-idconteudo")!=undefined){i3GEO.guias.CONFIGURA.ferramentas.idconteudo=$(obj).attr("data-idconteudo")}if($(obj).attr("data-idLista")!=undefined){i3GEO.guias.CONFIGURA.ferramentas.idLista=$(obj).attr("data-idLista")}if($(obj).attr("data-idMigalha")!=undefined){i3GEO.guias.CONFIGURA.ferramentas.idMigalha=$(obj).attr("data-idMigalha")}if($(obj).attr("data-idLinks")!=undefined){i3GEO.guias.CONFIGURA.ferramentas.idLinks=$(obj).attr("data-idLinks")}if(i3GEO.util.checaHtmlVazio(i3GEO.guias.CONFIGURA.ferramentas.idLista)==false||i3GEO.util.checaHtmlVazio(i3GEO.guias.CONFIGURA.ferramentas.idLinks)==false){return}var f=i3GEO.guias.CONFIGURA.ferramentas;i3GEO.caixaDeFerramentas.inicia({"idOndeFolder":$("#"+f.idLista),"idOndeLinks":$("#"+f.idLinks),"idOndeMigalha":f.idMigalha,"templateFolder":$("#"+f.idLista).attr("data-template"),"templateMigalha":$("#"+f.idMigalha).attr("data-template"),"templateLinks":$("#"+f.idLinks).attr("data-template")})}}},ajustaAltura:function(){var guia,guias,nguias,temp,temps,n,i,g,altura=0;guias=i3GEO.util.listaChaves(i3GEO.guias.CONFIGURA);nguias=guias.length;for(g=0;g<nguias;g++){guia=$i(this.CONFIGURA[guias[g]].idconteudo);if(guia){guia.style.overflow="auto";if(!guia.style.height){guia.style.height=i3GEO.parametros.h+"px"}}}},escondeGuias:function(){var guias,nguias,g,temp,attributes,anim;guias=i3GEO.util.listaChaves(i3GEO.guias.CONFIGURA);nguias=guias.length;for(g=0;g<nguias;g++){temp=$i(this.CONFIGURA[guias[g]].idconteudo);if(temp){temp.style.display="none"}}$("#i3GEOguiaMovelConteudo").css("display","none")},mostra:function(guia){if(i3GEO.Interface.ATUAL==="googlemaps"){if(typeof i3GeoMap.getStreetView!="undefined"){i3GeoMap.getStreetView().setVisible(false)}}var guias,nguias,g,temp,attributes,anim;guias=i3GEO.util.listaChaves(i3GEO.guias.CONFIGURA);nguias=guias.length;if(!$i(i3GEO.guias.CONFIGURA[guia].idconteudo)){return}if(i3GEO.guias.CONFIGURA[guia]){temp=$i(i3GEO.guias.CONFIGURA[guia].idconteudo);if(temp){temp.style.display="block";$("#i3GEOguiaMovelMolde,#i3GEOguiaMovelConteudo").css("display","block")}}},inicia:function(){if($i("i3GEOguiaMovel")){i3GEO.guias.LARGURAGUIAMOVEL=parseInt($("#i3GEOguiaMovel").css("width"),10)}if(!$i("i3GEOguiaMovelMolde").style.height||$i("i3GEOguiaMovelMolde").style.height==""){$("#i3GEOguiaMovelMolde,#i3GEOguiaMovelConteudo").css("height",i3GEO.parametros.h+"px")}},ativa:function(chave,obj){var f="";if(!$i(i3GEO.guias.CONFIGURA[chave].idconteudo)){f=i3GEO.guias.CONFIGURA[chave].click.apply(f,[obj]);return}i3GEO.guias.escondeGuias();i3GEO.guias.abreFecha("abre",chave);if(i3GEO.guias.CONFIGURA[chave].click){f=i3GEO.guias.CONFIGURA[chave].click.apply(f,[obj])}},abreFecha:function(forca,chave){var molde=$("#i3GEOguiaMovelMolde");if(!forca){if(parseInt(molde.css("width"),10)<=10){forca="abre"}else{forca="fecha"}}if(forca==="fecha"){i3GEO.guias.escondeGuias();molde.animate({"width":"-10px"},400)}else{var temp=function(){i3GEO.guias.mostra(chave)};molde.animate({"width":i3GEO.guias.LARGURAGUIAMOVEL+"px"},{duration:400,always:temp})}},mostraGuiaFerramenta:function(guia,namespace){var g,Dom=YAHOO.util.Dom;if(!namespace){namespace="guia"}for(g=0;g<12;g++){Dom.setStyle(namespace+g+"obj","display","none")}Dom.setStyle(guia+"obj","display","block")},ajustaGuiaFerramenta:function(){}};
//
//compactados/arvoredecamadas_compacto.js
if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.arvoreDeCamadas={FUNCOES:{farolescala:true,excluir:true,sobe:true,desce:true,fonte:true,zoomtema:true,compartilhar:true,opacidade:true,mudanome:true,procurar:true,toponimia:true,etiquetas:true,filtrar:true,tabela:true,grafico:true,editorlegenda:true,destacar:true,cortina:true,sql:true,comentar:true,temporizador:true,wms:true,tme:true,copia:true,storymap:true,animagif:true},CAMADAS:"",FILTRO:"",CAMADASINDEXADAS:[],config:{"idOnde":"listaTemas","aposIniciar":"","templateCamada":"templates/camada.html","idListaFundo":"","templateCamadaFundo":"templates/camadaFundo.html","idListaLayersGr":"","templateCamadaGr":"templates/camadaGr.html","verificaAbrangencia":""},carregaTemplates:function(){var t1=i3GEO.arvoreDeCamadas.config.templateCamada,t2=i3GEO.arvoreDeCamadas.config.templateCamadaFundo,t3=i3GEO.arvoreDeCamadas.config.templateCamadaGr;$.ajax(t1).always(function(r1){i3GEO.template.camada=r1;if(r1.status){i3GEO.template.camada=""}$.ajax(t2).always(function(r2){i3GEO.template.camadaFundo=r2;if(r2.status){i3GEO.template.camadaFundo=""}$.ajax(t3).always(function(r3){i3GEO.template.camadaGr=r3;if(r3.status){i3GEO.template.camadaGr=""}i3GEO.arvoreDeCamadas.inicia()})})})},inicia:function(config){if(config){$.each(config,function(i,v){if(v!=undefined){i3GEO.arvoreDeCamadas.config[i]=v}})}if(!i3GEO.template.camada||!i3GEO.template.camadaFundo){i3GEO.arvoreDeCamadas.carregaTemplates();return}else{config=i3GEO.arvoreDeCamadas.config;var novoel,temp;i3GEO.arvoreDeCamadas.atualiza(i3GEO.arvoreDeCamadas.CAMADAS);if(!$i(config.idOnde)){return}if(config.verificaAbrangencia!=""){i3GEO.eventos.adicionaEventos("NAVEGAMAPA",["i3GEO.arvoreDeCamadas.verificaAbrangenciaTemas()"])}if(config.aposIniciar!==""){if(jQuery.isFunction(config.aposIniciar)){config.aposIniciar.call()}}}},adicionaLayersGr:function(){if(i3GEO.Interface.ATUAL!="openlayers"){return}var temp=$i(i3GEO.arvoreDeCamadas.config.idListaLayersGr),layers=i3geoOL.getLayersGr(),lista=[],camada={};if(temp){$.each(layers,function(i,layer){var p=layer.getProperties();camada={...i3GEO.idioma.OBJETOIDIOMA};camada.name=p.name;camada.tema=p.title;camada.locaplic=i3GEO.configura.locaplic;if(layer.getVisible()==true){camada.checked="checked"}else{camada.checked=""}lista.push(camada)});var t=Mustache.render("{{#data}}"+i3GEO.template.camadaGr+"{{/data}}",{"data":lista});$(temp).html(t)}},atualiza:function(temas,forca){if(i3GEO.template.camada==undefined||i3GEO.template.camada==false){return}if(arguments.length===0){temas=i3GEO.arvoreDeCamadas.CAMADAS;i3GEO.arvoreDeCamadas.CAMADAS="";forca=false}var clone=[],camada={},config=i3GEO.arvoreDeCamadas.config,temp;temp=$i(config.idOnde);if(temp){if(forca===true){temp.innerHTML=""}if(temp.innerHTML!==""){if(i3GEO.arvoreDeCamadas.comparaTemas(temas,i3GEO.arvoreDeCamadas.CAMADAS)){i3GEO.arvoreDeCamadas.CAMADAS=temas;return}}}i3GEO.arvoreDeCamadas.CAMADAS=temas;i3GEO.arvoreDeCamadas.CAMADASINDEXADAS=[];$.each(i3GEO.arvoreDeCamadas.CAMADAS,function(i,tema){var mostra=true;i3GEO.pluginI3geo.aplicaPropriedades(tema);camada={};camada.name=tema.name;camada.tema=tema.tema;if(tema.status!=0){camada.checked="checked"}else{camada.checked=""}if(tema.sel&&tema.sel.toLowerCase()==="sim"){camada.classeCss="camadaSelecionada"}else{camada.classeCss=""}if(temp&&i3GEO.arvoreDeCamadas.FILTRO!==""){if(i3GEO.arvoreDeCamadas.FILTRO==="desligados"&&camada.checked=="checked"){mostra=false}if(i3GEO.arvoreDeCamadas.FILTRO==="ligados"&&camada.checked==""){mostra=false}if(i3GEO.arvoreDeCamadas.FILTRO==="selecionados"&&tema.sel.toLowerCase()!=="sim"){mostra=false}if(i3GEO.arvoreDeCamadas.FILTRO==="download"&&tema.download.toLowerCase()!=="sim"){mostra=false}if(i3GEO.arvoreDeCamadas.FILTRO==="wms"&&tema.connectiontype*1!==7){mostra=false}if(i3GEO.arvoreDeCamadas.FILTRO==="raster"&&tema.type*1!==3){mostra=false}if(i3GEO.arvoreDeCamadas.FILTRO==="toponimia"&&tema.type*1!==4){mostra=false}}if(temp&&mostra==true){i3GEO.arvoreDeCamadas.montaIconesTema(tema,camada);i3GEO.arvoreDeCamadas.montaOpcoesTema(tema,camada);if(tema.iconetema!==""){camada.iconetema="<img class='i3GEOiconeTema' src='"+tema.iconetema+"' />"}if(tema.maxscaledenom&&(tema.maxscaledenom*1>i3GEO.parametros.mapscale*1&&tema.minscaledenom*1<i3GEO.parametros.mapscale*1)){camada.rangeScale="out";camada.rangeScaleMsg=$trad("rangeScaleMsg")}else{camada.rangeScale="in"}if(tema.escondido.toLowerCase()!=="sim"){clone.push(camada)}}i3GEO.arvoreDeCamadas.CAMADASINDEXADAS[camada.name]=tema});if(temp){var t=Mustache.render("{{#data}}"+i3GEO.template.camada+"{{/data}}",{"data":clone});$("#"+config.idOnde).html(t);$("#"+config.idOnde).sortable({scroll:false,axis:"y",revert:true,update:function(event,ui){var els=i3GEO.arvoreDeCamadas.listaLigadosDesligadosArvore(config.idOnde);var lista=els[2].join(",");var temp=function(retorno){i3GEO.atualiza(retorno);if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.ordenaLayers()}i3GEO.arvoreDeCamadas.atualiza(i3GEO.arvoreDeCamadas.CAMADAS,true)};i3GEO.php.reordenatemas(temp,lista)}})}i3GEO.arvoreDeCamadas.adicionaCamadasDeFundo(config);i3GEO.arvoreDeCamadas.adicionaLayersGr();i3GEO.eventos.executaEventos(i3GEO.eventos.ATUALIZAARVORECAMADAS)},adicionaCamadasDeFundo:function(config){if(i3GEO.Interface.ATUAL=="openlayers"){var temp=temp=$i(config.idOnde);if(temp&&$("#"+config.idListaFundo).html()==""){clone=[{"name":"camadaDeFundo","value":"nenhum","title":$trad("nenhum")}];$.each(i3GEO.Interface.openlayers.LAYERSADICIONAIS,function(i,layer){camada={};temp=layer.getProperties();camada.name="camadaDeFundo";if(temp.preview){camada.preview=temp.preview}else{camada.preview=""}camada.value=temp.name;camada.title=temp.title;if(temp.visible===true){camada.checked="checked"}else{camada.checked=""}clone.push(camada)});var t=Mustache.to_html("{{#data}}"+i3GEO.template.camadaFundo+"{{/data}}",{"data":clone});$("#"+config.idListaFundo).html(t);$("#"+config.idListaFundo+" label").tooltip({animation:false,trigger:"hover",placement:"auto",html:true,template:"<div class='tooltip ' ><div class='tooltip-inner'></div></div>"})}}},ligaDesligaTemas:function(lista,status){},atualizaLegenda:function(idtema){},montaTextoTema:function(tema){if(i3GEO.tema.TEMPORIZADORESID[tema.name]==undefined&&tema.temporizador!=""){i3GEO.tema.temporizador(tema.name,tema.temporizador)}return(html)},montaOpcoesTema:function(temaObj,camada){camada.ferramentasTexto=$trad("u15a");camada.ferramentasTitle=$trad("ferramCamadas");camada.removerTexto=$trad("t12");camada.removerTitle=$trad("t12a");camada.sobeTexto=$trad("t13");camada.sobeTitle=$trad("t14");camada.desceTexto=$trad("t15");camada.desceTitle=$trad("t16");camada.tabelaTexto=$trad("tabela");camada.tabelaTitle=$trad("t30");camada.editorlegendaTexto=$trad("t33");if(temaObj.zoomtema.toLowerCase()==="sim"){camada.zoomtemaTexto=$trad("t17");camada.zoomtemaTitle=$trad("t18")}else{camada.zoomtema="hidden"}if(temaObj.sel.toLowerCase()==="sim"){camada.selTexto=$trad("t5");camada.selTitle=$trad("t4")}else{camada.sel="hidden"}if(temaObj.sel.toLowerCase()==="sim"){camada.zoomSelTexto=$trad("t4a")}else{camada.zoomsel="hidden"}if(temaObj.link_tema!=""&&temaObj.features.toLowerCase()!=="sim"&&temaObj.name!="mundo"){camada.linkTexto=$trad("a9");camada.linkTitle=$trad("a9")}else{camada.link="hidden"}if(temaObj.download.toLowerCase()==="sim"||temaObj.download===""&&temaObj.features.toLowerCase()!=="sim"){camada.downloadTexto="Download";camada.downloadTitle=$trad("t6")}else{camada.download="hidden"}if(temaObj.permiteogc.toLowerCase()==="sim"){camada.permiteogcTexto="OGC"}else{camada.permiteogc="hidden"}return camada},montaIconesTema:function(temaObj,camada){if(temaObj.escala!=0){if(temaObj.escala*1<i3GEO.parametros.mapscale*1){camada.farol="green";camada.farolTitle=$trad("t9")}if(temaObj.escala*1>i3GEO.parametros.mapscale*1){camada.farol="red";camada.farolTitle=$trad("t10")}if(temaObj.escala===0){camada.farol="yellow";camada.farolTitle=$trad("t11")}}else{camada.farol="hidden"}if(temaObj.contextoescala.toLowerCase()==="sim"){camada.contextoescala="";camada.contextoescalaTitle=$trad("t36")}else{camada.contextoescala="hidden"}if(temaObj.plugini3geo){var iconePlugin=i3GEO.pluginI3geo.clickArvoreDeCamadas(temaObj);if(iconePlugin!=false){camada.iconePlugin=iconePlugin}}if(temaObj.ferramentas){var html="",fer="",fers=temaObj.ferramentas;for(fer in fers){if(i3GEO.configura.ferramentasLayers[fer]){html+=i3GEO.configura.ferramentasLayers[fer].icone(temaObj.name)}}camada.iconeFerramentas=html}return camada},atualizaFarol:function(mapscale){var farol,l,ltema,escala,iu=i3GEO.util,im=i3GEO.configura.locaplic+"/imagens/",camadas=i3GEO.arvoreDeCamadas.CAMADAS;farol="maisamarelo.png";l=camadas.length-1;if(l>=0){do{ltema=camadas[l];escala=ltema.escala;if(escala*1<mapscale*1){farol="maisverde.png"}if(escala*1>mapscale*1){farol="maisvermelho.png"}if(escala*1===0){farol="maisamarelo.png"}iu.defineValor("farol"+ltema.name,"src",im+farol)}while(l--)}},aplicaTemas:function(tipo){if(arguments.length===0){tipo="normal"}var t="",temp;if(tipo==="normal"){t=i3GEO.arvoreDeCamadas.listaLigadosDesligados("mantem")}if(tipo==="ligartodos"){t=i3GEO.arvoreDeCamadas.listaLigadosDesligados("marca")}if(tipo==="desligartodos"){t=i3GEO.arvoreDeCamadas.listaLigadosDesligados("desmarca")}temp=function(){i3GEO.atualiza();i3GEO.janela.fechaAguarde("redesenha")};if(tipo==="normal"){i3GEO.php.ligatemas(temp,t[1].toString(),t[0].toString());return}if(tipo==="ligartodos"){i3GEO.php.ligatemas(temp,"",t[2].toString());return}if(tipo==="desligartodos"){i3GEO.php.ligatemas(temp,t[2].toString(),"")}},listaLigadosDesligados:function(){if(!i3GEO.arvoreDeCamadas.CAMADAS){return[[],[],[]]}var i=0,ligados=[],desligados=[],todos=[],camada,camadas=i3GEO.arvoreDeCamadas.CAMADAS;i=camadas.length;while(i>0){i-=1;camada=camadas[i];todos.push(camada["name"]);if(parseInt(camada["status"],10)===2){ligados.push(camada["name"])}else{desligados.push(camada["name"])}}return([ligados,desligados,todos])},listaLigadosDesligadosArvore:function(onde){if(!i3GEO.arvoreDeCamadas.CAMADAS){return[[],[],[]]}var n,i,ligados=[],desligados=[],todos=[],camada,camadas;camadas=$i(onde).getElementsByTagName("input");n=camadas.length;for(i=0;i<n;i++){camada=camadas[i];todos.push(camada.value);if(camada.checked==true){ligados.push(camada["name"])}else{desligados.push(camada["name"])}}return([ligados,desligados,todos])},capturaCheckBox:function(tema){var onde=$i(i3GEO.arvoreDeCamadas.config.idOnde),camadas,n,i;if(onde){camadas=onde.getElementsByTagName("input");n=camadas.length;for(i=0;i<n;i++){if(camadas[i].name==tema){return camadas[i]}}}return false},comparaTemas:function(novo,atual){try{var novon=novo.length,i;if(novon!==atual.length){return(false)}for(i=0;i<novon;i+=1){if(novo[i].name!==atual[i].name){return(false)}if(novo[i].tema!==atual[i].tema){return(false)}if(novo[i].sel!==atual[i].sel){return(false)}if(novo[i].status!==atual[i].status){return(false)}}return(true)}catch(e){return true}},pegaTema:function(valor,camadas,parametro){var i;if(!camadas||camadas==""){camadas=i3GEO.arvoreDeCamadas.CAMADAS}else{camadas=i3GEO.arvoreDeCamadas.converteChaveValor2normal(camadas)}if(!parametro){parametro="name"}i=camadas.length;while(i>0){i-=1;if(camadas[i][parametro]===valor){return camadas[i]}}return""},filtraCamadas:function(propriedade,valor,operador,camadas){if(!camadas){camadas=i3GEO.arvoreDeCamadas.CAMADAS}var resultado,i=0,temp,nelementos=camadas.length,ltema;resultado=[];if(nelementos>0){do{ltema=camadas[i];if(ltema.escondido.toLowerCase()!=="sim"){temp=ltema[propriedade];if(operador==="igual"){if(temp+"".toLowerCase()==valor+"".toLowerCase()){resultado.push(ltema)}}if(operador==="diferente"){if(temp+"".toLowerCase()!==valor+"".toLowerCase()){resultado.push(ltema)}}if(operador==="menor"){if(temp+"".toLowerCase()<valor+"".toLowerCase()){resultado.push(ltema)}}}i+=1}while(i<nelementos)}return resultado},alteraPropCamadas:function(propriedade,valor,camada){var i=0,nelementos=i3GEO.arvoreDeCamadas.CAMADAS.length,ltema;if(nelementos>0){do{ltema=i3GEO.arvoreDeCamadas.CAMADAS[i];if(ltema.name===camada){ltema[propriedade]=valor}i+=1}while(i<nelementos)}},verificaAbrangenciaTemas:function(){var nos=$("#"+i3GEO.arvoreDeCamadas.config.idOnde).find("input");$.each(nos,function(i,no){var ltema=i3GEO.arvoreDeCamadas.CAMADASINDEXADAS[no.value];var temp=ltema.exttema;if(temp!==""&&temp!=undefined){if(i3GEO.util.intersectaBox(temp,i3GEO.parametros.mapexten)===false){$(no).addClass(i3GEO.arvoreDeCamadas.config.verificaAbrangencia)}else{$(no).removeClass(i3GEO.arvoreDeCamadas.config.verificaAbrangencia)}}})},verificaAplicaExtensao:function(){var i=0,temp="",nelementos=i3GEO.arvoreDeCamadas.CAMADAS.length,ltema;try{if(nelementos>0){do{ltema=i3GEO.arvoreDeCamadas.CAMADAS[i];if(ltema.aplicaextensao.toLowerCase()==="sim"){temp=ltema.name}i+=1}while(i<nelementos)}}catch(e){return""}return temp},converteChaveValor2normal:function(obj){if(obj.chaves){var i,tema,j,t,chaves=obj.chaves,temas=obj.valores,ntemas=temas.length,nchaves=chaves.length,novo=[];for(i=0;i<ntemas;i++){tema=temas[i];t={};for(j=0;j<nchaves;j++){t[chaves[j]]=tema[j]}novo.push(t)}return novo}else{return obj}},registaCamadas:function(obj){var i;obj=i3GEO.arvoreDeCamadas.converteChaveValor2normal(obj);i3GEO.arvoreDeCamadas.CAMADAS=obj;i3GEO.arvoreDeCamadas.CAMADASINDEXADAS=[];$.each(i3GEO.arvoreDeCamadas.CAMADAS,function(i,tema){i3GEO.arvoreDeCamadas.CAMADASINDEXADAS[tema.name]=tema})},dialogo:{filtro:function(){i3GEO.util.dialogoFerramenta("i3GEO.arvoreDeCamadas.dialogo.filtro()","filtroarvore","filtroarvore","dependencias.php","i3GEOF.filtroarvore.iniciaJanelaFlutuante()")},excluir:function(){i3GEO.util.dialogoFerramenta("i3GEO.arvoreDeCamadas.dialogo.excluir()","excluirarvore","excluirarvore","dependencias.php","i3GEOF.excluirarvore.iniciaJanelaFlutuante()")}}};
//
//compactados/navega_compacto.js
if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.navega={EXTENSOES:{lista:[],redo:[],posicao:0,emAcao:false},offset:function(pixelx,pixely){if(i3GEO.Interface.ATUAL=="openlayers"){var view=i3geoOL.getView(),mover=[pixelx,pixely],s=i3geoOL.getSize(),dx=s[0]/2+mover[0],dy=s[1]/2+mover[1];view.centerOn(view.getCenter(),s,[dx,dy])}},ativaPan:function(){if(i3GEO.Interface.ATUAL==="googlemaps"){i3GeoMap.setOptions({draggable:true})}if(i3GEO.Interface.ATUAL==="openlayers"){marcadorZoom="";i3GEO.Interface.openlayers.OLpanel.activateControl(i3GEO.Interface.openlayers.OLpan)}},registraExt:function(ext){if(i3GEO.navega.EXTENSOES.emAcao==false){var l=i3GEO.navega.EXTENSOES.lista,n=l.length;if(n>10){l.shift()}n=l.length;if(n>0&&l[n-1]===ext){return}l.push(ext)}else{i3GEO.navega.EXTENSOES.emAcao=false}},extensaoAnterior:function(){i3GEO.navega.EXTENSOES.emAcao=true;var l=i3GEO.navega.EXTENSOES.lista,r=i3GEO.navega.EXTENSOES.redo,a=i3GEO.parametros.mapexten,e;if(l.length>0){if(l.length>1){e=l.pop();i3GEO.navega.zoomExt("","","",e);if(r.length>10){r.shift()}if(r.length>0&&r[r.length-1]===e){return}else{r.push(a)}}}else{l.push(i3GEO.parametros.mapexten)}},extensaoProximo:function(){var l=i3GEO.navega.EXTENSOES.lista,r=i3GEO.navega.EXTENSOES.redo,a=i3GEO.parametros.mapexten,e;i3GEO.navega.EXTENSOES.emAcao=true;if(r.length>0){i3GEO.navega.zoomExt("","","",r[r.length-1]);e=r.pop();if(l.length>10){l.pop()}if(l.length>0&&l[l.length-1]===e){return}l.push(a)}},pan2ponto:function(x,y){i3GEO.Interface[i3GEO.Interface.ATUAL].pan2ponto(x,y);i3GEO.Interface[i3GEO.Interface.ATUAL].recalcPar()},centroDoMapa:function(){var xy;switch(i3GEO.Interface.ATUAL){case"openlayers":xy=i3geoOL.getCenter();if(xy){return[xy.lon,xy.lat]}else{return false}break;case"googlemaps":xy=i3GeoMap.getCenter();if(xy){return[xy.lng(),xy.lat()]}else{return false}break;default:return false}},marcaCentroDoMapa:function(xy){var t=$i("i3GeoCentroDoMapa");if(t&&t.style.display==="block"){return}if(xy!=false){xy=i3GEO.calculo.dd2tela(xy[0]*1,xy[1]*1,$i(i3GEO.Interface.IDMAPA),i3GEO.parametros.mapexten,i3GEO.parametros.pixelsize);i3GEO.util.criaPin("i3GeoCentroDoMapa",i3GEO.configura.locaplic+'/imagens/alvo.png','30px','30px');i3GEO.util.posicionaImagemNoMapa("i3GeoCentroDoMapa",xy[0],xy[1])}},removeCookieExtensao:function(){var nomecookie="i3geoOLUltimaExtensao";if(i3GEO.Interface.openlayers.googleLike===true){nomecookie="i3geoUltima_ExtensaoOSM"}i3GEO.util.insereCookie(nomecookie,"")},zoomin:function(locaplic,sid){if(i3GEO.Interface.ATUAL==="openlayers"){i3geoOL.zoomIn();return}},zoomout:function(locaplic,sid){if(i3GEO.Interface.ATUAL==="openlayers"){i3geoOL.zoomOut();return}},zoomponto:function(locaplic,sid,x,y,tamanho,simbolo,cor){if(!simbolo){simbolo="ponto"}if(!tamanho){tamanho=15}if(!cor){cor="255 0 0"}if(locaplic!==""){i3GEO.configura.locaplic=locaplic}if(sid!==""){i3GEO.configura.sid=sid}i3GEO.php.zoomponto(i3GEO.atualiza,x,y,tamanho,simbolo,cor)},zoompontoIMG:function(locaplic,sid,x,y){if(locaplic!==""){i3GEO.configura.locaplic=locaplic}if(sid!==""){i3GEO.configura.sid=sid}i3GEO.php.pan(i3GEO.atualiza,'','',x,y)},xy2xy:function(locaplic,sid,xi,yi,xf,yf,ext,tipoimagem){var disty,distx,ex,novoxi,novoxf,novoyf,nex;if(locaplic!==""){i3GEO.configura.locaplic=locaplic}if(sid!==""){i3GEO.configura.sid=sid}disty=(yi*-1)+yf;distx=(xi*-1)+xf;ex=ext.split(" ");novoxi=(ex[0]*1)-distx;novoxf=(ex[2]*1)-distx;novoyi=(ex[1]*1)-disty;novoyf=(ex[3]*1)-disty;if((distx===0)&&(disty===0)){return false}else{nex=novoxi+" "+novoyi+" "+novoxf+" "+novoyf;i3GEO.navega.zoomExt(i3GEO.configura.locaplic,i3GEO.configura.sid,tipoimagem,nex);return true}},localizaIP:function(locaplic,sid,funcao){if(locaplic!==""){i3GEO.configura.locaplic=locaplic}if(sid!==""){i3GEO.configura.sid=sid}i3GEO.php.localizaIP(funcao)},zoomIP:function(locaplic,sid){try{if(arguments.length>0){i3GEO.configura.locaplic=locaplic;i3GEO.configura.sid=sid}var mostraIP=function(retorno){if(retorno.data.latitude!==null){i3GEO.navega.zoomponto(locaplic,sid,retorno.data.longitude,retorno.data.latitude)}else{i3GEO.janela.tempoMsg("Nao foi possivel identificar a localizacao.")}};i3GEO.navega.localizaIP(locaplic,sid,mostraIP)}catch(e){}},zoomExt:function(locaplic,sid,tipoimagem,ext){var f;if(locaplic!==""){i3GEO.configura.locaplic=locaplic}if(sid!==""){i3GEO.configura.sid=sid}if(tipoimagem===""){tipoimagem="nenhum"}ext=i3GEO.util.extGeo2OSM(ext);i3GEO.php.mudaext(function(retorno){i3GEO.atualiza(retorno)},tipoimagem,ext)},aplicaEscala:function(escala){if(i3GEO.Interface.ATUAL==="googlemaps"){i3GeoMap.setZoom(i3GEO.Interface.googlemaps.escala2nzoom(escala))}if(i3GEO.Interface.ATUAL==="openlayers"){i3geoOL.zoomToScale(escala,true);i3GEO.parametros.mapscale=parseInt(i3geoOL.getScale(),10)}},atualizaEscalaNumerica:function(escala){console.log("atualizaEscalaNumerica");var e=$i("i3GEOescalanum");if(!e){return}if(arguments.length===1){e.value=$.number(escala,0,$trad("dec"),$trad("mil"))}else{if(i3GEO.Interface.ATUAL==="googlemaps"){e.value=parseInt(i3GEO.parametros.mapscale,10)}if(i3GEO.Interface.ATUAL==="openlayers"){e.value=$.number(i3geoOL.getScale(),0,$trad("dec"),$trad("mil"))}}},panFixo:function(){alert("panFixo foi depreciado na versao 6.0")},mostraRosaDosVentos:function(){alert("mostraRosaDosVentos foi depreciado na versao 6.0")},autoRedesenho:{INTERVALO:0,ID:"tempoRedesenho",ativa:function(id){if(arguments.length===0){id="tempoRedesenho"}i3GEO.navega.autoRedesenho.ID=id;if(($i(id))&&i3GEO.navega.autoRedesenho.INTERVALO>0){$i(id).style.display="block"}if(i3GEO.navega.autoRedesenho.INTERVALO>0){i3GEO.navega.tempoRedesenho=setTimeout('i3GEO.navega.autoRedesenho.redesenha()',i3GEO.navega.autoRedesenho.INTERVALO)}if(($i(id))&&(i3GEO.navega.autoRedesenho.INTERVALO>0)){$i(id).innerHTML=i3GEO.navega.autoRedesenho.INTERVALO/1000;i3GEO.navega.contaTempoRedesenho=setTimeout('i3GEO.navega.autoRedesenho.contagem()',1000)}},desativa:function(){i3GEO.navega.autoRedesenho.INTERVALO=0;clearTimeout(i3GEO.navega.tempoRedesenho);clearTimeout(i3GEO.navega.contaTempoRedesenho);i3GEO.navega.tempoRedesenho="";i3GEO.navega.contaTempoRedesenho="";if($i(i3GEO.navega.autoRedesenho.ID)){$i(i3GEO.navega.autoRedesenho.ID).style.display="none"}},redesenha:function(){clearTimeout(i3GEO.navega.tempoRedesenho);clearTimeout(i3GEO.navega.contaTempoRedesenho);switch(i3GEO.Interface.ATUAL){case"openlayers":i3GEO.Interface.openlayers.atualizaMapa();break;case"googlemaps":i3GEO.Interface.googlemaps.redesenha();break;default:i3GEO.atualiza("")}i3GEO.navega.autoRedesenho.ativa(i3GEO.navega.autoRedesenho.ID)},contagem:function(){if($i(i3GEO.navega.autoRedesenho.ID)){$i(i3GEO.navega.autoRedesenho.ID).innerHTML=parseInt($i(i3GEO.navega.autoRedesenho.ID).innerHTML,10)-1}i3GEO.navega.contaTempoRedesenho=setTimeout('i3GEO.navega.autoRedesenho.contagem()',1000)}},zoomBox:{inicia:function(){alert("zoomBox depreciado na versao 6.0")}},lente:{POSICAOX:0,POSICAOY:0,ESTAATIVA:"nao",inicia:function(){if(i3GEO.navega.lente.ESTAATIVA!="nao"){i3GEO.navega.lente.desativa();return}var novoel,novoimg,temp;if(!$i("lente")){novoel=document.createElement("div");novoel.id='lente';novoel.style.clip='rect(0px,0px,0px,0px)';novoimg=document.createElement("img");novoimg.src="";novoimg.id='lenteimg';novoel.appendChild(novoimg);document.body.appendChild(novoel);novoel=document.createElement("div");novoel.id='boxlente';document.body.appendChild(novoel)}temp=$i('boxlente').style;temp.borderWidth='1';temp.borderColor="red";temp.display="block";$i("lente").style.display="block";i3GEO.navega.lente.ESTAATIVA="sim";i3GEO.navega.lente.atualiza();i3GEO.eventos.adicionaEventos("NAVEGAMAPA",["i3GEO.navega.lente.atualiza()"]);i3GEO.eventos.adicionaEventos("MOUSEMOVE",["i3GEO.navega.lente.movimenta()"])},atualiza:function(){var temp=function(retorno){try{var pos,volta,nimg,olente,oboxlente,olenteimg;retorno=retorno.data;if(retorno==="erro"){i3GEO.janela.tempoMsg("A lente nao pode ser criada");return}volta=retorno.split(",");nimg=volta[2];olente=$i('lente');oboxlente=$i('boxlente');olenteimg=$i('lenteimg');olenteimg.src=nimg;olenteimg.style.width=volta[0]*1.5+"px";olenteimg.style.height=volta[1]*1.5+"px";olente.style.zIndex=1000;olenteimg.style.zIndex=1000;oboxlente.style.zIndex=1000;pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDMAPA));olente.style.left=pos[0]+i3GEO.navega.lente.POSICAOX+"px";olente.style.top=pos[1]+i3GEO.navega.lente.POSICAOY+"px";oboxlente.style.left=pos[0]+i3GEO.navega.lente.POSICAOX+"px";oboxlente.style.top=pos[1]+i3GEO.navega.lente.POSICAOY+"px";oboxlente.style.display='block';oboxlente.style.visibility='visible';olente.style.display='block';olente.style.visibility='visible';i3GEO.janela.fechaAguarde("ajaxabrelente")}catch(e){i3GEO.janela.fechaAguarde()}};if(i3GEO.navega.lente.ESTAATIVA==="sim"){i3GEO.php.aplicaResolucao(temp,1.5)}else{i3GEO.navega.lente.desativa()}},desativa:function(){$i("lente").style.display="none";$i("boxlente").style.display="none";$i('boxlente').style.borderWidth=0;i3GEO.navega.lente.ESTAATIVA="nao";i3GEO.eventos.removeEventos("MOUSEMOVE",["i3GEO.navega.lente.movimenta()"]);i3GEO.eventos.removeEventos("NAVEGAMAPA",["i3GEO.navega.lente.atualiza()"])},movimenta:function(){try{if(i3GEO.navega.lente.ESTAATIVA==="sim"){var pos=[0,0],esq,topo,clipt,i;if($i("lente").style.visibility==="visible"){pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDMAPA))}esq=(objposicaocursor.telax-pos[0])*2.25;topo=(objposicaocursor.telay-pos[1])*2.25;clipt="rect("+(topo-120)+"px "+(esq+120)+"px "+(topo+120)+"px "+(esq-120)+"px)";i=$i("lente").style;i.clip=clipt;i.top=pos[1]-(topo-120)+"px";i.left=pos[0]-(esq-120)+"px"}}catch(e){}}},destacaTema:{TAMANHO:75,ESTAATIVO:"nao",TEMA:"",inicia:function(tema){var novoel,novoeli,janela,pos;if(!$i("img_d")){pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDMAPA));novoel=document.createElement("div");novoel.id="div_d";novoel.style.zIndex=5000;document.body.appendChild(novoel);$i("div_d").innerHTML="<input style='position:relative;top:0px;left:0px'' type=image src='' id='img_d' />";$i("div_d").style.left=parseInt(pos[0],10)+"px";$i("div_d").style.top=parseInt(pos[1],10)+"px";$i("img_d").style.left=0+"px";$i("img_d").style.top=0+"px";$i("img_d").style.width=i3GEO.parametros.w+"px";$i("img_d").style.height=i3GEO.parametros.h+"px";$i("div_d").style.clip='rect(0px 75px 75px 0px)'}i3GEO.navega.destacaTema.TEMA=tema;i3GEO.navega.destacaTema.ESTAATIVO="sim";i3GEO.navega.destacaTema.atualiza();janela=i3GEO.janela.cria(200,150,"","center","center","<span class='i3GeoTituloJanelaBsNolink' >"+$trad("x50")+"</span></div>","ativadesativaDestaque",false,"hd","","","",true,"","","","");$i(janela[2].id).innerHTML="<div class='container-fluid'>"+"<h5 class='alert alert-info'>"+$trad("x91")+"</h5>"+"<div class='form-group condensed'>"+"<button onclick='i3GEO.navega.destacaTema.TAMANHO = i3GEO.navega.destacaTema.TAMANHO + 20' class='btn btn-xs' style='margin:2px;padding:2px;'><span class='material-icons'>add_circle_outline</span></button>"+"<button onclick='i3GEO.navega.destacaTema.TAMANHO = i3GEO.navega.destacaTema.TAMANHO - 20' class='btn btn-xs' style='margin:2px;padding:2px;'><span class='material-icons'>remove_circle_outline</span></button>"+"</div></div>";$(janela[0].close).click(i3GEO.navega.destacaTema.desativa);i3GEO.eventos.adicionaEventos("NAVEGAMAPA",["i3GEO.navega.destacaTema.atualiza()"]);i3GEO.eventos.adicionaEventos("MOUSEMOVE",["i3GEO.navega.destacaTema.movimenta()"])},atualiza:function(){if(i3GEO.navega.destacaTema.ESTAATIVO==="nao"){return}var temp=function(retorno){var m,novoel;retorno=retorno.data;m=new Image();m.src=retorno;$i("div_d").innerHTML="";$i("div_d").style.display="block";novoel=document.createElement("input");novoel.id="img_d";novoel.style.position="relative";novoel.style.top="0px";novoel.style.left="0px";novoel.type="image";novoel.src=m.src;novoel.style.display="block";$i("div_d").appendChild(novoel);i3GEO.janela.fechaAguarde("ajaxdestaca")};i3GEO.php.geradestaque(temp,i3GEO.navega.destacaTema.TEMA,i3GEO.parametros.mapexten)},desativa:function(){i3GEO.eventos.removeEventos("NAVEGAMAPA",["i3GEO.navega.destacaTema.atualiza()"]);i3GEO.eventos.removeEventos("MOUSEMOVE",["i3GEO.navega.destacaTema.movimenta()"]);i3GEO.navega.destacaTema.ESTAATIVO="nao";document.body.removeChild($i("div_d"))},movimenta:function(){if(i3GEO.navega.destacaTema.ESTAATIVO==="sim"){$i("div_d").style.clip='rect('+(objposicaocursor.imgy-i3GEO.navega.destacaTema.TAMANHO)+"px "+(objposicaocursor.imgx-10)+"px "+(objposicaocursor.imgy-10)+"px "+(objposicaocursor.imgx-i3GEO.navega.destacaTema.TAMANHO)+'px)'}}},barraDeZoom:{cria:function(){alert("barraDeZoom depreciado na versao 6.0")}},dialogo:{wiki:function(){i3GEO.util.dialogoFerramenta("i3GEO.navega.dialogo.wiki()","wiki","wiki","dependencias.php","i3GEOF.wiki.iniciaJanelaFlutuante()")},metar:function(){i3GEO.util.dialogoFerramenta("i3GEO.navega.dialogo.metar()","metar","metar","dependencias.php","i3GEOF.metar.iniciaJanelaFlutuante()")},buscaFotos:function(){i3GEO.util.dialogoFerramenta("i3GEO.navega.dialogo.buscaFotos()","buscafotos","buscaFotos","dependencias.php","i3GEOF.buscaFotos.iniciaJanelaFlutuante()")},google:function(coordenadas){i3GEO.navega.dialogo.google.coordenadas=coordenadas;var temp,janela,idgoogle="googlemaps"+Math.random();janela=i3GEO.janela.cria((i3GEO.parametros.w/2.5)+25+"px",(i3GEO.parametros.h/2.5)+18+"px",i3GEO.configura.locaplic+"/ferramentas/googlemaps1/index.php","","","<span class='i3GeoTituloJanelaBsNolink' >Google maps</span></div>",idgoogle,false,"hd","","","",false,"","","","","68");temp=function(){i3GEO.desenho.removePins("boxOndeGoogle");i3GEO.desenho.removePins("googlemaps")};$(janela[0].close).click(temp)},confluence:function(){i3GEO.util.dialogoFerramenta("i3GEO.navega.dialogo.confluence()","confluence","confluence","dependencias.php","i3GEOF.confluence.iniciaJanelaFlutuante()")}},atualizaGoogle:function(idgoogle){try{parent.frames[idgoogle+"i"].panTogoogle()}catch(e){i3GEO.eventos.removeEventos("NAVEGAMAPA",["i3GEO.navega.atualizaGoogle('"+idgoogle+"')"]);i3GEO.desenho.removePins("googlemaps");i3GEO.desenho.removePins("boxOndeGoogle")}},dragZoom:function(){i3GEO.navega.dragZoom.draw=new ol.interaction.Draw({type:"Circle",freehand:false,geometryFunction:ol.interaction.Draw.createRegularPolygon(4)});i3GEO.navega.dragZoom.draw.setActive(false);i3GEO.navega.dragZoom.draw.on("drawend",function(evt){var pol=evt.feature.getGeometry();i3geoOL.getView().fit(pol);i3GEO.navega.dragZoom.draw.setActive(false)});document.body.addEventListener('keydown',function(event){if(event.keyCode==16){i3GEO.navega.dragZoom.draw.setActive(true)}});document.body.addEventListener('keyup',function(event){if(event.keyCode==16){i3GEO.navega.dragZoom.draw.setActive(false)}});return i3GEO.navega.dragZoom.draw}};
//
//compactados/eventos_compacto.js
if(typeof(i3GEO)==='undefined'){var i3GEO={}}var objposicaocursor={ddx:"",ddy:"",dmsx:"",dmsy:"",telax:"",telay:"",imgx:"",imgy:"",refx:"",refy:""};i3GEO.eventos={CONTATOUCH:0,MOUSEOVERDATA:[],MOUSEOUTDATA:[],RESIZE:[],SELECAO:[],ATUALIZAARVORECAMADAS:[],ATIVATEMA:[],NAVEGAMAPA:[],MOUSEPARADO:[],MOUSEMOVE:[],MOUSEDOWN:[],MOUSEUP:["i3GEO.eventos.cliquePerm.executa()"],MOUSECLIQUE:["i3GEO.eventos.cliqueCapturaPt()"],MOUSECLIQUEPERM:["i3GEO.mapa.dialogo.verificaTipDefault()"],TIMERPARADO:"",mouseOverData:function(){i3GEO.eventos.executaEventos(this.MOUSEOVERDATA)},mouseOutData:function(){i3GEO.eventos.executaEventos(this.MOUSEOUTDATA)},mouseParado:function(){try{clearTimeout(this.TIMERPARADO)}catch(e){this.TIMERPARADO=""}if(objposicaocursor.dentroDomapa===false){return}try{if(objposicaocursor.imgy===""){objposicaocursor.imgy=1;objposicaocursor.imgx=1}if(i3GEO.eventos.MOUSEPARADO.length>0&&objposicaocursor.imgy>0&&objposicaocursor.imgx>0){if(objposicaocursor.imgx>0){i3GEO.eventos.executaEventos(i3GEO.eventos.MOUSEPARADO)}}}catch(e){}},navegaMapa:function(){i3GEO.eventos.executaEventos(this.NAVEGAMAPA)},mousemoveMapa:function(){i3GEO.eventos.executaEventos(this.MOUSEMOVE)},mousedownMapa:function(){i3GEO.eventos.executaEventos(this.MOUSEDOWN)},mouseupMapa:function(exy){if(!exy){i3GEO.eventos.executaEventos(this.MOUSEUP)}else{if(i3GEO.Interface.ATUAL==="googlemaps"&&exy.target&&!exy.target.src){if(i3GEOtouchesPosMapa===""){i3GEOtouchesPosMapa=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDMAPA))}pos=i3GEOtouchesPosMapa;p=new google.maps.Point(exy.clientX-pos[0],exy.clientY-pos[1]);e=null;lonlat=i3GeoMapOverlay.getProjection().fromContainerPixelToLatLng(p);if(lonlat){objposicaocursor.ddx=lonlat.lng();objposicaocursor.ddy=lonlat.lat()}i3GEO.eventos.executaEventos(this.MOUSEUP)}else if(i3GEO.Interface.ATUAL==="openlayers"&&exy.target&&exy.target.tagName==="CANVAS"){i3GEO.eventos.executaEventos(this.MOUSEUP)}}},mousecliqueMapa:function(){i3GEO.eventos.executaEventos(this.MOUSECLIQUE)},resizeMapa:function(){i3GEO.eventos.executaEventos(this.RESIZE)},executaEventos:function(eventos){if(i3GEO.Interface.STATUS.pan===true){return}var f=0;try{if(eventos.length>0){f=eventos.length-1;if(f>=0){do{if(eventos[f]!==""){if(typeof(eventos[f])==="function"){eventos[f].call()}else{eval(eventos[f])}}}while(f--)}}}catch(e){eventos[f]=""}},removeEventos:function(tipo,eventos){var i,n=eventos.length;for(i=0;i<n;i++){i3GEO.eventos[tipo].remove(eventos[i])}i3GEO.eventos[tipo].remove("");i3GEO.eventos[tipo]=i3GEO.eventos[tipo].getUnique()},adicionaEventos:function(tipo,eventos){if(eventos==""){i3GEO.eventos[tipo]=i3GEO.eventos[tipo].getUnique();return}var i,n=eventos.length;for(i=0;i<n;i++){i3GEO.eventos[tipo].push(eventos[i])}i3GEO.eventos[tipo]=i3GEO.eventos[tipo].getUnique()},posicaoMouseMapa:function(e){var teladd,teladms,container="",targ="",pos,mousex,mousey,xfig,yfig,xreffig,yreffig,xtela,ytela,c,ex;if(!e){e=window.event}try{if(e.target){targ=e.target}else if(e.srcElement){targ=e.srcElement}if(targ.parentNode){container=targ.parentNode.id}}catch(erro){return}if(container!=="mapaReferencia"){return}pos=i3GEO.util.pegaPosicaoObjeto(targ);mousex=0;mousey=0;if(e.pageX||e.pageY){mousex=e.pageX;mousey=e.pageY}else if(e.clientX||e.clientY){mousex=e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;mousey=e.clientY+document.body.scrollTop+document.documentElement.scrollTop}xfig=mousex-pos[0];yfig=mousey-pos[1];xreffig=xfig;yreffig=yfig;xtela=mousex;ytela=mousey;c=i3GEO.parametros.celularef;ex=i3GEO.parametros.extentref;teladd=i3GEO.calculo.tela2dd(xfig,yfig,c,ex,targ.id);teladms=i3GEO.calculo.dd2dms(teladd[0],teladd[1]);objposicaocursor={ddx:teladd[0],ddy:teladd[1],dmsx:teladms[0],dmsy:teladms[1],telax:xtela,telay:ytela,imgx:xfig,imgy:yfig,refx:xreffig,refy:yreffig,dentroDomapa:true}},ativa:function(docMapa){if(!docMapa){return}var timer=0;var delay=300;var prevent=false;docMapa.onmouseover=function(){objposicaocursor.dentroDomapa=true;this.onmousemove=function(exy){i3GEO.eventos.cliquePerm.status=true;i3GEO.eventos.posicaoMouseMapa(exy);try{i3GEO.eventos.mousemoveMapa()}catch(e){}}};docMapa.onmouseout=function(){objposicaocursor.dentroDomapa=false};docMapa.onmousedown=function(exy){if(objposicaocursor.dentroDomapa===false){return}i3GEO.eventos.mousedownMapa()};docMapa.onclick=function(exy){if(objposicaocursor.dentroDomapa===false){return}i3GEO.eventos.mousecliqueMapa(exy)};docMapa.ondblclick=function(){if(objposicaocursor.dentroDomapa===false){return}clearTimeout(timer);prevent=true};docMapa.onmouseup=function(exy){if(objposicaocursor.dentroDomapa===false){return}if(i3GEO.Interface.ATUAL==="googlemaps"){if(modoAtual==="move"){modoAtual="";return}}i3GEO.eventos.cliquePerm.status=true;timer=setTimeout(function(){if(!prevent){i3GEO.eventos.mouseupMapa(exy)}prevent=false},delay)};docMapa.ontouchmove=function(exy){i3GEO.eventos.CONTATOUCH++;i3GEO.Interface.STATUS.pan=true;i3GEO.eventos.posicaoMouseMapa(exy)};docMapa.ontouchcancel=function(exy){i3GEO.eventos.CONTATOUCH=0}},botaoDireita:function(exy){try{var k=(navm)?event.button:exy.button;if(k!==2){return false}else{return true}}catch(e){return false}},cliqueCapturaPt:function(ixg,ixm,ixs,iyg,iym,iys){var x,y,doc=document;if(arguments.length===0){ixg="ixg";ixm="ixm";ixs="ixs";iyg="iyg";iym="iym";iys="iys";if($i("wdocai")){doc=(navm)?document.frames("wdocai").document:$i("wdocai").contentDocument}}try{if(doc){x=objposicaocursor.dmsx.split(" ");y=objposicaocursor.dmsy.split(" ");if(doc.getElementById(ixg)){doc.getElementById(ixg).value=x[0]}if(doc.getElementById(ixm)){doc.getElementById(ixm).value=x[1]}if(doc.getElementById(ixs)){doc.getElementById(ixs).value=$.number(x[2],2,$trad("dec"),$trad("mil"))}if(doc.getElementById(iyg)){doc.getElementById(iyg).value=y[0]}if(doc.getElementById(iym)){doc.getElementById(iym).value=y[1]}if(doc.getElementById(iys)){doc.getElementById(iys).value=$.number(y[2],2,$trad("dec"),$trad("mil"))}}}catch(m){}},cliquePerm:{ativo:true,status:true,executa:function(evt){if(i3GEO.eventos.cliquePerm.ativo===true&&i3GEO.eventos.cliquePerm.status===true){i3GEO.eventos.executaEventos(i3GEO.eventos.MOUSECLIQUEPERM)}},ativa:function(){if(i3GEO.eventos.cliquePerm.ativoinicial===true){i3GEO.eventos.cliquePerm.ativo=true}},desativa:function(){if(i3GEO.eventos.cliquePerm.ativoinicial===true){i3GEO.eventos.cliquePerm.ativo=false}},ativoinicial:true}};
//
//compactados/arvoredetemas_compacto.js
if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.arvoreDeTemas={IDSMENUS:[],buscaTema2:function(palavra){if(palavra===""){return}var busca,root,nodePalavra="";resultadoProcurar=function(retorno){var ig,montaTexto=function(ngSgrupo){var tempn,ngTema,tempng,mostra,d,lk="",st,sg;tempn=ngSgrupo.length;for(sg=0;sg<tempn;sg+=1){ngTema=ngSgrupo[sg].temas;tempng=ngTema.length;for(st=0;st<tempng;st+=1){mostra=true;try{if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&ngTema[st].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&ngTema[st].ogc==="nao"){mostra=false}}catch(e){}if(mostra){d=i3GEO.arvoreDeTemas.montaTextoTema("gray",ngTema[st]);if(ngTema[st].link!==" "){lk="<a href='"+ngTema[st].link+"' target='blank'>&nbsp;fonte</a>"}if(ngSgrupo[sg].subgrupo){d+="<td style='text-allign:left'> ("+(ngSgrupo[sg].subgrupo)+") "+lk+"</td>"}else{d+="<td style='text-allign:left'> ("+(ngSgrupo[sg].grupo)+")"+lk+"</td>"}}conta+=1}}}};busca=function(){i3GEO.php.procurartemas2(resultadoProcurar,i3GEO.util.removeAcentos(palavra))}},comboMenus:function(locaplic,funcaoOnchange,idDestino,idCombo,largura,altura){i3GEO.configura.locaplic=locaplic;var combo=function(retorno){var ob,ins,ig;ob=retorno.data;ins="<select id='"+idCombo+"' SIZE="+altura+" style=width:"+largura+"px onchange='"+funcaoOnchange+"(this.value)' ><option value='' >Escolha um menu:</option>";for(ig=0;ig<ob.length;ig+=1){if(ob[ig].publicado!=="nao"&&ob[ig].publicado!=="NAO"){if(ob[ig].nomemenu){ins+="<option value="+ob[ig].idmenu+" >"+ob[ig].nomemenu+"</option>"}}}$i(idDestino).innerHTML=ins+"</select>";return retorno.data};i3GEO.php.pegalistademenus(combo)},comboGruposMenu:function(locaplic,funcaoOnchange,idDestino,idCombo,largura,altura,id_menu){i3GEO.configura.locaplic=locaplic;i3GEO.arvoreDeTemas.temasRaizGrupos=[];var combo=function(retorno){var ins,ig,obGrupos=retorno.data;ins="<select id='"+idCombo+"' SIZE="+altura+" style=width:"+largura+"px onchange='"+funcaoOnchange+"(this.value)' ><option value='' >Escolha um grupo:</option>";for(ig=0;ig<obGrupos.grupos.length;ig+=1){if(obGrupos.grupos[ig].nome){ins+="<option value="+obGrupos.grupos[ig].id_n1+" >"+obGrupos.grupos[ig].nome+"</option>"}i3GEO.arvoreDeTemas.temasRaizGrupos[obGrupos.grupos[ig].id_n1]=obGrupos.grupos[ig].temasgrupo}$i(idDestino).innerHTML=ins+"</select>"};i3GEO.php.pegalistadegrupos(combo,id_menu,"nao")},comboSubGruposMenu:function(locaplic,funcaoOnchange,idDestino,idCombo,idGrupo,largura,altura){if(idGrupo!==""){var combo=function(retorno){var ins,sg,ig;ins="<select id='"+idCombo+"' size="+altura+" style=width:"+largura+"px onchange='"+funcaoOnchange+"(\""+idGrupo+"\",this.value)' ><option value='' >Escolha um sub-grupo:</option>";if(retorno.data.subgrupo){sg=retorno.data.subgrupo;for(ig=0;ig<sg.length;ig+=1){ins+="<option value="+sg[ig].id_n2+" >"+sg[ig].nome+"</option>"}}$i(idDestino).innerHTML=ins+"</select>"};i3GEO.php.pegalistadeSubgrupos(combo,"",idGrupo)}},comboTemasMenu:function(locaplic,funcaoOnchange,idDestino,idCombo,idGrupo,idSubGrupo,largura,altura,id_menu,temas){var combo=function(retorno){var ins,sg,ig;if(idSubGrupo!=""){ins="<select id='"+idCombo+"' size="+altura+" style=width:"+largura+"px onchange='"+funcaoOnchange+"("+idGrupo+","+idSubGrupo+",this.value)' ><option value='' >Escolha um tema:</option>"}else{ins="<select id='"+idCombo+"' size="+altura+" style=width:"+largura+"px onchange='"+funcaoOnchange+"("+idGrupo+",\"\",this.value)' ><option value='' >Escolha um tema:</option>"}if(typeof(retorno.data)!=='undefined'){retorno=retorno.data.temas}sg=retorno.length;for(ig=0;ig<sg;ig++){ins+="<option value="+retorno[ig].tid+" >"+retorno[ig].nome+"</option>"}$i(idDestino).innerHTML=ins+"</select>"};if(typeof(temas)==='undefined'||temas===""){i3GEO.php.pegalistadetemas(combo,id_menu,idGrupo,idSubGrupo)}else{combo(temas)}},dialogo:{uploadarquivo:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/uploadarquivos/dependencias.php","i3GEOF.uploadarquivos.iniciaJanelaFlutuante()","i3GEOF.uploadarquivos_script")},conectaservico:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/conectarservicos/dependencias.php","i3GEOF.conectarservicos.iniciaJanelaFlutuante()","i3GEOF.conectarservicos_script")},carouselTemas:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/carouseltemas/index.js","i3GEOF.carouseltemas.criaJanelaFlutuante()","i3GEOF.carouseltemas_script")},buscaInde:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/buscainde/dependencias.php","i3GEOF.buscainde.iniciaJanelaFlutuante()","i3GEOF.buscainde_script")},nuvemTags:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/nuvemtags/dependencias.php","i3GEOF.nuvemtags.iniciaJanelaFlutuante()","i3GEOF.nuvemtags_script")},nuvemTagsFlash:function(){i3GEO.janela.cria("550px","350px",i3GEO.configura.locaplic+"/ferramentas/nuvemtagsflash/index.htm","","",$trad("x44"))},navegacaoDir:function(){i3GEO.janela.cria("550px","350px",i3GEO.configura.locaplic+"/ferramentas/navegacaodir/index.htm","","","<div class='i3GeoTituloJanela'>"+$trad("x45")+"</div>")},importarwmc:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/importarwmc/dependencias.php","i3GEOF.importarwmc.iniciaJanelaFlutuante()","i3GEOF.importarwmc_script")},conectarwfs:function(){i3GEO.janela.cria("400px","300px",i3GEO.configura.locaplic+"/ferramentas/conectarwfs/index.htm","","","<div class='i3GeoTituloJanela'>WFS</div>")},downloadbase:function(){window.open(i3GEO.configura.locaplic+"/datadownload.htm")}}};
//
//compactados/editor_compacto.js
if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.editor={_mascCompose:"",_interacoes:"",_idsSelecionados:[],_copia:[],_backup:new ol.layer.Vector({source:new ol.source.Vector({features:new ol.Collection(),useSpatialIndex:false,name:"Backup"}),visible:false}),_featuresBackup:[],_simbologia:{opacidade:0.4,texto:"",fillColor:"250,180,15",strokeWidth:5,strokeColor:"250,150,0",pointRadius:6,graphicName:"square",fontSize:"12px",fontColor:"0,0,0",externalGraphic:"",graphicHeight:25,graphicWidth:25},_freehand:false,_snap:false,_snapInteraction:"",_tolerance:10,toggleSnap:function(){if(i3GEO.editor._snap==true){i3geoOL.addInteraction(i3GEO.editor.getSnap())}else{i3geoOL.removeInteraction(i3GEO.editor._snapInteraction)}},getSnap:function(){if(i3GEO.editor._snapInteraction==""){i3GEO.editor._snapInteraction=new ol.interaction.Snap({source:i3GEO.desenho.layergrafico.getSource(),pixelTolerance:i3GEO.editor._tolerance})}return i3GEO.editor._snapInteraction},copy:function(){var f=i3GEO.editor.sel.getFeatures(),n=f.length,i=0,clone;i3GEO.editor._copia=[];for(i=0;i<n;i++){clone=f[i].clone();clone.setId(i3GEO.util.uid());i3GEO.editor._copia.push(clone)}},paste:function(){var n=i3GEO.editor._copia.length,i=0,clone;i3GEO.desenho.layergrafico.getSource().addFeatures(i3GEO.editor._copia);for(i=0;i<n;i++){i3GEO.editor._idsSelecionados.push(i3GEO.editor._copia[i].getId())}i3GEO.editor._copia=[]},masc:function(){if(i3GEO.editor._mascCompose==""){i3GEO.editor.addMasc()}else{i3GEO.editor.removeMasc()}},removeMasc:function(){ol.Observable.unByKey(i3GEO.editor._mascCompose);i3GEO.editor._mascCompose="";i3geoOL.renderSync()},addMasc:function(){var nsel=i3GEO.editor._idsSelecionados.length,s=i3GEO.desenho.layergrafico.getSource(),feature;if(nsel!=1){i3GEO.janela.tempoMsg($trad("selum"))}else{feature=s.getFeatureById(i3GEO.editor._idsSelecionados[0]);var style=new ol.style.Style({stroke:new ol.style.Stroke({color:'rgba('+i3GEO.editor._simbologia.strokeColor+','+i3GEO.editor._simbologia.opacidade+')',width:i3GEO.editor._simbologia.strokeWidth}),fill:new ol.style.Fill({color:"rgba('0,0,0,0.1')"})});var a=i3geoOL.on('precompose',function(event){var ctx=event.context;var vecCtx=event.vectorContext;ctx.save();vecCtx.drawFeature(feature,style);ctx.clip()});var b=i3geoOL.on('postcompose',function(event){var ctx=event.context;ctx.restore()});i3geoOL.renderSync();i3GEO.editor.sel.deleteFeatures();i3GEO.editor._mascCompose=[a,b]}},sel:{unselFeature:function(id){i3GEO.editor.sel.un(id)},confirmDelete:function(){var x,nsel=i3GEO.editor._idsSelecionados.length;i3GEO.editor._featuresBackup=[];if(nsel>0){x=window.confirm($trad("excsel")+"?");if(x){i3GEO.editor.sel.deleteFeatures();i3GEO.desenho.layergrafico.getSource().changed()}}else{i3GEO.janela.tempoMsg($trad("selum"))}},getFeatures:function(){var s,i,nsel,f,sel=[];nsel=i3GEO.editor._idsSelecionados.length;s=i3GEO.desenho.layergrafico.getSource();for(i=0;i<nsel;i++){f=s.getFeatureById(i3GEO.editor._idsSelecionados[i]);if(f){sel.push(f)}}return sel},getFeaturesByType:function(type){var f,n=i3GEO.editor._idsSelecionados.length,lista=[],i,s=i3GEO.desenho.layergrafico.getSource();for(i=0;i<n;i++){f=s.getFeatureById(i3GEO.editor._idsSelecionados[i]);if(f.getGeometry().getType()==type){lista.push(f)}}return lista},deleteFeatures:function(){var s,i,nsel,f;nsel=i3GEO.editor._idsSelecionados.length;s=i3GEO.desenho.layergrafico.getSource();for(i=0;i<nsel;i++){f=s.getFeatureById(i3GEO.editor._idsSelecionados[i]);if(f){i3GEO.editor._featuresBackup.push(f.clone());s.removeFeature(f)}}i3GEO.editor._idsSelecionados=[];i3GEO.editor.tableRefresh()},setPropertiesDefault:function(feature){var style=feature.getStyle();if(style&&style.getImage()){if(style.getImage().getSrc){feature.setProperties({fillColor:"",strokeColor:"",externalGraphic:style.getImage().getSrc(),graphicHeight:style.getImage().getSize()[1],graphicWidth:style.getImage().getSize()[0]})}else{feature.setProperties({fillColor:style.getImage().getFill().getColor(),strokeColor:style.getImage().getStroke().getColor(),externalGraphic:"",graphicHeight:"",graphicWidth:""})}}else if(style){if(style.getFill()){feature.setProperties({fillColor:style.getFill().getColor()})}if(style.getStroke()){feature.setProperties({strokeColor:style.getStroke().getColor()})}}},all:function(idfeature){if(!idfeature){i3GEO.editor.sel.un()}var features,n,f,i,id,st;features=i3GEO.desenho.layergrafico.getSource().getFeatures();n=features.length;for(i=0;i<n;i++){f=features[i];id=f.getId();if(idfeature&&idfeature!=id){continue}if(!id||id==""||id==undefined){id=i3GEO.util.uid();f.setId(id)}if(i3GEO.editor._idsSelecionados.indexOf(id)<0){i3GEO.editor._idsSelecionados.push(id)}i3GEO.editor.sel.setPropertiesDefault(f);st=f.getStyle();if(st&&st.getImage()){f.setStyle(new ol.style.Style({image:new ol.style.Circle({radius:i3GEO.editor._simbologia.pointRadius,fill:new ol.style.Fill({color:'rgba(255, 255, 255, 0.5)'}),stroke:new ol.style.Stroke({color:'blue',width:i3GEO.editor._simbologia.pointRadius/3})})}))}else if(st){if(st.getFill()){st.getFill().setColor('rgba(255, 255, 255, 0.5)')}if(st.getStroke()){st.getStroke().setColor('blue')}}}i3GEO.desenho.layergrafico.getSource().changed()},un:function(id){var i,n,f,s,st;s=i3GEO.desenho.layergrafico.getSource();n=i3GEO.editor._idsSelecionados.length;for(i=0;i<n;i++){if(id&&id!=i3GEO.editor._idsSelecionados[i]){continue}f=s.getFeatureById(i3GEO.editor._idsSelecionados[i]);if(f){st=f.getStyle();if(st&&st.getImage()){if(st.getImage().getSrc||f.getProperties().externalGraphic!=""){f.setStyle(new ol.style.Style({image:new ol.style.Icon({src:f.getProperties().externalGraphic,size:[f.getProperties().graphicWidth,f.getProperties().graphicHeight]})}))}else{f.setStyle(new ol.style.Style({image:new ol.style.Circle({radius:i3GEO.editor._simbologia.pointRadius,fill:new ol.style.Fill({color:f.getProperties().fillColor}),stroke:new ol.style.Stroke({color:f.getProperties().strokeColor,width:i3GEO.editor._simbologia.pointRadius/3})})}))}}else if(st){if(f.getProperties().fillColor){st.getFill().setColor(f.getProperties().fillColor)}if(f.getProperties().strokeColor){st.getStroke().setColor(f.getProperties().strokeColor)}}}}if(id){i3GEO.editor._idsSelecionados.remove(id)}else{i3GEO.editor._idsSelecionados=[]}i3GEO.desenho.layergrafico.getSource().changed()},one:function(){i3GEO.eventos.cliquePerm.desativa();i3GEO.editor.removeInteracoes();var sel=new ol.interaction.Select();i3GEO.editor._interacoes=sel;i3GEO.Interface.openlayers.parametrosMap.interactions[0].setActive(false);sel.on("select",function(evt){var s,i,n,id,f;n=evt.selected.length;for(i=0;i<n;i++){f=evt.selected[i];id=f.getId();if(!id||id==""||id==undefined){id=i3GEO.util.uid();f.setId(id)}if(id&&i3GEO.util.in_array(id,i3GEO.editor._idsSelecionados)){i3GEO.editor.sel.unselFeature(id)}else{id=i3GEO.util.uid();i3GEO.editor._idsSelecionados.push(id);f.setId(id);s=f.getStyle();if(s&&s.getImage()){f.setStyle(new ol.style.Style({image:new ol.style.Circle({radius:i3GEO.editor._simbologia.pointRadius,fill:new ol.style.Fill({color:'rgba(255, 255, 255, 0.5)'}),stroke:new ol.style.Stroke({color:'blue',width:i3GEO.editor._simbologia.pointRadius/3})})}));if(!s.getImage().getSrc){f.setProperties({fillColor:s.getImage().getFill().getColor(),strokeColor:s.getImage().getStroke().getColor(),externalGraphic:"",graphicHeight:25,graphicWidth:25})}else{f.setProperties({fillColor:"",strokeColor:"",externalGraphic:s.getImage().getSrc(),graphicHeight:s.getImage().getSize()[1],graphicWidth:s.getImage().getSize()[0]})}}else{f.setProperties({externalGraphic:"",graphicHeight:25,graphicWidth:25});if(s.getFill()){f.setProperties({fillColor:s.getFill().getColor()});s.getFill().setColor('rgba(255, 255, 255, 0.5)')}if(s.getStroke()){f.setProperties({strokeColor:s.getStroke().getColor()});s.getStroke().setColor('blue')}}}}if(n===0){i3GEO.editor.sel.un()}i3GEO.editor.removeInteracoes();setTimeout(function(){i3GEO.eventos.cliquePerm.ativa()},1000)});i3geoOL.addInteraction(sel)}},jsts:{run:function(geoms,process){console.log("i3GEO.editor.jsts.run");var fwkt=new ol.format.WKT(),rwkt=new jsts.io.WKTReader(),wwkt=new jsts.io.WKTWriter(),n=geoms.length,g,i,uniao;proc=fwkt.writeFeatures([geoms[0]]);proc=rwkt.read(proc);var substitui=function(proc){proc=wwkt.write(proc);proc=fwkt.readFeature(proc);var g=proc.getGeometry();proc=geoms[0].clone();proc.setGeometry(g);proc.setId(i3GEO.util.uid());return proc};var adiciona=function(proc,style){proc=wwkt.write(proc);proc=fwkt.readFeature(proc);proc.setId(i3GEO.util.uid());proc.setStyle(style);return proc};if(process=="union"){for(i=1;i<n;i++){g=fwkt.writeFeatures([geoms[i]]);proc=proc.union(rwkt.read(g))}return substitui(proc)}if(process=="intersection"){for(i=1;i<n;i++){g=fwkt.writeFeatures([geoms[i]]);proc=proc.intersection(rwkt.read(g))}return substitui(proc)}if(process=="symDifference"){for(i=1;i<n;i++){g=fwkt.writeFeatures([geoms[i]]);proc=proc.symDifference(rwkt.read(g))}return substitui(proc)}if(process=="difference"){for(i=1;i<n;i++){g=fwkt.writeFeatures([geoms[i]]);proc=proc.difference(rwkt.read(g))}return substitui(proc)}if(process=="boundary"){var lista=[];for(i=0;i<n;i++){lista.push(geoms[i].getGeometry())}var colecao=new ol.geom.GeometryCollection(lista);var geometria=ol.geom.Polygon.fromExtent(colecao.getExtent());var feature=new ol.Feature({geometry:geometria});feature.setId(i3GEO.util.uid());feature.setStyle(i3GEO.editor.getPolygonStyle());return feature}if(process=="convexHull"){var lista=[];for(i=0;i<n;i++){g=fwkt.writeFeatures([geoms[i]]);lista.push(rwkt.read(g))}var colecao=new jsts.geom.GeometryFactory().createGeometryCollection(lista);var geometria=colecao.convexHull();return adiciona(geometria,i3GEO.editor.getPolygonStyle())}if(process=="fillRing"){var linearring=proc.getExteriorRing();var pol=new jsts.geom.GeometryFactory().createPolygon(linearring);var diference=pol.difference(proc);return adiciona(diference,i3GEO.editor.getPolygonStyle())}},fillRing:function(){if(i3GEO.editor._idsSelecionados.length!=1){i3GEO.janela.tempoMsg($trad("selum"));return}var polis=i3GEO.editor.sel.getFeatures(),temp;temp=i3GEO.editor.jsts.run(polis,"fillRing");if(temp){i3GEO.desenho.layergrafico.getSource().addFeatures([temp]);i3GEO.editor.sel.all(temp.getId())}},convexHull:function(){if(i3GEO.editor._idsSelecionados.length<1){i3GEO.janela.tempoMsg($trad("selum"));return}var polis=i3GEO.editor.sel.getFeatures(),temp;temp=i3GEO.editor.jsts.run(polis,"convexHull");if(temp){i3GEO.desenho.layergrafico.getSource().addFeatures([temp]);i3GEO.editor.sel.all(temp.getId())}},boundary:function(){if(i3GEO.editor._idsSelecionados.length<1){i3GEO.janela.tempoMsg($trad("selum"));return}var polis=i3GEO.editor.sel.getFeatures(),temp;temp=i3GEO.editor.jsts.run(polis,"boundary");if(temp){i3GEO.desenho.layergrafico.getSource().addFeatures([temp]);i3GEO.editor.sel.all(temp.getId())}},union:function(){if(i3GEO.editor._idsSelecionados.length<2){i3GEO.janela.tempoMsg($trad("selum"));return}var polis=i3GEO.editor.sel.getFeatures(),temp;if(polis.length>1){temp=i3GEO.editor.jsts.run(polis,"union");if(temp){i3GEO.editor.sel.deleteFeatures();i3GEO.desenho.layergrafico.getSource().addFeatures([temp]);i3GEO.editor._idsSelecionados.push(temp.getId())}}},intersect:function(){if(i3GEO.editor._idsSelecionados.length<2){i3GEO.janela.tempoMsg($trad("selum"));return}var polis=i3GEO.editor.sel.getFeatures(),temp;if(polis.length>0){temp=i3GEO.editor.jsts.run(polis,"intersection");if(temp){i3GEO.editor.sel.deleteFeatures();i3GEO.desenho.layergrafico.getSource().addFeatures([temp]);i3GEO.editor._idsSelecionados.push(temp.getId())}}},symdif:function(){if(i3GEO.editor._idsSelecionados.length<2){i3GEO.janela.tempoMsg($trad("selum"));return}var polis=i3GEO.editor.sel.getFeatures(),temp;if(polis.length>0){temp=i3GEO.editor.jsts.run(polis,"symDifference");if(temp){i3GEO.editor.sel.deleteFeatures();i3GEO.desenho.layergrafico.getSource().addFeatures([temp]);i3GEO.editor._idsSelecionados.push(temp.getId())}}},dif:function(){if(i3GEO.editor._idsSelecionados.length<2){i3GEO.janela.tempoMsg($trad("selum"));return}var polis=i3GEO.editor.sel.getFeatures(),temp;if(polis.length>0){temp=i3GEO.editor.jsts.run(polis,"difference");if(temp){i3GEO.editor.sel.deleteFeatures();i3GEO.desenho.layergrafico.getSource().addFeatures([temp]);i3GEO.editor._idsSelecionados.push(temp.getId())}}}},draw:{rectangle:function(drawendcallback){i3GEO.eventos.cliquePerm.desativa();i3GEO.editor.removeInteracoes();var draw=new ol.interaction.Draw({type:"Circle",geometryFunction:ol.interaction.Draw.createBox()});i3GEO.editor._interacoes=draw;i3GEO.Interface.openlayers.parametrosMap.interactions[0].setActive(false);draw.on("drawend",function(evt){evt.feature.setStyle(i3GEO.editor.getPolygonStyle());evt.feature.setId(i3GEO.util.uid());i3GEO.desenho.layergrafico.getSource().addFeature(evt.feature);i3GEO.editor.removeInteracoes();setTimeout(function(){i3GEO.eventos.cliquePerm.ativa()},1000);i3GEO.editor.tableRefresh()});if(drawendcallback){draw.on("drawend",drawendcallback)}i3geoOL.addInteraction(draw);i3GEO.editor.toggleSnap()},text:function(drawendcallback){i3GEO.eventos.cliquePerm.desativa();i3GEO.editor.removeInteracoes();var draw=new ol.interaction.Draw({type:"Point"});i3GEO.editor._interacoes=draw;i3GEO.Interface.openlayers.parametrosMap.interactions[0].setActive(false);draw.on("drawend",function(evt){var texto=window.prompt("Texto","");evt.feature.setStyle(i3GEO.editor.getTextStyle());evt.feature.setId(i3GEO.util.uid());i3GEO.desenho.layergrafico.getSource().addFeature(evt.feature);i3GEO.editor.removeInteracoes();setTimeout(function(){i3GEO.eventos.cliquePerm.ativa()},1000);i3GEO.editor.tableRefresh()});if(drawendcallback){draw.on("drawend",drawendcallback)}i3geoOL.addInteraction(draw)},point:function(drawendcallback){i3GEO.eventos.cliquePerm.desativa();i3GEO.editor.removeInteracoes();var draw=new ol.interaction.Draw({type:"Point"});i3GEO.editor._interacoes=draw;i3GEO.Interface.openlayers.parametrosMap.interactions[0].setActive(false);draw.on("drawend",function(evt){evt.feature.setStyle(i3GEO.editor.getPointStyle());evt.feature.setId(i3GEO.util.uid());i3GEO.desenho.layergrafico.getSource().addFeature(evt.feature);i3GEO.editor.removeInteracoes();setTimeout(function(){i3GEO.eventos.cliquePerm.ativa()},1000);i3GEO.editor.tableRefresh()});if(drawendcallback){draw.on("drawend",drawendcallback)}i3geoOL.addInteraction(draw);i3GEO.editor.toggleSnap()},lineString:function(drawendcallback){i3GEO.eventos.cliquePerm.desativa();i3GEO.editor.removeInteracoes();var draw=new ol.interaction.Draw({type:"LineString"});i3GEO.editor._interacoes=draw;i3GEO.Interface.openlayers.parametrosMap.interactions[0].setActive(false);draw.on("drawend",function(evt){evt.feature.setStyle(i3GEO.editor.getLineStringStyle());evt.feature.setId(i3GEO.util.uid());i3GEO.desenho.layergrafico.getSource().addFeature(evt.feature);i3GEO.editor.removeInteracoes();i3GEO.eventos.cliquePerm.ativa();i3GEO.editor.tableRefresh()});if(drawendcallback){draw.on("drawend",drawendcallback)}i3geoOL.addInteraction(draw);i3GEO.editor.toggleSnap()},polygon:function(drawendcallback){i3GEO.eventos.cliquePerm.desativa();i3GEO.editor.removeInteracoes();var draw=new ol.interaction.Draw({type:"Polygon",freehand:i3GEO.editor._freehand});i3GEO.editor._interacoes=draw;i3GEO.Interface.openlayers.parametrosMap.interactions[0].setActive(false);draw.on("drawend",function(evt){evt.feature.setStyle(i3GEO.editor.getPolygonStyle());evt.feature.setId(i3GEO.util.uid());i3GEO.desenho.layergrafico.getSource().addFeature(evt.feature);i3GEO.editor.removeInteracoes();i3GEO.eventos.cliquePerm.ativa();i3GEO.editor.tableRefresh()});if(drawendcallback){draw.on("drawend",drawendcallback)}i3geoOL.addInteraction(draw);i3GEO.editor.toggleSnap()},circle:function(drawendcallback){i3GEO.eventos.cliquePerm.desativa();i3GEO.editor.removeInteracoes();var draw=new ol.interaction.Draw({type:"Circle"});i3GEO.editor._interacoes=draw;i3GEO.Interface.openlayers.parametrosMap.interactions[0].setActive(false);draw.on("drawend",function(evt){evt.feature.setStyle(i3GEO.editor.getPolygonStyle());evt.feature.setId(i3GEO.util.uid());i3GEO.desenho.layergrafico.getSource().addFeature(evt.feature);i3GEO.editor.removeInteracoes();setTimeout(function(){i3GEO.eventos.cliquePerm.ativa()},1000);i3GEO.editor.tableRefresh()});if(drawendcallback){draw.on("drawend",drawendcallback)}i3geoOL.addInteraction(draw);i3GEO.editor.toggleSnap()}},removeInteracoes:function(){i3geoOL.removeInteraction(i3GEO.editor._interacoes);i3GEO.editor._interacoes=""},deleteFeatureById:function(id){var s=i3GEO.desenho.layergrafico.getSource(),f=s.getFeatureById(id);if(f){i3GEO.editor._featuresBackup.push(f.clone());s.removeFeature(f);i3GEO.editor.tableRefresh()}},edit:function(){i3GEO.editor._featuresBackup=[];var draw,nsel,f,c;nsel=i3GEO.editor._idsSelecionados.length;if(nsel==1){i3GEO.janela.tempoMsg($trad("shiftdel"));i3GEO.editor.removeInteracoes();i3GEO.eventos.cliquePerm.desativa();f=i3GEO.desenho.layergrafico.getSource().getFeatureById(i3GEO.editor._idsSelecionados[nsel-1]);i3GEO.editor._featuresBackup.push(f.clone());c=new ol.Collection();c.push(f);draw=new ol.interaction.Modify({features:c,deleteCondition:function(event){return ol.events.condition.shiftKeyOnly(event)&&ol.events.condition.singleClick(event)}});i3GEO.editor._interacoes=draw;i3GEO.Interface.openlayers.parametrosMap.interactions[0].setActive(false);i3geoOL.addInteraction(draw);i3GEO.editor.toggleSnap()}else{i3GEO.janela.tempoMsg($trad("seluma"))}},orderToFront:function(){var nsel=i3GEO.editor._idsSelecionados.length;if(nsel>0){var s,i,nsel,id,clone;s=i3GEO.desenho.layergrafico.getSource();nsel=i3GEO.editor._idsSelecionados.length;for(i=0;i<nsel;i++){f=s.getFeatureById(i3GEO.editor._idsSelecionados[i]);if(f){clone=f.clone();id=f.getId();s.removeFeature(f);clone.setId(id);s.addFeature(clone)}}s.changed()}else{i3GEO.janela.tempoMsg($trad("selum"))}},tableRefresh:function(){if(i3GEO.editor.table.seletor&&$(".layersGrForm button").length>0){i3GEO.editor.table(i3GEO.editor.table.seletor)}},table:function(seletor){i3GEO.editor.table.seletor=seletor;var keys,propriedades=[],id,temp,f,geos=i3GEO.desenho.layergrafico.getSource().getFeatures(),n=geos.length,ins="",botoes=[];while(n>0){n-=1;f=geos[n];id=f.getId();if(!id||id==""||id==undefined){id=i3GEO.util.uid();f.setId(id)}if(id){botoes=[];propriedades=[];botoes.push({"onclick":"i3GEO.editor.sel.un('"+id+"')","title":"Unsel","icone":"check_box_outline_blank"});botoes.push({"onclick":"i3GEO.editor.sel.all('"+id+"')","title":"Sel","icone":"check_box"});botoes.push({"onclick":"i3GEO.editor.deleteFeatureById('"+id+"')","title":"Del","icone":"delete"});botoes.push({"onclick":"i3GEO.editor.exportFeatureById('"+id+"')","title":"Export","icone":"save"});ins+=Mustache.render("{{#data}}"+i3GEO.template.botoes.listaDeIcones+"{{/data}}",{data:botoes})+" "+id+" ";keys=f.getKeys();$.each(keys,function(index,name){if(name!="geometry"&&keys.indexOf(name)<0){propriedades.push(name+" = "+f.get(name))}});ins+=propriedades.join(" ")+"</br>"}}if(geos.length===0){ins=$trad("meneditor2")}ins='<div class="alert alert-info alert-dismissible" role="alert" style="background-color:#d3eaf5;">'+'<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>'+ins+"</div>";$(seletor).html(ins)},properties:function(seletor){i3GEO.editor.properties.seletor=seletor;var template="<div class='form-group label-fixed condensed'>"+"<label class='control-label' >{{{label}}}</label>"+"<input id='{{{id}}}' value='{{{value}}}' name='{{{typesymbol}}}' onchange='i3GEO.editor.setPropertie(\"{{{id}}}\");return false;' class='form-control input-lg {{{class}}}' type='text' />"+"</div>";var hash=[{"label":"Toler&acirc;ncia Snap","value":i3GEO.editor._tolerance,"typesymbol":"pixelTolerance","class":"","id":"i3GEOeditorpixelTolerance"},{"label":"Cor do contorno","value":i3GEO.editor._simbologia.strokeColor,"typesymbol":"strokeColor","class":"i3geoFormIconeAquarela","id":"i3GEOeditorstrokeColor"},{"label":"Cor do preenchimento","value":i3GEO.editor._simbologia.fillColor,"typesymbol":"fillColor","class":"i3geoFormIconeAquarela","id":"i3GEOeditorfillColor"},{"label":"Cor da fonte","value":i3GEO.editor._simbologia.fontColor,"typesymbol":"fontColor","class":"i3geoFormIconeAquarela","id":"i3GEOeditorfontColor"},{"label":"Tamanho da fonte","value":i3GEO.editor._simbologia.fontSize,"typesymbol":"fontSize","class":"","id":"i3GEOeditorfontSize"},{"label":"Opacidade (de 0 a 1)","value":i3GEO.editor._simbologia.opacidade,"typesymbol":"opacidade","class":"","id":"i3GEOeditoropacidade"},{"label":"Largura da linha/contorno","value":i3GEO.editor._simbologia.strokeWidth,"typesymbol":"strokeWidth","class":"","id":"i3GEOeditorstrokeWidth"},{"label":"Url de uma imagem","value":i3GEO.editor._simbologia.externalGraphic,"typesymbol":"externalGraphic","class":"","id":"i3GEOeditorexternalGraphic"},{"label":"Largura da imagem","value":i3GEO.editor._simbologia.graphicWidth,"typesymbol":"graphicWidth","class":"","id":"i3GEOeditorgraphicWidth"},{"label":"Altura da imagem","value":i3GEO.editor._simbologia.graphicHeight,"typesymbol":"graphicHeight","class":"","id":"i3GEOeditorgraphicHeight"}];ins='<div class="alert alert-info alert-dismissible" role="alert" style="background-color:#d3eaf5;">'+'<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>';ins+="<div class='checkbox text-left'><label><input "+(i3GEO.editor._snap==false?"":"checked")+" type='checkbox' onclick='javascript:i3GEO.editor._snap = this.checked; i3GEO.editor.toggleSnap();'><span class='checkbox-material noprint'><span class='check'></span></span> "+$trad("ativasnaptol")+" </label></div>";ins+="<div class='checkbox text-left'><label><input "+(i3GEO.editor._freehand==false?"":"checked")+" type='checkbox' onclick='javascript:i3GEO.editor._freehand = this.checked; '><span class='checkbox-material noprint'><span class='check'></span></span> "+$trad("freehand")+" </label></div>";ins+=Mustache.render("{{#data}}"+template+"{{/data}}",{data:hash});ins+="</div>";$(seletor).html(ins);$(seletor).find(".i3geoFormIconeAquarela").click(function(){if(this.firstChild){i3GEO.util.abreCor("",$(this).find("input")[0].id)}else{i3GEO.util.abreCor("",this.id)}})},setPropertie:function(id){var obj=$i(id),s,i,nsel,f;if(obj.name=="pixelTolerance"){i3GEO.editor._snap.set("pixelTolerance",obj.value*1);return}i3GEO.editor._simbologia[obj.name]=obj.value;nsel=i3GEO.editor._idsSelecionados.length;s=i3GEO.desenho.layergrafico.getSource();for(i=0;i<nsel;i++){f=s.getFeatureById(i3GEO.editor._idsSelecionados[i]);if(f){if(obj.name==="externalGraphic"||obj.name==="graphicWidth"||obj.name==="graphicHeight"){f.setProperties({src:i3GEO.editor._simbologia.externalGraphic,size:[i3GEO.editor._simbologia.graphicWidth,i3GEO.editor._simbologia.graphicHeight]})}else{f.setProperties({fillColor:'rgba('+i3GEO.editor._simbologia.fillColor+','+i3GEO.editor._simbologia.opacidade+')',strokeColor:'rgba('+i3GEO.editor._simbologia.strokeColor+','+i3GEO.editor._simbologia.opacidade+')',width:i3GEO.editor._simbologia.strokeWidth,fontSize:i3GEO.editor._simbologia.fontSize,fontColor:i3GEO.editor._simbologia.fontColor})}}}},exportFeatureById:function(id){var s=i3GEO.desenho.layergrafico.getSource(),f=s.getFeatureById(id),w=new Wkt.Wkt(),format=new ol.format.WKT();f=format.writeFeatures([f]);i3GEO.mapa.dialogo.wkt2layer(f)},editCut:function(){var nsel=i3GEO.editor._idsSelecionados.length;if(nsel!=1){i3GEO.janela.tempoMsg($trad("selCorta"))}else{i3GEO.eventos.cliquePerm.desativa();i3GEO.editor.removeInteracoes();i3GEO.janela.tempoMsg($trad("desPol"));var draw=new ol.interaction.Draw({type:"Polygon"});i3GEO.editor._interacoes=draw;i3GEO.Interface.openlayers.parametrosMap.interactions[0].setActive(false);draw.on("drawend",function(evt){var temp,f,c,format,fwkt,cwkt;f=evt.feature;c=i3GEO.desenho.layergrafico.getSource().getFeatureById(i3GEO.editor._idsSelecionados[nsel-1]);i3GEO.editor._featuresBackup.push(c.clone());format=new ol.format.WKT();if(f&&c){fwkt=format.writeFeatures([f]);cwkt=format.writeFeatures([c]);if(fwkt&&cwkt){temp=function(retorno){i3GEO.janela.fechaAguarde("i3GEO.cortador");if(retorno!=""&&retorno.data&&retorno.data!=""){i3GEO.editor.removeInteracoes();i3GEO.eventos.cliquePerm.ativa();i3GEO.janela.fechaAguarde("i3GEO.cortador");c.setGeometry(format.readGeometry(retorno.data));i3GEO.editor.tableRefresh()}};i3GEO.janela.abreAguarde("i3GEO.cortador","Cortando");i3GEO.php.funcoesGeometriasWkt(temp,cwkt+"|"+fwkt,"difference")}}i3GEO.editor.tableRefresh()});i3geoOL.addInteraction(draw)}},panSelection:function(){i3GEO.editor._featuresBackup=[];var draw,nsel,f,c;nsel=i3GEO.editor._idsSelecionados.length;if(nsel==1){i3GEO.editor.removeInteracoes();i3GEO.eventos.cliquePerm.desativa();f=i3GEO.desenho.layergrafico.getSource().getFeatureById(i3GEO.editor._idsSelecionados[nsel-1]);i3GEO.editor._featuresBackup.push(f.clone());c=new ol.Collection();c.push(f);draw=new ol.interaction.Translate({features:c});draw.on("translateend",function(evt){i3GEO.editor.removeInteracoes();setTimeout(function(){i3GEO.eventos.cliquePerm.ativa()},1000)});i3GEO.editor._interacoes=draw;i3GEO.Interface.openlayers.parametrosMap.interactions[0].setActive(false);i3geoOL.addInteraction(draw)}else{i3GEO.janela.tempoMsg($trad("seluma"))}},criaLayerBackup:function(){if(i3GEO.editor&&!i3GEO.editor._backup){i3GEO.editor._backup=new ol.layer.Vector({source:new ol.source.Vector({features:new ol.Collection(),useSpatialIndex:false,name:"Backup"}),visible:false});i3GEO.editor._backup.setMap(i3geoOL);i3GEO.editor._backup.getFeatures=function(){return i3GEO.editor._backup.getSource().getFeatures()}}},setStyleByTypeFeature:function(feature){var tipo=feature.getGeometry().getType();if(tipo=="Point"||tipo=="MultiPoint"){feature.setStyle(i3GEO.editor.getPointStyle())}else if(tipo=="LineString"||tipo=="MultiLineString"||tipo=="LinearRing"){feature.setStyle(i3GEO.editor.getLineStringStyle())}else{feature.setStyle(i3GEO.editor.getPolygonStyle())}},getPolygonStyle:function(){return new ol.style.Style({stroke:new ol.style.Stroke({color:'rgba('+i3GEO.editor._simbologia.strokeColor+','+i3GEO.editor._simbologia.opacidade+')',width:i3GEO.editor._simbologia.strokeWidth}),fill:new ol.style.Fill({color:'rgba('+i3GEO.editor._simbologia.fillColor+','+i3GEO.editor._simbologia.opacidade+')'})})},getLineStringStyle:function(){return new ol.style.Style({stroke:new ol.style.Stroke({color:'rgba('+i3GEO.editor._simbologia.strokeColor+','+i3GEO.editor._simbologia.opacidade+')',width:i3GEO.editor._simbologia.strokeWidth}),fill:new ol.style.Fill({color:'rgba('+i3GEO.editor._simbologia.fillColor+','+i3GEO.editor._simbologia.opacidade+')'})})},getPointStyle:function(){var simbolo,url;url=i3GEO.editor._simbologia.externalGraphic;if(url===""){simbolo=new ol.style.Circle({radius:i3GEO.editor._simbologia.pointRadius,fill:new ol.style.Fill({color:'rgba('+i3GEO.editor._simbologia.fillColor+','+i3GEO.editor._simbologia.opacidade+')'}),stroke:new ol.style.Stroke({color:'rgba('+i3GEO.editor._simbologia.strokeColor+','+i3GEO.editor._simbologia.opacidade+')',width:i3GEO.editor._simbologia.pointRadius/3})})}else{simbolo=new ol.style.Icon({src:url,size:[i3GEO.editor._simbologia.graphicWidth,i3GEO.editor._simbologia.graphicHeight]})}return new ol.style.Style({image:simbolo})},getTextStyle:function(){return new ol.style.Style({text:new ol.style.Text({text:texto,font:'Bold '+parseInt(i3GEO.editor._simbologia.fontSize,10)+'px Arial',textAlign:'left',stroke:new ol.style.Stroke({color:'white',width:i3GEO.editor._simbologia.strokeWidth}),fill:new ol.style.Fill({color:i3GEO.editor._simbologia.fontColor}),zIndex:2000})})}};
//
//compactados/coordenadas_compacto.js
if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.coordenadas={padrao:"geoProj",defOrigem:"+proj=longlat +ellps=GRS67 +no_defs",config:{"geoProj":{idhtml:"localizarxy",tipo:"geo",titulo:"Geo",ativo:true,defepsg:""},"dd":{idhtml:"localizarxy",tipo:"metrica",titulo:"D&eacute;c. de grau",ativo:true,defepsg:""},"geohash":{idhtml:"localizarxy",tipo:"codigo",tipoCodigo:"geohash",titulo:"GeoHash",ativo:true},"policonicaSad69":{idhtml:"localizarxy",tipo:"metrica",titulo:"Polic SAD-69",ativo:true,defepsg:"+proj=poly +lat_0=0 +lon_0=-54 +x_0=5000000 +y_0=10000000 +ellps=aust_SA +units=m +no_defs"},"utmSad69Proj":{idhtml:"localizarxy",tipo:"utm",titulo:"UTM Sad-69",ativo:true,defepsg:"",zona:{"19N":"+proj=utm +zone=19 +ellps=aust_SA +units=m +no_defs","20N":"+proj=utm +zone=20 +ellps=aust_SA +units=m +no_defs","21N":"+proj=utm +zone=21 +ellps=aust_SA +units=m +no_defs","22N":"+proj=utm +zone=22 +ellps=aust_SA +units=m +no_defs","17S":"+proj=utm +zone=17 +south +ellps=aust_SA +units=m +no_defs","18S":"+proj=utm +zone=18 +south +ellps=aust_SA +units=m +no_defs","19S":"+proj=utm +zone=19 +south +ellps=aust_SA +units=m +no_defs","20S":"+proj=utm +zone=20 +south +ellps=aust_SA +units=m +no_defs","21S":"+proj=utm +zone=21 +south +ellps=aust_SA +units=m +no_defs","22S":"+proj=utm +zone=22 +south +ellps=aust_SA +units=m +no_defs","23S":"+proj=utm +zone=23 +south +ellps=aust_SA +units=m +no_defs","24S":"+proj=utm +zone=24 +south +ellps=aust_SA +units=m +no_defs","25S":"+proj=utm +zone=25 +south +ellps=aust_SA +units=m +no_defs"}},"utmSirgas2000Proj":{idhtml:"localizarxy",tipo:"utm",titulo:"UTM Sirgas",ativo:true,defepsg:"",zona:{"11N":"+proj=utm +zone=11 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","12N":"+proj=utm +zone=12 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","13N":"+proj=utm +zone=13 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","14N":"+proj=utm +zone=14 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","15N":"+proj=utm +zone=15 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","16N":"+proj=utm +zone=16 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","17N":"+proj=utm +zone=17 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","18N":"+proj=utm +zone=18 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","19N":"+proj=utm +zone=19 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","20N":"+proj=utm +zone=20 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","21N":"+proj=utm +zone=21 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","22N":"+proj=utm +zone=22 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","17S":"+proj=utm +zone=17 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","18S":"+proj=utm +zone=18 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","19S":"+proj=utm +zone=19 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","20S":"+proj=utm +zone=20 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","21S":"+proj=utm +zone=21 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","22S":"+proj=utm +zone=22 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","23S":"+proj=utm +zone=23 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","24S":"+proj=utm +zone=24 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","25S":"+proj=utm +zone=25 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}}},PARAMETROS:{"mostraCoordenadasUTM":{idhtml:"localizarxy"},"mostraCoordenadasGEO":{idhtml:"localizarxy"},"mostraCoordenadasGeohash":{idhtml:"localizarxy"}},MODOTEXTO:"",atualizaLocalizarGeo:function(id,x,y){if(!id||id==""){id="coordgeotabela"}if(typeof(x)==='undefined'){x=objposicaocursor.dmsx}if(typeof(y)==='undefined'){y=objposicaocursor.dmsy}var temp=$i(id);if(temp&&temp.style.display==="block"){i3GEO.coordenadas.atualizaGeo(x,y,id)}else{i3GEO.eventos.removeEventos("MOUSEMOVE",["i3GEO.coordenadas.atualizaLocalizarGeo('localizarxygeoProj')"])}},geo2zonaUtm:function(l){l=(l*1)+180;l=l/6;return parseInt(l,10)+1},criaMascaraDMS:function(prefixo,titulo,caixa){var ins='<div style="display:block;" class="i3GeoMascaraCoord" id='+prefixo+' >'+caixa+'&nbsp;X:&nbsp;'+'<input type="text" name="" value="-00" size="3" title="grau" id="'+prefixo+'xg" onclick="javascript:this.select();">'+'<input type="text" name="" value="00" size="2" title="minuto" id="'+prefixo+'xm" onclick="javascript:this.select();">'+'<input type="text" name="" value="00.00" size="5" title="segundo" id="'+prefixo+'xs" onclick="javascript:this.select();">'+'&nbsp;Y:&nbsp;'+'<input type="text" name="" value="-00" size="3" title="grau" id="'+prefixo+'yg" onclick="javascript:this.select();">'+'<input type="text" name="" value="00" size="2" title="minuto" id="'+prefixo+'ym" onclick="javascript:this.select();">'+'<input type="text" name="" value="00.00" size="5" title="segundo" id="'+prefixo+'ys" onclick="javascript:this.select();">',temp='var '+prefixo+'xxx = i3GEO.calculo.dms2dd($i(\''+prefixo+'xg\').value,$i(\''+prefixo+'xm\').value,$i(\''+prefixo+'xs\').value);'+'var '+prefixo+'yyy = i3GEO.calculo.dms2dd($i(\''+prefixo+'yg\').value,$i(\''+prefixo+'ym\').value,$i(\''+prefixo+'ys\').value);'+'i3GEO.navega.zoomponto(i3GEO.configura.locaplic,i3GEO.configura.sid,'+prefixo+'xxx,'+prefixo+'yyy);';ins+='<img class=ticfind style="margin-left:8px;" title=zoom onclick="'+temp+'" src="'+i3GEO.configura.locaplic+"/imagens/branco.gif"+'" />'+"</div>";return ins},atualizaGeo:function(dmsx,dmsy,prefixo){var x=dmsx.split(" "),y=dmsy.split(" ");x[2]=$.number(x[2],2,$trad("dec"),$trad("mil"));y[2]=$.number(y[2],2,$trad("dec"),$trad("mil"));if($i(prefixo+"xg")){$i(prefixo+"xg").value=x[0];$i(prefixo+"xm").value=x[1];$i(prefixo+"xs").value=x[2];$i(prefixo+"yg").value=y[0];$i(prefixo+"ym").value=y[1];$i(prefixo+"ys").value=y[2]}i3GEO.coordenadas.MODOTEXTO+="DMS - Latitude: "+y[0]+" "+y[1]+" "+y[2]+" Longitude: "+x[0]+" "+x[1]+" "+x[2]+"<br><br>"},criaMascaraMetrica:function(prefixo,titulo,caixa){var ins="<div style='display:block;' id="+prefixo+" class='i3GeoMascaraCoord' >"+caixa+"&nbsp;X:&nbsp;"+'<input type="text" name="" value="00" size="12" title="X" id="'+prefixo+'X" >'+"&nbsp;Y:&nbsp;"+'<input type="text" name="" value="00" size="12" title="Y" id="'+prefixo+'Y" >'+"&nbsp;Zn:&nbsp;"+'<input type="text" name="" value="--" size="2" title="Zona" id="'+prefixo+'ZN" >'+"</div>";return ins},criaMascaraCodigo:function(prefixo,titulo,caixa,tipoCodigo){var funcao="",ins="";if(tipoCodigo==="geohash"){funcao="i3GEO.coordenadas.geohash.zoomCodigo(\'"+prefixo+"Codigo\')"}ins="<div style='display:block;' id="+prefixo+" class='i3GeoMascaraCoord' >"+caixa+"&nbsp;"+'<input type="text" name="" value="00" size="12" title="Cod" id="'+prefixo+'Codigo" >'+"&nbsp;"+'<img class=ticfind style="margin-left:8px;" title=zoom onclick="'+funcao+'" src="'+i3GEO.configura.locaplic+"/imagens/branco.gif"+'" />'+"</div>";return ins},atualizaCodigo:function(onde,configProj,x,y){var remove=function(){i3GEO.eventos.removeEventos("MOUSEMOVE",["i3GEO.coordenadas.atualizaCodigo('"+onde+"','"+configProj+"')"])};var ondeValor=$i(onde+configProj+"Codigo"),temp=i3GEO.coordenadas.config[configProj],codigo="";onde=$i(onde);if(onde&&onde.style.display==="none"){remove();return}if(typeof(x)==='undefined'){x=objposicaocursor.ddx}if(typeof(y)==='undefined'){y=objposicaocursor.ddy}if(temp.tipoCodigo==="geohash"){if($i("localizarxygeohash")&&$i("localizarxygeohash").style.display==="none"){i3GEO.eventos.removeEventos("MOUSEMOVE",["i3GEO.coordenadas.atualizaCodigo('localizarxy','geohash')"])}codigo=i3GEO.coordenadas.geohash.encodeGeoHash(y,x)}i3GEO.coordenadas.MODOTEXTO+=temp.titulo+" : "+codigo+"<br><br>";if(ondeValor){ondeValor.value=codigo}},atualizaProj4:function(onde,configProj,x,y){var remove=function(){i3GEO.eventos.removeEventos("MOUSEMOVE",["i3GEO.coordenadas.atualizaProj4('"+onde+"','"+configProj+"')"])};var zona,temp,p,destino="",iu=i3GEO.util;temp=i3GEO.coordenadas.config[configProj];if($i(onde+configProj)&&$i(onde+configProj).style.display==="none"){remove();return}if(temp.tipo==="metrica"){destino=temp.defepsg}if(typeof(x)==='undefined'){x=objposicaocursor.ddx}if(typeof(y)==='undefined'){y=objposicaocursor.ddy}if(temp.tipo==="utm"){zona=i3GEO.coordenadas.geo2zonaUtm(x);if($i(onde+configProj+"ZN")){$i(onde+configProj+"ZN").value=zona}if(objposicaocursor.ddy*1>0){destino=temp.zona[zona+"N"]}else{destino=temp.zona[zona+"S"]}if(typeof(destino)==='undefined'){iu.defineValor(onde+configProj+"X","value","?");iu.defineValor(onde+configProj+"Y","value","?");return}}if(temp.defepsg===""&&temp.tipo==="metrica"){p={x:x,y:y}}else{p=i3GEO.coordenadas.calculaProj4(i3GEO.coordenadas.defOrigem,destino,x,y)}iu.defineValor(onde+configProj+"X","value",p.x);iu.defineValor(onde+configProj+"Y","value",p.y);i3GEO.coordenadas.MODOTEXTO+=temp.titulo+" - X: "+p.x+" Y: "+p.y+"<br><br>"},calculaProj4:function(origem,destino,x,y){Proj4js.defs={'ORIGEM':origem,'DESTINO':destino};Proj4js.getScriptLocation=function(){return i3GEO.configura.locaplic+"/pacotes/proj4js/lib/"};var source=new Proj4js.Proj("ORIGEM"),dest=new Proj4js.Proj("DESTINO"),p=new Proj4js.Point(x,y);Proj4js.transform(source,dest,p);return p},ativaBloco:function(prefixo){var tipos=i3GEO.util.listaChaves(i3GEO.coordenadas.config),n=tipos.length,temp,i=0;for(i=0;i<n;i++){temp=i3GEO.coordenadas.config[tipos[i]];if(temp.ativo===true){if(tipos[i]===this.padrao){$i(prefixo+tipos[i]).style.display="block"}else{$i(prefixo+tipos[i]).style.display="none"}}}},mudaTipo:function(obj,onde){if(obj.value=="janela"){i3GEO.coordenadas.mostraCoordenadasJanela();obj.value="geoProj"}this.padrao=obj.value;i3GEO.coordenadas.ativaBloco(onde);i3GEO.coordenadas.ativaEventos()},mostraCoordenadasJanela:function(x,y){var tipos=i3GEO.util.listaChaves(i3GEO.coordenadas.config),n=tipos.length,temp,ins="",i=0,caixa,janela,nomeFunc;caixa="";for(i=0;i<n;i+=1){temp=i3GEO.coordenadas.config[tipos[i]];if(temp.ativo===true){if(temp.tipo==="geo"){ins+=i3GEO.coordenadas.criaMascaraDMS("coordgeotabela"+tipos[i],temp.titulo,caixa)}else{if(temp.tipo==="codigo"){ins+=i3GEO.coordenadas.criaMascaraCodigo("coordgeotabela"+tipos[i],temp.titulo,temp.titulo,temp.tipoCodigo)}else{ins+=i3GEO.coordenadas.criaMascaraMetrica("coordgeotabela"+tipos[i],temp.titulo,caixa)}}}}janela=i3GEO.janela.cria("510px","210px","","","","<div class='i3GeoTituloJanela'>"+$trad("x49")+"</div>","i3GEOJanelaCoordenadas",false,"hd","","");$(janela[0].close).click(function(){var tipos=i3GEO.util.listaChaves(i3GEO.coordenadas.config),n=tipos.length,temp,i=0,nomeFunc;for(i=0;i<n;i+=1){temp=i3GEO.coordenadas.config[tipos[i]];if(temp.tipo==="geo"){i3GEO.eventos.removeEventos("MOUSEMOVE",["i3GEO.coordenadas.atualizaLocalizarGeo('coordgeotabela"+tipos[i]+"')"])}else{nomeFunc="i3GEO.coordenadas.atualizaProj4";if(temp.tipo==="codigo"){nomeFunc="i3GEO.coordenadas.atualizaCodigo"}i3GEO.eventos.removeEventos("MOUSEMOVE",[nomeFunc+"('coordgeotabela"+tipos[i]+"')"])}}});temp=$i("i3GEOJanelaCoordenadas_corpo");temp.style.backgroundColor="rgb(0, 60, 136)";temp.style.color="white";temp.style.fontSize="12px";temp.style.textAlign="left";temp=$i("i3GEOJanelaCoordenadas");temp.onmouseover="";temp.onmouseout="";onde="i3GEOJanelaCoordenadas_corpo";ins+="<br><a href='#' style='cursor:pointer;color:white' onclick='"+"$(document).keypress(function(e) {if(e.altKey && e.which == 99) {"+"i3GEO.util.copyToClipboard(i3GEO.coordenadas.MODOTEXTO);'>"+"Clique aqui para ativar Alt+C para poder capturar as coordenadas em mem&oacute;ria</a>";$i(onde).innerHTML=ins;i3GEO.coordenadas.ativaEventos("coordgeotabela")},ativaEventos:function(prefixo){var tipos=i3GEO.util.listaChaves(i3GEO.coordenadas.config),n=tipos.length,temp,i=0,nomeFunc;if(!prefixo){prefixo="localizarxy"}for(i=0;i<n;i+=1){temp=i3GEO.coordenadas.config[tipos[i]];if(temp.ativo===true){if(temp.tipo==="geo"){i3GEO.eventos.adicionaEventos("MOUSEMOVE",["i3GEO.coordenadas.atualizaLocalizarGeo('"+prefixo+tipos[i]+"')"])}else{nomeFunc="i3GEO.coordenadas.atualizaProj4";if(temp.tipo==="codigo"){nomeFunc="i3GEO.coordenadas.atualizaCodigo"}i3GEO.eventos.adicionaEventos("MOUSEMOVE",[nomeFunc+"('"+prefixo+"','"+tipos[i]+"')"])}}}},limpaModoTexto:function(){i3GEO.coordenadas.MODOTEXTO=""},geohash:{BITS:[16,8,4,2,1],BASE32:"0123456789bcdefghjkmnpqrstuvwxyz",refine_interval:function(interval,cd,mask){if(cd&mask)interval[0]=(interval[0]+interval[1])/2;else interval[1]=(interval[0]+interval[1])/2},decodeGeoHash:function(geohash){var is_even=1,lat=[],lon=[],i,j,x,y;lat[0]=-90.0;lat[1]=90.0;lon[0]=-180.0;lon[1]=180.0;lat_err=90.0;lon_err=180.0;for(i=0;i<geohash.length;i++){c=geohash[i];cd=i3GEO.coordenadas.geohash.BASE32.indexOf(c);for(j=0;j<5;j++){mask=i3GEO.coordenadas.geohash.BITS[j];if(is_even){lon_err/=2;i3GEO.coordenadas.geohash.refine_interval(lon,cd,mask)}else{lat_err/=2;i3GEO.coordenadas.geohash.refine_interval(lat,cd,mask)}is_even=!is_even}}lat[2]=(lat[0]+lat[1])/2;lon[2]=(lon[0]+lon[1])/2;y=(lat[0]+lat[1])/2;x=(lon[0]+lon[1])/2;return{"latitude":y,"longitude":x}},encodeGeoHash:function(latitude,longitude){var mid,is_even=1,lat=[],lon=[],bit=0,ch=0,precision=12,geohash="";lat[0]=-90.0;lat[1]=90.0;lon[0]=-180.0;lon[1]=180.0;while(geohash.length<precision){if(is_even){mid=(lon[0]+lon[1])/2;if(longitude>mid){ch|=i3GEO.coordenadas.geohash.BITS[bit];lon[0]=mid}else lon[1]=mid}else{mid=(lat[0]+lat[1])/2;if(latitude>mid){ch|=i3GEO.coordenadas.geohash.BITS[bit];lat[0]=mid}else lat[1]=mid}is_even=!is_even;if(bit<4)bit++;else{geohash+=i3GEO.coordenadas.geohash.BASE32[ch];bit=0;ch=0}}return geohash},zoomCodigo:function(idobj){var codigo;if($i(idobj)){codigo=$i(idobj).value}else{codigo=idobj}codigo=i3GEO.coordenadas.geohash.decodeGeoHash(codigo);i3GEO.navega.zoomponto(i3GEO.configura.locaplic,i3GEO.configura.sid,codigo.longitude,codigo.latitude)}},zoomPonto:function(){var localizarxygeoProjxxx=i3GEO.calculo.dms2dd($i('localizarxygeoProjxg').value,$i('localizarxygeoProjxm').value,$i('localizarxygeoProjxs').value);var localizarxygeoProjyyy=i3GEO.calculo.dms2dd($i('localizarxygeoProjyg').value,$i('localizarxygeoProjym').value,$i('localizarxygeoProjys').value);i3GEO.navega.zoomponto(i3GEO.configura.locaplic,i3GEO.configura.sid,localizarxygeoProjxxx,localizarxygeoProjyyy)}};
//
//compactados/social_compacto.js
if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.social={curtirFacebook:function(url,tipo){if(tipo==="comtotal"){return"<iframe src='http://www.facebook.com/plugins/like.php?href="+url+"&layout=button_count&show_faces=false&width=160&action=like&colorscheme=light&height=21' scrolling='no' frameborder='0' style='border:none; overflow:hidden; width:160px; height:21px;' allowTransparency='true'></iframe>"}if(tipo==="semtotal"){return"<iframe src='http://www.facebook.com/plugins/like.php?href="+url+"&layout=button_count&show_faces=false&action=like&colorscheme=light&height=21' scrolling='no' frameborder='0' style='border:none; overflow:hidden; width:100px; height:21px;' allowTransparency='true'></iframe>"}},publicarTwitter:function(url,tipo){var re=new RegExp("=","g");url=url.replace(re,'%3d');if(tipo==="comtotal"){return'<iframe allowtransparency="true" frameborder="0" scrolling="no" src="http://platform.twitter.com/widgets/tweet_button.html?count=horizontal&via=i3geo&url='+url+'" style="width:100px; height:21px;"></iframe>'}if(tipo==="semtotal"){return'<iframe allowtransparency="true" frameborder="0" scrolling="no" src="http://platform.twitter.com/widgets/tweet_button.html?count=none&via=i3geo&url='+url+'" style="width:65px; height:21px;"></iframe>'}},compartilhar:function(id,urlcf,urlpt,tipo,locaplic){if(!locaplic){locaplic=i3GEO.configura.locaplic}if(!tipo){tipo="comtotal"}var onde=$i(id),tabela="";if(tipo==="comtotal"){tabela+="<table style='width:250px' ><tr>"}if(tipo==="semtotal"){tabela+="<table style='width:115px' ><tr>"}if(onde||id===""){if(urlpt!==""){tabela+="<td>"+i3GEO.social.publicarTwitter(urlpt,tipo)+"</td>"}if(urlcf!==""){tabela+="<td>"+i3GEO.social.curtirFacebook(urlcf,tipo)+"</td>"}tabela+="</tr></table>";if(id!==""){onde.innerHTML=tabela}return tabela}else{return false}},bookmark:function(link,locaplic){if(!locaplic){locaplic=i3GEO.configura.locaplic}var ins="<img style='cursor:pointer' src='"+locaplic+"/imagens/delicious.gif' onclick='javascript:window.open(\"http://del.icio.us/post?url="+link+"\")' title='Delicious'/> ";ins+="<img style='cursor:pointer' src='"+locaplic+"/imagens/digg.gif' onclick='javascript:window.open(\"http://digg.com/submit/post?url="+link+"\")' title='Digg'/> ";ins+="<img style='cursor:pointer' src='"+locaplic+"/imagens/facebook.gif' onclick='javascript:window.open(\"http://www.facebook.com/sharer.php?u="+link+"\")' title='Facebook'/> ";ins+="<img style='cursor:pointer' src='"+locaplic+"/imagens/stumbleupon.gif' onclick='javascript:window.open(\"http://www.stumbleupon.com/submit?url="+link+"\")' title='StumbleUpon'/>";return ins}};
//
//compactados/login_compacto.js
if(typeof(i3GEOF)==='undefined'){var i3GEOF={}}i3GEO.login={divnomelogin:"i3GEONomeLogin",recarrega:false,funcaoLoginOk:null,funcaoLoginErro:null,anulaCookie:function(){i3GEO.util.insereCookie("i3geocodigologin","",0);i3GEO.util.insereCookie("i3geousuariologin","",0);i3GEO.util.insereCookie("i3geousuarionome","",0);i3GEO.util.insereCookie("i3GeoLogin","",0)},verificaCookieLogin:function(){var a=i3GEO.util.pegaCookie("i3geocodigologin"),b=i3GEO.util.pegaCookie("i3geousuarionome");if(a&&b&&a!=""&&b!=""){return true}else{return false}},verificaOperacao:function(operacao,locaplic,funcaoOk,tipo,funcaoErro){var p="",cp,temp,resultado=true;if(!i3GEO.login.verificaCookieLogin()){if(!funcaoErro){alert("Login...!")}else{funcaoErro.call()}return false}if(!locaplic){locaplic=i3GEO.configura.locaplic}temp=function(retorno){if(retorno.data=="naopermitido"){alert($trad("naoPermitido"));return false}if(retorno.data=="sim"){resultado=true}else{resultado=false}if(resultado===true){if(funcaoOk&&funcaoOk!=""){funcaoOk.call()}}else{if($i(i3GEO.login.divnomelogin)){$i(i3GEO.login.divnomelogin).innerHTML="";i3GEO.login.anulaCookie()}if(funcaoErro&&funcaoErro!=""&&resultado===false){funcaoErro.call()}}return resultado};if(!tipo||tipo==="sessao"){p=locaplic+"/admin/php/login.php?funcao=validaoperacaosessao"}if(tipo==="banco"){p=locaplic+"/admin/php/login.php?funcao=validaoperacaobanco"}cp=new cpaint();cp.set_response_type("JSON");cp.set_transfer_mode("POST");cp.call(p,"login",temp,"&operacao="+operacao)},adicionaMenuSuspenso:function(obj){obj.menu.push({nome:"Admin/Login",id:"i3GeoAdmin"});obj.submenus.i3GeoAdmin=[];obj.submenus.i3GeoAdmin.push({id:"omenudataAdminu1",text:"Login",url:"javascript:i3GEO.login.dialogo.abreLogin()"},{id:"omenudataAdminu2",text:"Logout",url:"javascript:i3GEO.login.dialogo.abreLogout()"},{id:"omenudataAdmin5",text:$trad("x88"),url:"javascript:i3GEO.mapa.dialogo.preferencias()"});return obj},dialogo:{abreLogin:function(locaplic,template){var js;if(!template||template==""){template="template_mst.html"}if(!locaplic||locaplic==""){locaplic=i3GEO.configura.locaplic}if(typeof(i3GEOF.loginusuario)==='undefined'){js=locaplic+"/ferramentas/loginusuario/dependencias.php?template="+template;i3GEO.util.scriptTag(js,"i3GEOF.loginusuario.criaJanelaFlutuante()","i3GEOF.loginusuario_script()")}else{i3GEOF.loginusuario.criaJanelaFlutuante()}},abreLogout:function(){var r=confirm($trad("x26"));if(r==true){i3GEO.login.anulaCookie();if(i3GEO.janela){i3GEO.janela.destroi("i3GEOF.loginusuario")}if($i(i3GEO.login.divnomelogin)){$i(i3GEO.login.divnomelogin).innerHTML=""}if(i3GEO.login.recarrega===true){document.location.reload()}if(i3GEO.parametros){i3GEO.parametros.editor="nao";if(i3GEO.catalogoMenus){i3GEO.catalogoMenus.listaMenus()}}}}}};
//
//compactados/marcador_compacto.js
if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.marcador={IDONDE:"",TEMPLATE:"",config:{"template":"templates/ferramentasSend.html"},carregaTemplates:function(){$.get(i3GEO.marcador.config.template,function(template){i3GEO.template.marcador=template;i3GEO.marcador.inicia()})},inicia:function(obj){if(obj&&$(obj).attr("data-template")!=undefined){i3GEO.marcador.config.template=$(obj).attr("data-template")}if(!i3GEO.template.marcador){i3GEO.marcador.carregaTemplates();return}else{var janela=i3GEO.janela.cria("380px","400px","","","","<span class='i3GeoTituloJanelaBsNolink' >"+$trad("x79")+"</span></div>","i3GEOmarcador",false,"hd","","","",true,"","","","");i3GEO.marcador.IDONDE=janela[2].id;i3GEO.marcador.redesenha()}},prompt:function(){i3GEO.janela.prompt($trad("x77"),i3GEO.marcador.armazena,"")},armazena:function(){var cookies=i3GEO.util.pegaCookie("marcadoresDoI3Geo"),ext=i3GEO.parametros.mapexten,nome="Marcador",valor;if($i("i3GEOjanelaprompt")){nome=$i("i3GEOjanelaprompt").value}valor=nome+"|"+ext;if(cookies){cookies+=":"}else{cookies=""}valor=cookies+valor;i3GEO.util.insereCookie("marcadoresDoI3Geo",valor,365);i3GEO.marcador.redesenha()},redesenha:function(){var t=Mustache.to_html("{{#data}}"+i3GEO.template.marcador+"{{/data}}",{"data":i3GEO.marcador.itensMenu()});$("#"+i3GEO.marcador.IDONDE).html("<div class='container-fluid'>"+t+"</div>")},exporta:function(){var c=i3GEO.util.pegaCookie("marcadoresDoI3Geo"),texto;if(!c){c=""}texto="<p class=paragrafo >"+$trad("x78")+"</p><div class='i3geoForm i3geoFormIconeEdita' ><input type=text value='"+c+"' onclick='javascript:this.select()'/></div>";i3GEO.janela.mensagemSimples(texto,$trad("x79"))},exportaShp:function(){var c=i3GEO.util.pegaCookie("marcadoresDoI3Geo"),temp=function(retorno){i3GEO.temaAtivo=retorno.data;i3GEO.atualiza()};if(c){i3GEO.php.marcadores2shp(temp)}},importa:function(){var temp=function(){var cookies=i3GEO.util.pegaCookie("marcadoresDoI3Geo"),novos="";if($i("i3GEOjanelaprompt")){novos=$i("i3GEOjanelaprompt").value}if(cookies){cookies+=":"}else{cookies=""}novos=cookies+novos;i3GEO.util.insereCookie("marcadoresDoI3Geo",novos,365);i3GEO.marcador.redesenha()};i3GEO.janela.prompt($trad("x83"),temp,"")},remove:function(nomeMarcador){var cookie=i3GEO.util.pegaCookie("marcadoresDoI3Geo"),valores=cookie.split(":"),n=valores.length,i,temp,novos=[];for(i=0;i<n;i++){temp=valores[i].split("|");if(temp[0]&&temp[0]!==nomeMarcador){novos.push(valores[i])}}i3GEO.util.insereCookie("marcadoresDoI3Geo",novos.join(":"),365);i3GEO.marcador.redesenha()},recuperaZoom:function(nomeMarcador){var cookie=i3GEO.util.pegaCookie("marcadoresDoI3Geo"),valores=cookie.split(":"),n=valores.length,i,temp;for(i=0;i<n;i++){temp=valores[i].split("|");if(temp[0]&&temp[0]===nomeMarcador){i3GEO.navega.zoomExt("","","",temp[1]);return}}},adicionaMenuSuspenso:function(obj){obj.menu.push({nome:$trad("x79"),id:"i3GeoMenuMarcador"});obj.submenus.i3GeoMenuMarcador=i3GEO.marcador.itensMenu();return obj},itensMenu:function(){var itens=[],cookie=i3GEO.util.pegaCookie("marcadoresDoI3Geo"),valores,n,i,temp;itens.push({nome:$trad("x82"),url:"javascript:i3GEO.marcador.prompt()"},{nome:$trad("x80"),url:"javascript:i3GEO.marcador.exporta()"},{nome:$trad("x81"),url:"javascript:i3GEO.marcador.importa()"},{nome:$trad("x84"),url:"javascript:i3GEO.marcador.exportaShp()"});if(cookie){valores=cookie.split(":");n=valores.length;for(i=0;i<n;i++){temp=valores[i].split("|");if(temp.length===2){itens.push({nome:temp[0],url:"javascript:i3GEO.marcador.recuperaZoom('"+temp[0]+"')",opcional:"<a href='javascript:void(0)' onclick='i3GEO.marcador.remove(\""+temp[0]+"\")' class='btn btn-danger btn-fab btn-fab-mini' role='button'><span class='material-icons md-18'>delete_forever</span></a>"})}}}return itens}};
//
//compactados/plugini3geo_compacto.js
if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.pluginI3geo={OBJETOS:{},PLUGINS:[{"classe":"heatmap","nome":"Mapa de calor","editor":true},{"classe":"markercluster","nome":"Agrupamento de pontos (cluster)","editor":true},{"classe":"layerkml","nome":"Camada Kml","editor":true},{"classe":"parametrossql","nome":"SQL parametrizado","editor":true}],inicia:function(camada){if(camada.plugini3geo){if(i3GEO.janela){i3GEO.janela.AGUARDEMODAL=true;i3GEO.janela.abreAguarde("aguardePlugin","Plugin...");i3GEO.janela.AGUARDEMODAL=false}i3GEO.pluginI3geo[camada.plugini3geo.plugin][i3GEO.Interface.ATUAL].inicia(camada)}},formAdmin:function(plugin,configString,onde){var html=i3GEO.pluginI3geo[plugin].formAdmin(configString,onde);if(!onde){return html}else{return false}},iconeArvoreDeCamadas:function(camada){if(camada.plugini3geo&&camada.plugini3geo!=""){return i3GEO.pluginI3geo[camada.plugini3geo.plugin].iconeArvoreDeCamadas(camada.name)}else{return false}},clickArvoreDeCamadas:function(camada){if(camada.plugini3geo&&camada.plugini3geo!=""){return i3GEO.pluginI3geo[camada.plugini3geo.plugin].clickArvoreDeCamadas(camada.name)}else{return false}},linkAjuda:function(plugin){return i3GEO.pluginI3geo[plugin].linkAjuda()},ligaCamada:function(nomecamada){if(i3GEO.pluginI3geo.OBJETOS[nomecamada]&&i3GEO.pluginI3geo.OBJETOS[nomecamada].ligaCamada){i3GEO.pluginI3geo.OBJETOS[nomecamada].ligaCamada();return true}return false},desligaCamada:function(nomecamada){if(i3GEO.pluginI3geo.OBJETOS[nomecamada]&&i3GEO.pluginI3geo.OBJETOS[nomecamada].desLigaCamada){i3GEO.pluginI3geo.OBJETOS[nomecamada].desLigaCamada();return true}return false},removeCamada:function(nomecamada){if(i3GEO.pluginI3geo.OBJETOS[nomecamada]&&i3GEO.pluginI3geo.OBJETOS[nomecamada].removeCamada){i3GEO.pluginI3geo.OBJETOS[nomecamada].removeCamada();i3GEO.pluginI3geo.OBJETOS[nomecamada]=false;delete(i3GEO.pluginI3geo.OBJETOS[nomecamada]);return true}return false},atualizaCamada:function(nomecamada){if(i3GEO.pluginI3geo.OBJETOS[nomecamada]&&i3GEO.pluginI3geo.OBJETOS[nomecamada].atualizaCamada){i3GEO.pluginI3geo.OBJETOS[nomecamada].atualizaCamada();return true}return false},existeObjeto:function(nomecamada){if(i3GEO.pluginI3geo.OBJETOS[nomecamada]&&i3GEO.pluginI3geo.OBJETOS[nomecamada].atualizaCamada){return true}return false},aplicaPropriedades:function(camada){if(camada.plugini3geo&&camada.plugini3geo!=""){camada=i3GEO.pluginI3geo[camada.plugini3geo.plugin][i3GEO.Interface.ATUAL].aplicaPropriedades(camada)}return camada},layerMashup:function(Interface,camada,epsg,parametros){if(camada.plugini3geo&&camada.plugini3geo!=""&&i3GEO.pluginI3geo[camada.plugini3geo.plugin][Interface].layerMashup){var l=i3GEO.pluginI3geo[camada.plugini3geo.plugin][Interface].layerMashup(camada,epsg,parametros);return l}else{return[false]}},heatmap:{linkAjuda:function(){return i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=3&idajuda=121"},formAdmin:function(config,onde,tema,salva,remove){if(!i3GEO.template.heatmap){var t1=i3GEO.configura.locaplic+"/js/templates/heatmapForm_mst.html";$.get(t1).done(function(r1){i3GEO.template.heatmap=r1;i3GEO.pluginI3geo.heatmap.formAdmin(config,onde,tema,salva,remove)}).fail(function(){i3GEO.janela.closeMsg($trad("erroTpl"));return});return}var mustache,parametros,ins="",configDefault='{"plugin":"heatmap","parametros":{"tipoGradiente": "default","valorPonto":1,"coluna":"","radius":15}}';if(config===""){config=configDefault}config=JSON.parse(config);if(config.plugin!="heatmap"){config=JSON.parse(configDefault)}parametros=config.parametros;mustache={"coluna":parametros.coluna,"valorPonto":parametros.valorPonto,"radius":parametros.radius,"tipoGradiente":parametros.tipoGradiente,"linkAjuda":i3GEO.pluginI3geo.linkAjuda("layerkml"),"tema":tema,"salvaPlugin":salva,"removePlugin":remove};ins=Mustache.render(i3GEO.template.heatmap,$.extend({},mustache,i3GEO.idioma.OBJETOIDIOMA));if($i(onde)){$i(onde).innerHTML=ins;return false}else{return ins}},iconeArvoreDeCamadas:function(nomecamada){return false},clickArvoreDeCamadas:function(nomecamada){return false},googlemaps:{aplicaPropriedades:function(camada){camada.sel="nao";camada.download="nao";camada.AGUARDALEGENDA=false;camada.temporizador="";camada.copia=false;camada.procurar=false;camada.toponimia=false;camada.etiquetas=false;camada.tabela=false;camada.grafico=false;camada.destacar=false;camada.wms=false;camada.classe="SIM";return camada},inicia:function(camada){if(document.getElementById("i3GeoHeatmapGm"+camada.name)){i3GEO.janela.fechaAguarde("aguardePlugin");return}var nomeScript="heatmap_script",p=i3GEO.configura.locaplic+"/ferramentas/heatmap/googlemaps_js.php",carregaJs="nao",criaLayer;criaLayer=function(){var heatmap,pontos;heatmap=new HeatmapOverlay(i3GeoMap,camada.name,{"radius":camada.plugini3geo.parametros.radius,"visible":true,"opacity":camada.transparency,"gradient":heatmap_config.gradient,"legend":{"title":camada.tema,"position":"bl","offset":[5,50]}});pontos={max:camada.plugini3geo.parametros.max,data:heatmap_dados};i3GEO.janela.fechaAguarde("aguardePlugin");heatmap.setDataSet(pontos);heatmap.ligaCamada=function(){this.liga()};heatmap.desLigaCamada=function(){this.desliga()};heatmap.removeCamada=function(){this.destroy()};heatmap.atualizaCamada=function(){this.draw()};i3GEO.pluginI3geo.OBJETOS[camada.name]=heatmap;heatmap_dados=null};if(!$i(nomeScript)){carregaJs="sim"}else{nomeScript=""}p+="?carregajs="+carregaJs+"&layer="+camada.name+"&coluna="+camada.plugini3geo.parametros.coluna+"&tipoGradiente="+camada.plugini3geo.parametros.tipoGradiente+"&g_sid="+i3GEO.configura.sid+"&nomevariavel=heatmap_dados&nomevariavelConfig=heatmap_config";i3GEO.util.scriptTag(p,criaLayer,nomeScript)}},openlayers:{aplicaPropriedades:function(camada){camada.sel="nao";camada.download="nao";camada.temporizador="";camada.copia=false;camada.procurar=false;camada.toponimia=false;camada.etiquetas=false;camada.tabela=false;camada.grafico=false;camada.destacar=false;camada.wms=false;camada.classe="SIM";return camada},layerMashup:function(camada,epsg){i3GEO.pluginI3geo.heatmap.openlayers.inicia(camada,i3GEO.editorOL.mapa);return[]},inicia:function(camada,objMapa){var p=i3GEO.configura.locaplic+"/ferramentas/heatmap/openlayers_js.php",criaLayer;criaLayer=function(){var g,v=true,temp,heatmap,data=heatmap_dados,datalen=heatmap_dados.length,nudata=[];if(!objMapa){objMapa=i3geoOL}while(datalen--){temp=heatmap_dados[datalen].count;g=new ol.geom.Point([data[datalen].lng*1,data[datalen].lat*1]);g=i3GEO.util.projGeo2OSM(g);nudata.push(new ol.Feature({geometry:g,weight:temp}))}if(camada.status==="0"){v=false}if(!camada.plugini3geo.parametros.max){camada.plugini3geo.parametros.max=10}heatmap=new ol.layer.Heatmap({source:new ol.source.Vector({features:nudata}),blur:camada.plugini3geo.parametros.max*1,title:camada.tema,opacity:(camada.transparency*1)/100,radius:camada.plugini3geo.parametros.radius*1,name:camada.name,isBaseLayer:false,visible:v});i3GEO.pluginI3geo.OBJETOS[camada.name]=heatmap;objMapa.addLayer(heatmap);heatmap_dados=null;if(i3GEO.janela){i3GEO.janela.fechaAguarde("aguardePlugin")}};if(!i3GEO.configura||!i3GEO.configura.sid){i3GEO.configura.sid=""}p+="?layer="+camada.name+"&coluna="+camada.plugini3geo.parametros.coluna+"&tipoGradiente="+camada.plugini3geo.parametros.tipoGradiente+"&g_sid="+i3GEO.configura.sid+"&nomevariavel=heatmap_dados&nomevariavelConfig=heatmap_config";i3GEO.util.scriptTag(p,criaLayer,"")}}},markercluster:{linkAjuda:function(){return i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=3&idajuda=122"},formAdmin:function(config,onde,tema,salva,remove){if(!i3GEO.template.markercluster){var t1=i3GEO.configura.locaplic+"/js/templates/markerclusterForm_mst.html";$.get(t1).done(function(r1){i3GEO.template.markercluster=r1;i3GEO.pluginI3geo.markercluster.formAdmin(config,onde,tema,salva,remove)}).fail(function(){i3GEO.janela.closeMsg($trad("erroTpl"));return});return}var mustache,parametros,ins="",configDefault='{"plugin":"markercluster","parametros":{"tipoEstilos": "default","textcolor":"#fff","strokecolor":"#fff","color":"#3399CC","gridSize":"50"}}';if(config===""){config=configDefault}config=JSON.parse(config);if(config.plugin!="markercluster"){config=JSON.parse(configDefault)}parametros=config.parametros;mustache={"gridSize":parametros.gridSize,"tipoEstilos":parametros.tipoEstilos,"color":i3GEO.util.hex2rgb(parametros.color),"strokecolor":i3GEO.util.hex2rgb(parametros.strokecolor),"textcolor":i3GEO.util.hex2rgb(parametros.textcolor),"linkAjuda":i3GEO.pluginI3geo.linkAjuda("markercluster"),"tema":tema,"salvaPlugin":salva,"removePlugin":remove};ins=Mustache.render(i3GEO.template.markercluster,$.extend({},mustache,i3GEO.idioma.OBJETOIDIOMA));if($i(onde)){$i(onde).innerHTML=ins;i3GEO.util.aplicaAquarela(onde);return false}else{return ins}},parametrosFormAdmin:function(onde){return'{"plugin":"markercluster","parametros":{"tipoEstilos": "'+$i("MCtipoEstilos").value+'","textcolor":"'+i3GEO.util.rgb2hex($i("MCtextcolor").value)+'","strokecolor":"'+i3GEO.util.rgb2hex($i("MCstrokecolor").value)+'","color":"'+i3GEO.util.rgb2hex($i("MCcolor").value)+'","gridSize":"'+$i("MCgridSize").value+'"}}'},iconeArvoreDeCamadas:function(nomecamada){return false},clickArvoreDeCamadas:function(nomecamada){return false},googlemaps:{aplicaPropriedades:function(camada){camada.sel="nao";camada.download="nao";camada.AGUARDALEGENDA=false;camada.temporizador="";camada.copia=false;camada.procurar=false;camada.toponimia=false;camada.etiquetas=false;camada.tabela=false;camada.grafico=false;camada.destacar=false;camada.wms=false;camada.classe="NAO";return camada},inicia:function(camada){if(document.getElementById("i3GeoClustermapGm")){i3GEO.janela.fechaAguarde("aguardePlugin");return}var nomeScript="markercluster_script",p=i3GEO.configura.locaplic+"/ferramentas/markercluster/googlemaps_js.php",carregaJs="nao",criaLayer;criaLayer=function(){var markercluster,marcas,latLng,marker,n,i;n=markercluster_dados.length;marcas=[];for(i=0;i<n;i++){latLng=new google.maps.LatLng(markercluster_dados[i].lat,markercluster_dados[i].lng);marker=new google.maps.Marker({'position':latLng,icon:{url:markercluster_config.ponto.url,scaledSize:new google.maps.Size(markercluster_config.ponto.width,markercluster_config.ponto.height)}});marcas.push(marker)}markercluster=new MarkerClusterer(i3GeoMap,marcas,{"gridSize":parseInt(camada.plugini3geo.parametros.gridSize,10),"visible":true,"opacity":camada.transparency,"name":camada.name,"styles":markercluster_config.estilos});i3GEO.janela.fechaAguarde("aguardePlugin");i3GEO.eventos.cliquePerm.ativo=false;markercluster.ligaCamada=function(){i3GEO.pluginI3geo.OBJETOS[camada.name].ready_=true;i3GEO.pluginI3geo.OBJETOS[camada.name].redraw();i3GEO.eventos.cliquePerm.ativo=false};markercluster.desLigaCamada=function(){i3GEO.pluginI3geo.OBJETOS[camada.name].resetViewport(true);i3GEO.pluginI3geo.OBJETOS[camada.name].ready_=false;i3GEO.eventos.cliquePerm.ativo=true};markercluster.removeCamada=function(){i3GEO.pluginI3geo.OBJETOS[camada.name].clearMarkers();i3GEO.eventos.cliquePerm.ativo=true};markercluster.atualizaCamada=function(){i3GEO.pluginI3geo.OBJETOS[camada.name].ready_=true;i3GEO.pluginI3geo.OBJETOS[camada.name].redraw();i3GEO.eventos.cliquePerm.ativo=false};i3GEO.pluginI3geo.OBJETOS[camada.name]=markercluster;markercluster_dados=null};if(!$i(nomeScript)){carregaJs="sim"}else{nomeScript=""}p+="?carregajs="+carregaJs+"&layer="+camada.name+"&g_sid="+i3GEO.configura.sid+"&tipoEstilos="+camada.plugini3geo.parametros.tipoEstilos+"&nomevariavel=markercluster_dados&nomevariavelConfig=markercluster_config";i3GEO.util.scriptTag(p,criaLayer,nomeScript)}},openlayers:{aplicaPropriedades:function(camada){camada.sel="nao";camada.download="nao";camada.AGUARDALEGENDA=false;camada.temporizador="";camada.copia=false;camada.procurar=false;camada.toponimia=false;camada.etiquetas=false;camada.tabela=false;camada.grafico=false;camada.destacar=false;camada.wms=false;camada.classe="NAO";return camada},layerMashup:function(camada,epsg){i3GEO.pluginI3geo.markercluster.openlayers.inicia(camada,i3GEO.editorOL.mapa);return[]},inicia:function(camada,objMapa){if(!objMapa){objMapa=i3geoOL}var nomeScript="markercluster_script",p=i3GEO.configura.locaplic+"/ferramentas/markercluster/openlayers_js.php",carregaJs="nao",criaLayer;criaLayer=function(){var layerListeners,logMax,logMin,classes,min,max,markercluster={},marcas,lonlat,n,i,style,nestilos,intervalo,regra,regras=[];marcas=[];n=markercluster_dados.length;for(i=0;i<n;i++){marcas.push(new ol.Feature({geometry:i3GEO.util.projGeo2OSM(new ol.geom.Point([markercluster_dados[i].lng*1,markercluster_dados[i].lat*1])),weight:markercluster_dados[i].count}))}var source=new ol.source.Vector({features:marcas});var clusterSource=new ol.source.Cluster({distance:camada.plugini3geo.parametros.gridSize,source:source});var styleCache={};var v=true;if(camada.status==="0"){v=false}markercluster=new ol.layer.Vector({opacity:(camada.transparency*1)/100,title:camada.tema,name:camada.name,isBaseLayer:false,visible:v,source:clusterSource,style:function(feature){var size=feature.get('features').length;var r=10;if(size>9){r=7*(size+"").length}var style=styleCache[size];if(!style){if(size==1){style=new ol.style.Style({image:new ol.style.Circle({radius:6,stroke:new ol.style.Stroke({color:camada.plugini3geo.parametros.strokecolor}),fill:new ol.style.Fill({color:camada.plugini3geo.parametros.color})})});styleCache[size]=style}else{style=new ol.style.Style({image:new ol.style.Circle({radius:r,stroke:new ol.style.Stroke({color:camada.plugini3geo.parametros.strokecolor}),fill:new ol.style.Fill({color:camada.plugini3geo.parametros.color})}),text:new ol.style.Text({text:size.toString(),fill:new ol.style.Fill({color:camada.plugini3geo.parametros.textcolor}),stroke:new ol.style.Stroke({color:'rgba(0, 0, 0, 0.6)',width:1})})});styleCache[size]=style}}return style}});i3GEO.janela.fechaAguarde("aguardePlugin");i3GEO.pluginI3geo.OBJETOS[camada.name]=markercluster;markercluster_dados=null;objMapa.addLayer(markercluster)};if(!$i(nomeScript)){carregaJs="sim"}else{nomeScript=""}p+="?carregajs="+carregaJs+"&layer="+camada.name+"&g_sid="+i3GEO.configura.sid+"&tipoEstilos="+camada.plugini3geo.parametros.tipoEstilos;i3GEO.util.scriptTag(p,criaLayer,nomeScript)}}},layerkml:{linkAjuda:function(){return i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=3&idajuda=126"},formAdmin:function(config,onde,tema,salva,remove){if(!i3GEO.template.layerkml){var t1=i3GEO.configura.locaplic+"/js/templates/layerkmlForm_mst.html";$.get(t1).done(function(r1){i3GEO.template.layerkml=r1;i3GEO.pluginI3geo.layerkml.formAdmin(config,onde,tema,salva,remove)}).fail(function(){i3GEO.janela.closeMsg($trad("erroTpl"));return});return}var mustache,parametros,ins="",configDefault='{"plugin":"layerkml","parametros":{"url": ""}}';if(config===""){config=configDefault}config=JSON.parse(config);if(config.plugin!="layerkml"){config=JSON.parse(configDefault)}parametros=config.parametros;mustache={"url":parametros.url,"linkAjuda":i3GEO.pluginI3geo.linkAjuda("layerkml"),"tema":tema,"salvaPlugin":salva,"removePlugin":remove};ins=Mustache.render(i3GEO.template.layerkml,$.extend({},mustache,i3GEO.idioma.OBJETOIDIOMA));if($i(onde)){$i(onde).innerHTML=ins;return false}else{return ins}},iconeArvoreDeCamadas:function(nomecamada){return false},clickArvoreDeCamadas:function(nomecamada){return false},googlemaps:{aplicaPropriedades:function(camada){camada.sel="nao";camada.download="nao";camada.AGUARDALEGENDA=false;camada.temporizador="";camada.copia=false;camada.procurar=false;camada.toponimia=false;camada.etiquetas=false;camada.tabela=false;camada.grafico=false;camada.destacar=false;camada.wms=false;camada.classe="NAO";return camada},inicia:function(camada){var layerkml=new google.maps.KmlLayer(camada.plugini3geo.parametros.url,{map:i3GeoMap,preserveViewport:true,name:camada.name});i3GEO.janela.fechaAguarde("aguardePlugin");layerkml.ligaCamada=function(){i3GEO.pluginI3geo.OBJETOS[camada.name].setMap(i3GeoMap)};layerkml.desLigaCamada=function(){i3GEO.pluginI3geo.OBJETOS[camada.name].setMap(null)};layerkml.removeCamada=function(){i3GEO.pluginI3geo.OBJETOS[camada.name].setMap(null);i3GEO.pluginI3geo.OBJETOS[camada.name].resetViewport(true)};layerkml.atualizaCamada=function(){i3GEO.pluginI3geo.OBJETOS[camada.name].setMap(null);i3GEO.pluginI3geo.OBJETOS[camada.name].resetViewport(true);i3GEO.pluginI3geo.OBJETOS[camada.name].setMap(i3GeoMap)};i3GEO.pluginI3geo.OBJETOS[camada.name]=layerkml}},openlayers:{aplicaPropriedades:function(camada){camada.sel="nao";camada.download="nao";camada.AGUARDALEGENDA=false;camada.temporizador="";camada.copia=false;camada.procurar=false;camada.toponimia=false;camada.etiquetas=false;camada.tabela=false;camada.grafico=false;camada.destacar=false;camada.wms=false;camada.classe="NAO";return camada},layerMashup:function(camada,epsg){i3GEO.pluginI3geo.layerkml.openlayers.inicia(camada,i3GEO.editorOL.mapa);return[]},inicia:function(camada,objMapa){var layerkml,url,temp;url=i3GEO.configura.locaplic+"/ferramentas/layerkml/getkml.php?sid="+i3GEO.configura.sid+"&tema="+camada.nomeoriginal;layerkml=new ol.layer.Vector({name:camada.name,isBaseLayer:false,source:new ol.source.Vector({url:url,format:new ol.format.KML({extractStyles:true}),tipoServico:"kml"})});i3geoOL.addLayer(layerkml);if(!objMapa){objMapa=i3geoOL}temp=function(pixel){var feature,chaves,c,i=0,html="",prop,g;feature=i3geoOL.forEachFeatureAtPixel(pixel,function(feature,layer){return feature});if(feature){i3GEO.Interface.openlayers.BALAOPROP.removeAoAdicionar=false;i3GEO.Interface.openlayers.BALAOPROP.classeCadeado="i3GEOiconeFechado";chaves=feature.getKeys();prop=feature.getProperties();c=chaves.length;for(i=0;i<c;i++){if(chaves[i]!="geometry"&&chaves[i]!="styleUrl"){html+=chaves[i]+": "+prop[chaves[i]]}}g=feature.getGeometry().getCoordinates();i3GEO.Interface.openlayers.balao(html,"",g[0],g[1],"kml")}};i3geoOL.on('click',function(evt){evt.stopPropagation();evt.preventDefault();if(evt.dragging){return}temp(i3geoOL.getEventPixel(evt.originalEvent))});i3GEO.janela.fechaAguarde("aguardePlugin");i3GEO.eventos.cliquePerm.ativo=false;layerkml.ligaCamada=function(){i3GEO.eventos.cliquePerm.ativo=false};layerkml.desLigaCamada=function(){i3GEO.eventos.cliquePerm.ativo=true};layerkml.removeCamada=function(){i3GEO.eventos.cliquePerm.ativo=true};layerkml.atualizaCamada=function(){i3GEO.eventos.cliquePerm.ativo=false};i3GEO.pluginI3geo.OBJETOS[camada.name]=layerkml}}},parametrossql:{linkAjuda:function(){return i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=3&idajuda=127"},formAdmin:function(config,onde,tema,salva,remove){if(!i3GEO.template.parametrossql){var t1=i3GEO.configura.locaplic+"/js/templates/parametrossqlForm_mst.html";$.get(t1).done(function(r1){i3GEO.template.parametrossql=r1;i3GEO.pluginI3geo.parametrossql.formAdmin(config,onde,tema,salva,remove)}).fail(function(){i3GEO.janela.closeMsg($trad("erroTpl"));return});return}var linhas=[],temp,mustache,n,i,parametros,ins="",configDefault='{"plugin":"parametrossql","id":"","ativo":"sim","janela":{"w":"300px","h":"400px","left":"","top":""},"parametros":[{"titulo":"","tipo":"input","required":"sim","valores":[],"nomes":[],"chave":"","prog":"","type":"text"},{"titulo":"","tipo":"input","required":"sim","valores":[],"chave":"","prog":"","type":"text"},{"titulo":"","tipo":"input","required":"sim","valores":[],"chave":"","prog":"","type":"text"},{"titulo":"","tipo":"input","required":"sim","valores":[],"chave":"","prog":"","type":"text"}]}';if(config===""){config=configDefault}config=JSON.parse(config);if(config.plugin!="parametrossql"){config=JSON.parse(configDefault)}parametros=config.parametros;n=parametros.length;if(config.ativo==undefined||config.ativo=="sim"){config.ativoSim="selected";config.ativoNao=""}else{config.ativoSim="";config.ativoNao="selected"}if(config.janela==undefined){config.janela=JSON.parse(configDefault).janela}if(config.id==undefined){config.id=""}for(i=0;i<n;i++){temp={};if(!parametros[i].type){parametros[i].type="text"}if(!parametros[i].required){parametros[i].required="nao"}if(!parametros[i].nomes){parametros[i].nomes=""}temp.titulo=parametros[i].titulo;temp.chave=parametros[i].chave;temp.tipo=parametros[i].tipo;temp.valores=parametros[i].valores;temp.nomes=parametros[i].nomes;temp.prog=parametros[i].prog;temp.type=parametros[i].type;temp.required=parametros[i].required;linhas.push(temp)}mustache={"ativo":config.ativo,"tema":tema,"linhas":linhas,"ativoSim":config.ativoSim,"ativoNao":config.ativoNao,"salvaPlugin":salva,"removePlugin":remove,"janelaw":config.janela.w,"janelah":config.janela.h,"janelatop":config.janela.top,"janelaleft":config.janela.left,"id":config.id};ins=Mustache.render(i3GEO.template.parametrossql,$.extend({},mustache,i3GEO.idioma.OBJETOIDIOMA));if($i(onde)){$i(onde).innerHTML=ins;return false}else{return ins}},parametrosFormAdmin:function(onde){var janela,nparametros=8,campos=$i("parametrosSqlTabela").getElementsByTagName("input"),ncampos=campos.length,par=[],temp=[],i,j;for(j=0;j<ncampos;j=j+nparametros){temp=[];for(i=0;i<nparametros;i++){temp.push('"'+campos[j+i].name+'" : "'+campos[j+i].value+'"')}par.push("{"+temp.join(",")+"}")}janela='{"w":"'+$i("parametrosSqljanelaw").value+'","h":"'+$i("parametrosSqljanelah").value+'","top":"'+$i("parametrosSqljanelatop").value+'","left":"'+$i("parametrosSqljanelaleft").value+'"}';return'{"plugin":"parametrossql","id":"'+$i("parametrosSqlid").value+'","ativo":"'+$i("parametrosSqlAtivo").value+'","janela":'+janela+',"parametros":['+par.join(",")+']}'},iconeArvoreDeCamadas:function(nomecamada){var icone="<img class='pluginParametrossql' "+"onclick='i3GEO.util.animaClique(this);"+"i3GEO.pluginI3geo.parametrossql.buscaParForm(\""+nomecamada+"\");return false;'"+"title='Variaveis' "+"src='"+i3GEO.configura.locaplic+"/imagens/branco.gif' />";return icone},clickArvoreDeCamadas:function(nomecamada){var icone="<p><a class='parametrossql buscaParForm' onclick='"+"i3GEO.pluginI3geo.parametrossql.buscaParForm(\""+nomecamada+"\",\"sim\");return false;'"+">Par&acirc;metros</a>";return icone},buscaParForm:function(nomecamada,novaCamada){var p,cp,temp,s;temp=function(retorno){var camada;retorno.data.ativo="sim";if(i3GEO.arvoreDeCamadas){camada=i3GEO.arvoreDeCamadas.pegaTema(nomecamada);camada.plugini3geo=retorno.data}else{camada={plugini3geo:retorno.data,name:nomecamada}}if(!novaCamada){camada.novaCamada="hidden"}else{camada.novaCamada=""}i3GEO.pluginI3geo.parametrossql.inicia(camada)};s=i3GEO.configura.sid;if(s===undefined){s=""}p=i3GEO.configura.locaplic+"/ferramentas/parametrossql/exec.php?g_sid="+s+"&funcao=PARAMETROSPLUGIN&tema="+nomecamada;cp=new cpaint();cp.set_response_type("JSON");cp.call(p,"foo",temp)},inicia:function(camada){i3GEO.janela.fechaAguarde("aguardePlugin");var iniciaform=function(){i3GEOF.parametrossql.iniciaJanelaFlutuante(camada)};i3GEO.util.scriptTag((i3GEO.configura.locaplic+"/ferramentas/parametrossql/dependencias.php"),iniciaform,"parametrossql_script")},googlemaps:{inicia:function(camada){i3GEO.pluginI3geo.parametrossql.inicia(camada)},aplicaPropriedades:function(camada){return camada}},openlayers:{inicia:function(camada){i3GEO.pluginI3geo.parametrossql.inicia(camada)},aplicaPropriedades:function(camada){return camada}}}};
//
//compactados/catalogoMenus_compacto.js
i3GEO.catalogoMenus={IDSMENUS:[],MENU:"",GRUPO:"",SUBGRUPO:"",config:{"templateDir":"templates/dir.html","templateTema":"templates/tema.html","idOndeMenus":"catalogoMenus","idCatalogoPrincipal":"catalogoPrincipal","idCatalogoNavegacao":"catalogoNavegacao","idOndeMigalha":"catalogoMigalha","folderFirst":"false"},carregaTemplates:function(){var t1=i3GEO.catalogoMenus.config.templateDir,t2=i3GEO.catalogoMenus.config.templateTema,t3=$("#"+i3GEO.catalogoMenus.config.idOndeMigalha).attr("data-template");$.when($.get(t1),$.get(t2),$.get(t3)).done(function(r1,r2,r3){i3GEO.template.dir=r1[0];i3GEO.template.tema=r2[0];i3GEO.template.catalogoMigalha=r3[0];i3GEO.catalogoMenus.listaMenus()}).fail(function(){i3GEO.janela.closeMsg($trad("erroTpl"));return})},aguarde:function(){$("#"+i3GEO.catalogoMenus.config.idOndeMenus).html($trad("o1"))},atualizaMigalha:function(nome,onclick){var t=Mustache.to_html(i3GEO.template.catalogoMigalha,{"nome":nome,"onclick":onclick});$("#"+i3GEO.catalogoMenus.config.idOndeMigalha).html(t)},escondeCatalogoPrincipal:function(){$("#"+i3GEO.catalogoMenus.config.idCatalogoPrincipal).hide()},mostraCatalogoPrincipal:function(){$("#"+i3GEO.catalogoMenus.config.idCatalogoNavegacao).fadeOut("fast",function(){$("#"+i3GEO.catalogoMenus.config.idOndeMigalha).hide();$("#"+i3GEO.catalogoMenus.config.idCatalogoPrincipal).show()})},adicionaTema:function(tid){var tema=i3GEO.arvoreDeCamadas.pegaTema(tid),ck;if(tema!==""&&tema.plugini3geo.plugin!="parametrossql"){ck=i3GEO.arvoreDeCamadas.capturaCheckBox(tid);if(ck!=false&&ck.onclick){ck.checked=!ck.checked;ck.onclick.call(ck)}else{i3GEO.janela.tempoMsg($trad("x76"))}}else{i3GEO.php.adtema(i3GEO.atualiza,tid)}},listaMenus:function(config){if(config){$.each(config,function(i,v){i3GEO.catalogoMenus.config[i]=v})}i3GEO.catalogoMenus.aguarde();if(!i3GEO.template.dir||!i3GEO.template.tema||!i3GEO.template.catalogoMigalha){i3GEO.catalogoMenus.carregaTemplates();return}else{config=i3GEO.catalogoMenus.config;if(i3GEO.arvoreDeTemas&&i3GEO.arvoreDeTemas.IDSMENUS&&i3GEO.arvoreDeTemas.IDSMENUS.length>0){i3GEO.catalogoMenus.IDSMENUS=i3GEO.arvoreDeTemas.IDSMENUS}var montaMenus=function(dados){var menus=dados.data,clone=[],n=i3GEO.catalogoMenus.IDSMENUS.length,t;$.each(menus,function(i,v){if(n===0||i3GEO.catalogoMenus.IDSMENUS.indexOf(v.idmenu)>=0||i3GEO.catalogoMenus.IDSMENUS.indexOf(v.idmenu*1)>=0){v.nome=v.nomemenu;v.descricao=v.desc;v.onclick="i3GEO.catalogoMenus.listaGrupos("+v.idmenu+",'"+v.nome+"')";if(v.publicado.toLowerCase()=="nao"){v.nome=v.nome+" <small>("+$trad("naoPublicado")+")<small>"}clone.push(v)}});t=Mustache.to_html("{{#data}}"+i3GEO.template.dir+"{{/data}}",{"data":clone});$("#"+config.idOndeMenus).html(t)};i3GEO.php.pegalistademenus(montaMenus)}},listaGrupos:function(idmenu,nomeMigalha){$("#i3GEOguiaMovelConteudo").scrollTop(0);i3GEO.catalogoMenus.MENU=nomeMigalha;i3GEO.catalogoMenus.atualizaMigalha(nomeMigalha,"i3GEO.catalogoMenus.mostraCatalogoPrincipal()");var montaGrupos=function(dados){var grupos=dados.data.grupos,clone=[],config=i3GEO.catalogoMenus.config,g="",t="",temas=[];$.each(grupos,function(i,v){if(v.id_n1){v.onclick="i3GEO.catalogoMenus.listaSubGrupos("+idmenu+","+v.id_n1+",'"+v.nome+"','"+nomeMigalha+"')";if(v.publicado.toLowerCase()=="nao"){v.nome=v.nome+" <small>("+$trad("naoPublicado")+")<small>"}clone.push(v)}if(v.temasraiz){temas=v.temasraiz}});g=Mustache.to_html("{{#data}}"+i3GEO.template.dir+"{{/data}}",{"data":clone});clone=[];$.each(temas,function(i,v){v.onclick="i3GEO.catalogoMenus.adicionaTema('"+v.codigo_tema+"')";if(v.publicado.toLowerCase()=="nao"){v.nome=v.nome+" <small>("+$trad("naoPublicado")+")<small>"}if(v.link&&v.link.trim()!=""){v.link="<a href='"+v.link+"' target='_blank' >Link</a>"}clone.push(v)});t=Mustache.to_html("{{#data}}"+i3GEO.template.tema+"{{/data}}",{"data":clone});if(config.folderFirst=="false"){$("#"+config.idCatalogoNavegacao).html(t+g)}else{$("#"+config.idCatalogoNavegacao).html(g+t)}$("#"+config.idCatalogoPrincipal).fadeOut("fast",function(){$("#"+i3GEO.catalogoMenus.config.idOndeMigalha).show();$("#"+i3GEO.catalogoMenus.config.idCatalogoNavegacao).show()})};i3GEO.php.pegalistadegrupos(montaGrupos,idmenu,"nao")},listaSubGrupos:function(idmenu,id_n1,nomeMigalha){$("#i3GEOguiaMovelConteudo").scrollTop(0);i3GEO.catalogoMenus.GRUPO=nomeMigalha;i3GEO.catalogoMenus.escondeCatalogoPrincipal();i3GEO.catalogoMenus.atualizaMigalha(nomeMigalha,"i3GEO.catalogoMenus.listaGrupos('"+idmenu+"','"+i3GEO.catalogoMenus.MENU+"')");var montaSubGrupos=function(dados){var subgrupos=dados.data.subgrupo,clone=[],g="",t="",temas;$.each(subgrupos,function(i,v){if(v.id_n2){v.onclick="i3GEO.catalogoMenus.listaTemasSubgrupo("+idmenu+","+id_n1+","+v.id_n2+",'"+v.nome+"')";if(v.publicado.toLowerCase()=="nao"){v.nome=v.nome+" <small>("+$trad("naoPublicado")+")<small>"}clone.push(v)}});g=Mustache.to_html("{{#data}}"+i3GEO.template.dir+"{{/data}}",{"data":clone});clone=[];temas=dados.data.temasgrupo;$.each(temas,function(i,v){v.onclick="i3GEO.catalogoMenus.adicionaTema('"+v.codigo_tema+"')";if(v.publicado.toLowerCase()=="nao"){v.nome=v.nome+" <small>("+$trad("naoPublicado")+")<small>"}if(v.link&&v.link.trim()!=""){v.link="<a href='"+v.link+"' target='_blank' >Link</a>"}clone.push(v)});t=Mustache.to_html("{{#data}}"+i3GEO.template.tema+"{{/data}}",{"data":clone});$("#"+i3GEO.catalogoMenus.config.idCatalogoNavegacao).fadeOut("fast",function(){if(i3GEO.catalogoMenus.folderFirst=="false"){$("#"+i3GEO.catalogoMenus.config.idCatalogoNavegacao).html(t+g)}else{$("#"+i3GEO.catalogoMenus.config.idCatalogoNavegacao).html(g+t)}$("#"+i3GEO.catalogoMenus.config.idOndeMigalha).show();$("#"+i3GEO.catalogoMenus.config.idCatalogoNavegacao).show()})};i3GEO.php.pegalistadeSubgrupos(montaSubGrupos,idmenu,id_n1)},listaTemasSubgrupo:function(idmenu,id_n1,id_n2,nomeMigalha){$("#i3GEOguiaMovelConteudo").scrollTop(0);i3GEO.catalogoMenus.SUBGRUPO=nomeMigalha;i3GEO.catalogoMenus.escondeCatalogoPrincipal();i3GEO.catalogoMenus.atualizaMigalha(nomeMigalha,"i3GEO.catalogoMenus.listaSubGrupos("+idmenu+","+id_n1+",'"+i3GEO.catalogoMenus.GRUPO+"')");var montaTemas=function(dados){var temas=dados.data.temas,clone=[],t="";clone=[];$.each(temas,function(i,v){v.onclick="i3GEO.catalogoMenus.adicionaTema('"+v.codigo_tema+"')";if(v.publicado.toLowerCase()=="nao"){v.nome=v.nome+" <small>("+$trad("naoPublicado")+")<small>"}if(v.link&&v.link.trim()!=""){v.link="<a href='"+v.link+"' target='_blank' >Link</a>"}clone.push(v)});t=Mustache.to_html("{{#data}}"+i3GEO.template.tema+"{{/data}}",{"data":clone});$("#"+i3GEO.catalogoMenus.config.idCatalogoNavegacao).fadeOut("fast",function(){$("#"+i3GEO.catalogoMenus.config.idCatalogoNavegacao).html(t);$("#"+i3GEO.catalogoMenus.config.idOndeMigalha).show();$("#"+i3GEO.catalogoMenus.config.idCatalogoNavegacao).show()})};i3GEO.php.pegalistadetemas(montaTemas,idmenu,id_n1,id_n2)}};
//
//compactados/catalogoInde_compacto.js
i3GEO.catalogoInde={config:{'templateDir':'templates/dir.html','templateTema':'templates/tema.html','idCatalogoPrincipal':'catalogoPrincipal','idCatalogoNavegacao':'catalogoNavegacao','idOndeMigalha':'catalogoMigalha'},DADOS:"",carregaTemplates:function(){var t1=i3GEO.catalogoInde.config.templateDir,t2=i3GEO.catalogoInde.config.templateTema,t3=$("#"+i3GEO.catalogoInde.config.idOndeMigalha).attr("data-template");$.when($.get(t1),$.get(t2),$.get(t3)).done(function(r1,r2,r3){i3GEO.template.dir=r1[0];i3GEO.template.catalogoMigalha=r2[0];i3GEO.template.ferramentasMigalha=r3[0];i3GEO.catalogoInde.inicia()}).fail(function(){i3GEO.janela.closeMsg($trad("erroTpl"));return})},aguarde:function(){$("#"+i3GEO.catalogoInde.config.idCatalogoNavegacao).html($trad("o1"))},atualizaMigalha:function(){var migalha=i3GEO.catalogoInde.MIGALHA;var n=migalha.length;var nome=migalha[n-1].nome;var onclick=migalha[n-2].onclick;var t=Mustache.to_html(i3GEO.template.catalogoMigalha,{"nome":nome,"onclick":"i3GEO.catalogoInde.MIGALHA.pop();i3GEO.catalogoInde.MIGALHA.pop();"+onclick});$("#"+i3GEO.catalogoInde.config.idOndeMigalha).html(t);$("#i3GEOguiaMovelConteudo").scrollTop(0)},escondeCatalogoPrincipal:function(){$("#"+i3GEO.catalogoInde.config.idCatalogoPrincipal).hide()},mostraCatalogoPrincipal:function(){$("#"+i3GEO.catalogoInde.config.idCatalogoNavegacao).fadeOut("fast",function(){$("#"+i3GEO.catalogoInde.config.idOndeMigalha).hide();$("#"+i3GEO.catalogoInde.config.idCatalogoPrincipal).show()})},adicionaTema:function(tid){if(i3GEO.arvoreDeCamadas.pegaTema(tid)!==""){i3GEO.arvoreDeCamadas.ligaDesligaTemas(tid,true)}else{var layer=i3GEO.catalogoInde.DADOS.layers[tid][1];i3GEO.php.adicionaTemaWMS('',layer.url,layer.layers,i3GEO.catalogoInde.DADOS.layers[tid][0],'EPSG:4326',layer.format,'1.1.1',i3GEO.catalogoInde.DADOS.layers[tid][0],'','nao',"text/plain",'','',true)}},inicia:function(config){if(config){$.each(config,function(i,v){i3GEO.catalogoInde.config[i]=v})}i3GEO.catalogoInde.aguarde();if(!i3GEO.template.dir||!i3GEO.template.tema||!i3GEO.template.catalogoMigalha){i3GEO.catalogoInde.carregaTemplates();return}else{i3GEO.catalogoInde.MIGALHA=[{"nome":"","onclick":"i3GEO.catalogoInde.mostraCatalogoPrincipal()"},{"nome":"INDE-Br","onclick":"i3GEO.catalogoInde.inicia()"}];i3GEO.catalogoInde.atualizaMigalha();config=i3GEO.catalogoInde.config;i3GEO.catalogoInde.escondeCatalogoPrincipal();$("#"+i3GEO.catalogoInde.config.idCatalogoNavegacao).show();var lista=function(dados){if(i3GEO.catalogoInde.DADOS==""){i3GEO.janela.tempoMsg($trad("indeOk"))}i3GEO.catalogoInde.DADOS=dados;var clone=[],t;dados=dados.arvore;$.each(dados,function(i,v){clone.push({"nome":i,"onclick":"i3GEO.catalogoInde.listaTemas('"+i+"')"})});t=Mustache.to_html("{{#data}}"+i3GEO.template.dir+"{{/data}}",{"data":clone});$("#"+config.idCatalogoNavegacao).html(t);$("#"+i3GEO.catalogoInde.config.idCatalogoPrincipal).fadeOut("fast",function(){$("#"+i3GEO.catalogoInde.config.idOndeMigalha).show();$("#"+i3GEO.catalogoInde.config.idCatalogoNavegacao).show()})};if(i3GEO.catalogoInde.DADOS==""){i3GEO.php.inde(lista)}else{lista(i3GEO.catalogoInde.DADOS)}}},listaTemas:function(sigla){var clone=[],temp;i3GEO.catalogoInde.MIGALHA.push({"nome":sigla,"onclick":"i3GEO.catalogoInde.listaTemas('"+sigla+"')"});i3GEO.catalogoInde.atualizaMigalha();i3GEO.catalogoInde.aguarde();var estilos=i3GEO.catalogoInde.DADOS.arvore[sigla];$.each(estilos,function(i,v){temp=v.split("#");clone.push({"nome":temp[0],"onclick":"i3GEO.catalogoInde.adicionaTema('"+temp[1]+"')","link":"<a href='"+i3GEO.catalogoInde.DADOS.layers[temp[1]][1].metadataURL+"' target='_blank' >Metadata</a>"})});var t=Mustache.to_html("{{#data}}"+i3GEO.template.tema+"{{/data}}",{"data":clone});$("#"+i3GEO.catalogoInde.config.idCatalogoNavegacao).html(t)}};
//
//compactados/catalogoOgc_compacto.js
i3GEO.catalogoOgc={WMS:"",MIGALHA:[],config:{'templateDir':'templates/dir','templateTema':'templates/tema','idCatalogoPrincipal':'catalogoPrincipal','idCatalogoNavegacao':'catalogoNavegacao','idOndeMigalha':'catalogoMigalha'},carregaTemplates:function(){var t1=i3GEO.catalogoOgc.config.templateDir,t2=i3GEO.catalogoOgc.config.templateTema,t3=$("#"+i3GEO.catalogoOgc.config.idOndeMigalha).attr("data-template");$.when($.get(t1),$.get(t2),$.get(t3)).done(function(r1,r2,r3){i3GEO.template.dir=r1[0];i3GEO.template.tema=r2[0];i3GEO.template.catalogoMigalha=r3[0];i3GEO.caixaDeFerramentas.inicia()}).fail(function(){i3GEO.janela.closeMsg($trad("erroTpl"));return})},aguarde:function(){$("#"+i3GEO.catalogoOgc.config.idCatalogoNavegacao).html($trad("o1"))},atualizaMigalha:function(){var migalha=i3GEO.catalogoOgc.MIGALHA;var n=migalha.length;var nome=migalha[n-1].nome;var onclick=migalha[n-2].onclick;var t=Mustache.to_html(i3GEO.template.catalogoMigalha,{"nome":nome,"onclick":"i3GEO.catalogoOgc.MIGALHA.pop();i3GEO.catalogoOgc.MIGALHA.pop();"+onclick});$("#"+i3GEO.catalogoOgc.config.idOndeMigalha).html(t);$("#i3GEOguiaMovelConteudo").scrollTop(0)},escondeCatalogoPrincipal:function(){$("#"+i3GEO.catalogoOgc.config.idCatalogoPrincipal).hide()},mostraCatalogoPrincipal:function(){$("#"+i3GEO.catalogoOgc.config.idCatalogoNavegacao).fadeOut("fast",function(){$("#"+i3GEO.catalogoOgc.config.idOndeMigalha).hide();$("#"+i3GEO.catalogoOgc.config.idCatalogoPrincipal).show()})},adicionaTema:function(tid){if(i3GEO.arvoreDeCamadas.pegaTema(tid)!==""){i3GEO.arvoreDeCamadas.ligaDesligaTemas(tid,true)}else{i3GEO.arvoreDeTemas.adicionaTemas([tid])}},inicia:function(config){if(config){$.each(config,function(i,v){i3GEO.catalogoOgc.config[i]=v})}i3GEO.catalogoOgc.aguarde();if(!i3GEO.template.dir||!i3GEO.template.tema||!i3GEO.template.catalogoMigalha){i3GEO.catalogoOgc.carregaTemplates();return}else{i3GEO.catalogoOgc.MIGALHA=[{"nome":"","onclick":"i3GEO.catalogoOgc.mostraCatalogoPrincipal()"},{"nome":"OGC-WMS","onclick":"i3GEO.catalogoOgc.inicia()"}];i3GEO.catalogoOgc.atualizaMigalha();config=i3GEO.catalogoOgc.config;i3GEO.catalogoOgc.escondeCatalogoPrincipal();var t=Mustache.to_html(i3GEO.template.catalogoMigalha,{"nome":'OGC-WMS',"onclick":"i3GEO.catalogoOgc.mostraCatalogoPrincipal()"});i3GEO.catalogoOgc.config=config;var lista=function(retorno){var dados=retorno.data.canais,clone=[],t;$.each(dados,function(i,v){v.nome=v.title;v.descricao=v.description;v.onclick="i3GEO.catalogoOgc.listaCamadas('"+v.nome+"',"+v.id_ws+",'"+v.nome+"','"+v.link+"',0"+",'"+v.tipo_ws+"','"+v.layer+"')";clone.push(v)});t=Mustache.to_html("{{#data}}"+i3GEO.template.dir+"{{/data}}",{"data":clone});$("#"+config.idCatalogoNavegacao).html(t);$("#"+i3GEO.catalogoOgc.config.idCatalogoPrincipal).fadeOut("fast",function(){$("#"+i3GEO.catalogoOgc.config.idOndeMigalha).show();$("#"+i3GEO.catalogoOgc.config.idCatalogoNavegacao).show()})};i3GEO.php.listaRSSwsARRAY(lista,"WMS")}},listaCamadas:function(nomeMigalha,id_ws,nome,url,nivel,tipo_ws,layer){i3GEO.catalogoOgc.MIGALHA.push({"nome":nome,"onclick":"i3GEO.catalogoOgc.listaCamadas('"+nome+"','"+id_ws+"','"+nome+"','"+url+"',"+nivel+",'"+tipo_ws+"','"+layer+"')"});i3GEO.catalogoOgc.atualizaMigalha();i3GEO.catalogoOgc.aguarde();var monta=function(dados){var data=dados.data,clone=[],g="",temas;$.each(data,function(i,v){if(v.nome+" - "+v.titulo!=="undefined - undefined"){v.descricao=v.titulo;if(!v.estilos){v.onclick="i3GEO.catalogoOgc.listaCamadas('"+nome+"',"+id_ws+",'"+v.nome+"','"+url+"',"+(nivel*1+1)+",'"+tipo_ws+"','"+v.titulo+"')";clone.push(v)}else{i3GEO.catalogoOgc.temas({"estilos":v.estilos,"servico":url,"layer":v.nome,"proj":v.srs.toString(),"formatoimg":v.formats.toString(),"versao":v.version.toString(),"formatoinfo":v.formatsinfo.toString()})}}});if(clone.length>0){g=Mustache.to_html("{{#data}}"+i3GEO.template.dir+"{{/data}}",{"data":clone});$("#"+i3GEO.catalogoOgc.config.idCatalogoNavegacao).html(g)}};i3GEO.php.listaLayersWMS(monta,url,(nivel*1)+1,id_ws,layer,tipo_ws)},temas:function(config){var clone=[],estilos=config.estilos;$.each(estilos,function(i,v){v.onclick="i3GEO.php.adicionaTemaWMS('','"+config.servico+"','"+config.layer+"','"+v.nome+"','"+config.proj+"','"+config.formatoimg+"','"+config.versao+"','"+v.titulo+"','','nao','"+config.formatoinfo+"','','',"+"true)";v.nome=estilos[i].nome+" - "+estilos[i].titulo;clone.push(v)});var t=Mustache.to_html("{{#data}}"+i3GEO.template.tema+"{{/data}}",{"data":clone});$("#"+i3GEO.catalogoOgc.config.idCatalogoNavegacao).html(t)}};
//
//compactados/catalogoRegioes_compacto.js
i3GEO.catalogoRegioes={config:{'templateDir':'templates/dir.html','templateTema':'templates/tema.html','idCatalogoPrincipal':'catalogoPrincipal','idCatalogoNavegacao':'catalogoNavegacao','idOndeMigalha':'catalogoMigalha'},carregaTemplates:function(){var t1=i3GEO.catalogoRegioes.config.templateDir,t2=i3GEO.catalogoRegioes.config.templateTema,t3=$("#"+i3GEO.catalogoRegioes.config.idOndeMigalha).attr("data-template");$.when($.get(t1),$.get(t2),$.get(t3)).done(function(r1,r2,r3){i3GEO.template.dir=r1[0];i3GEO.template.tema=r2[0];i3GEO.template.catalogoMigalha=r3[0];i3GEO.catalogoRegioes.inicia()}).fail(function(){i3GEO.janela.closeMsg($trad("erroTpl"));return})},DADOS:"",aguarde:function(){$("#"+i3GEO.catalogoRegioes.config.idCatalogoNavegacao).html($trad("o1"))},atualizaMigalha:function(){var migalha=i3GEO.catalogoRegioes.MIGALHA;var n=migalha.length;var nome=migalha[n-1].nome;var onclick=migalha[n-2].onclick;var t=Mustache.to_html(i3GEO.template.catalogoMigalha,{"nome":nome,"onclick":"i3GEO.catalogoRegioes.MIGALHA.pop();i3GEO.catalogoRegioes.MIGALHA.pop();"+onclick});$("#"+i3GEO.catalogoRegioes.config.idOndeMigalha).html(t);$("#i3GEOguiaMovelConteudo").scrollTop(0)},escondeCatalogoPrincipal:function(){$("#"+i3GEO.catalogoRegioes.config.idCatalogoPrincipal).hide()},mostraCatalogoPrincipal:function(){$("#"+i3GEO.catalogoRegioes.config.idCatalogoNavegacao).fadeOut("fast",function(){$("#"+i3GEO.catalogoRegioes.config.idOndeMigalha).hide();$("#"+i3GEO.catalogoRegioes.config.idCatalogoPrincipal).show()});i3GEO.catalogoRegioes.DADOS=""},adicionaTema:function(tid){if(i3GEO.arvoreDeCamadas.pegaTema(tid)!==""){i3GEO.arvoreDeCamadas.ligaDesligaTemas(tid,true)}else{var layer=i3GEO.catalogoRegioes.DADOS.layers[tid][1];i3GEO.php.adicionaTemaWMS('',layer.url,layer.layers,i3GEO.catalogoRegioes.DADOS.layers[tid][0],'EPSG:4326',layer.format,'1.1.1',i3GEO.catalogoRegioes.DADOS.layers[tid][0],'','nao',"text/plain",'','',true)}},inicia:function(config){if(config){$.each(config,function(i,v){i3GEO.catalogoRegioes.config[i]=v})}i3GEO.catalogoRegioes.aguarde();i3GEO.catalogoRegioes.DADOS="";if(!i3GEO.template.dir||!i3GEO.template.tema||!i3GEO.template.catalogoMigalha){i3GEO.catalogoRegioes.carregaTemplates();return}else{i3GEO.catalogoRegioes.MIGALHA=[{"nome":"","onclick":"i3GEO.catalogoRegioes.mostraCatalogoPrincipal()"},{"nome":$trad("x87"),"onclick":"i3GEO.catalogoRegioes.inicia()"}];i3GEO.catalogoRegioes.atualizaMigalha();config=i3GEO.catalogoRegioes.config;i3GEO.catalogoRegioes.escondeCatalogoPrincipal();$("#"+i3GEO.catalogoRegioes.config.idCatalogoNavegacao).show();var lista=function(dados){var clone=[],t;$.each(dados,function(i,v){clone.push({"nome":v.nome_tipo_regiao,"descricao":v.descricao_tipo_regiao,"onclick":"i3GEO.catalogoRegioes.adiciona("+v.codigo_tipo_regiao+")"})});t=Mustache.to_html("{{#data}}"+i3GEO.template.tema+"{{/data}}",{"data":clone});$("#"+config.idCatalogoNavegacao).html(t);$("#"+i3GEO.catalogoRegioes.config.idCatalogoPrincipal).fadeOut("fast",function(){$("#"+i3GEO.catalogoRegioes.config.idOndeMigalha).show();$("#"+i3GEO.catalogoRegioes.config.idCatalogoNavegacao).show()})};i3GEO.php.listaTipoRegiao(lista)}},adiciona:function(codigo_tipo_regiao){var p=i3GEO.configura.locaplic+"/ferramentas/metaestat/analise.php?funcao=adicionaLimiteRegiao"+"&codigo_tipo_regiao="+codigo_tipo_regiao+"&g_sid="+i3GEO.configura.sid;var funcao=function(){i3GEO.atualiza()};cpJSON.call(p,"foo",funcao)}};
//
//compactados/catalogoMetaestat_compacto.js
i3GEO.catalogoMetaestat={WMS:"",MIGALHA:[],config:{'templateDir':'templates/dir.html','templateTema':'templates/tema.html','idCatalogoPrincipal':'catalogoPrincipal','idCatalogoNavegacao':'catalogoNavegacao','idOndeMigalha':'catalogoMigalha'},carregaTemplates:function(){var t1=i3GEO.catalogoMetaestat.config.templateDir,t2=i3GEO.catalogoMetaestat.config.templateTema,t3=$("#"+i3GEO.catalogoMetaestat.config.idOndeMigalha).attr("data-template");$.when($.get(t1),$.get(t2),$.get(t3)).done(function(r1,r2,r3){i3GEO.template.dir=r1[0];i3GEO.template.tema=r2[0];i3GEO.template.catalogoMigalha=r3[0];i3GEO.catalogoMetaestat.inicia()}).fail(function(){i3GEO.janela.closeMsg($trad("erroTpl"));return})},aguarde:function(){$("#"+i3GEO.catalogoMetaestat.config.idCatalogoNavegacao).html($trad("o1"))},atualizaMigalha:function(){var migalha=i3GEO.catalogoMetaestat.MIGALHA;var n=migalha.length;var nome=migalha[n-1].nome;var onclick=migalha[n-2].onclick;var t=Mustache.to_html(i3GEO.template.catalogoMigalha,{"nome":nome,"onclick":"i3GEO.catalogoMetaestat.MIGALHA.pop();i3GEO.catalogoMetaestat.MIGALHA.pop();"+onclick});$("#"+i3GEO.catalogoMetaestat.config.idOndeMigalha).html(t);$("#i3GEOguiaMovelConteudo").scrollTop(0)},escondeCatalogoPrincipal:function(){$("#"+i3GEO.catalogoMetaestat.config.idCatalogoPrincipal).hide()},mostraCatalogoPrincipal:function(){$("#"+i3GEO.catalogoMetaestat.config.idCatalogoNavegacao).fadeOut("fast",function(){$("#"+i3GEO.catalogoMetaestat.config.idOndeMigalha).hide();$("#"+i3GEO.catalogoMetaestat.config.idCatalogoPrincipal).show()})},adicionaTema:function(tid){if(i3GEO.arvoreDeCamadas.pegaTema(tid)!==""){i3GEO.arvoreDeCamadas.ligaDesligaTemas(tid,true)}else{i3GEO.arvoreDeTemas.adicionaTemas([tid])}},inicia:function(config){if(config){$.each(config,function(i,v){i3GEO.catalogoMetaestat.config[i]=v})}i3GEO.catalogoMetaestat.aguarde();if(!i3GEO.template.dir||!i3GEO.template.tema||!i3GEO.template.catalogoMigalha){i3GEO.catalogoMetaestat.carregaTemplates();return}else{i3GEO.catalogoMetaestat.MIGALHA=[{"nome":"","onclick":"i3GEO.catalogoMetaestat.mostraCatalogoPrincipal()"},{"nome":$trad("x57"),"onclick":"i3GEO.catalogoMetaestat.inicia()"}];i3GEO.catalogoMetaestat.atualizaMigalha();config=i3GEO.catalogoMetaestat.config;i3GEO.catalogoMetaestat.escondeCatalogoPrincipal();var t=Mustache.to_html(i3GEO.template.catalogoMigalha,{"nome":$trad("x57"),"onclick":"i3GEO.catalogoMetaestat.mostraCatalogoPrincipal()"});var lista=function(dados){var clone=[],t;$.each(dados,function(i,v){v.onclick="i3GEO.catalogoMetaestat.listaMedidas("+v.codigo_variavel+",'"+v.nome+"')";clone.push(v)});t=Mustache.to_html("{{#data}}"+i3GEO.template.dir+"{{/data}}",{"data":clone});$("#"+config.idCatalogoNavegacao).html(t);$("#"+i3GEO.catalogoMetaestat.config.idCatalogoPrincipal).fadeOut("fast",function(){$("#"+i3GEO.catalogoMetaestat.config.idOndeMigalha).show();$("#"+i3GEO.catalogoMetaestat.config.idCatalogoNavegacao).show()})};i3GEO.php.listaVariavel(lista)}},listaMedidas:function(codigo_variavel,nome){i3GEO.catalogoMetaestat.MIGALHA.push({"nome":nome,"onclick":"i3GEO.catalogoMetaestat.listaMedidas("+codigo_variavel+",'"+nome+"')"});i3GEO.catalogoMetaestat.atualizaMigalha();i3GEO.catalogoMetaestat.aguarde();var monta=function(data){var clone=[],g="",temas;$.each(data,function(i,v){v.onclick="i3GEO.catalogoMetaestat.adiciona("+v.id_medida_variavel+",'"+v.nomemedida+"')";v.nome=v.nomemedida;clone.push(v)});var t=Mustache.to_html("{{#data}}"+i3GEO.template.tema+"{{/data}}",{"data":clone});$("#"+i3GEO.catalogoMetaestat.config.idCatalogoNavegacao).html(t)};i3GEO.php.listaMedidaVariavel(codigo_variavel,monta)},adiciona:function(id_medida_variavel,nomemedida){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.metaestat()","metaestat","metaestat","dependencias.php","i3GEOF.metaestat.inicia('flutuanteSimples','',"+id_medida_variavel+",'"+nomemedida+"')")}};
//
//compactados/catalogoMapas_compacto.js
i3GEO.catalogoMapas={MIGALHA:[],config:{'seletorTemplateDir':'#guia2objTemplateDir','seletorTemplateTema':'#guia2objTemplateTema','idCatalogoPrincipal':'catalogoPrincipal','idCatalogoNavegacao':'catalogoNavegacao','idOndeMigalha':'catalogoMigalha'},aguarde:function(){$("#"+i3GEO.catalogoMapas.config.idCatalogoNavegacao).html($trad("o1"))},atualizaMigalha:function(){var migalha=i3GEO.catalogoMapas.MIGALHA;var n=migalha.length;var nome=migalha[n-1].nome;var onclick=migalha[n-2].onclick;var t=Mustache.to_html($($("#"+i3GEO.catalogoMapas.config.idOndeMigalha).attr("data-template")).html(),{"nome":nome,"onclick":"i3GEO.catalogoMapas.MIGALHA.pop();i3GEO.catalogoMapas.MIGALHA.pop();"+onclick});$("#"+i3GEO.catalogoMapas.config.idOndeMigalha).html(t);$("#i3GEOguiaMovelConteudo").scrollTop(0)},escondeCatalogoPrincipal:function(){$("#"+i3GEO.catalogoMapas.config.idCatalogoPrincipal).hide()},mostraCatalogoPrincipal:function(){$("#"+i3GEO.catalogoMapas.config.idCatalogoNavegacao).fadeOut("fast",function(){$("#"+i3GEO.catalogoMapas.config.idOndeMigalha).hide();$("#"+i3GEO.catalogoMapas.config.idCatalogoPrincipal).show()})},adicionaTema:function(tid){if(i3GEO.arvoreDeCamadas.pegaTema(tid)!==""){i3GEO.arvoreDeCamadas.ligaDesligaTemas(tid,true)}else{i3GEO.arvoreDeTemas.adicionaTemas([tid])}},inicia:function(config){i3GEO.catalogoMapas.MIGALHA=[{"nome":"","onclick":"i3GEO.catalogoMapas.mostraCatalogoPrincipal()"},{"nome":$trad("x90"),"onclick":"i3GEO.catalogoMapas.inicia()"}];i3GEO.catalogoMapas.atualizaMigalha();if(config){$.each(config,function(i,v){i3GEO.catalogoMapas.config[i]=v})}config=i3GEO.catalogoMapas.config;i3GEO.catalogoMapas.escondeCatalogoPrincipal();var t=Mustache.to_html($($("#"+i3GEO.catalogoMapas.config.idOndeMigalha).attr("data-template")).html(),{"nome":$trad("x57"),"onclick":"i3GEO.catalogoMapas.mostraCatalogoPrincipal()"});i3GEO.catalogoMapas.aguarde();i3GEO.catalogoMapas.config=config;var lista=function(dados){var clone=[],t;dados=dados.data.mapas;$.each(dados,function(i,v){v.onclick="i3GEO.catalogoMapas.adiciona("+v.ID_MAPA+",'"+v.NOME+"')";if(v.PUBLICADO.toLowerCase()=="nao"){v.nome=v.NOME+" <small>("+$trad("naoPublicado")+")<small>"}else{v.nome=v.NOME}if(v.PUBLICADO.toLowerCase()!="nao"){clone.push(v)}});t=Mustache.to_html("{{#data}}"+$(config.seletorTemplateTema).html()+"{{/data}}",{"data":clone});$("#"+config.idCatalogoNavegacao).html(t);$("#"+i3GEO.catalogoMapas.config.idCatalogoPrincipal).fadeOut("fast",function(){$("#"+i3GEO.catalogoMapas.config.idOndeMigalha).show();$("#"+i3GEO.catalogoMapas.config.idCatalogoNavegacao).show()})};i3GEO.php.pegaMapas(lista)},adiciona:function(ID_MAPA,NOME){i3GEO.php.adtema(i3GEO.atualiza,"mapaCadastrado_"+ID_MAPA)}};
//
//compactados/catalogoEstrelas_compacto.js
i3GEO.catalogoEstrelas={MIGALHA:[],config:{'templateDir':'templates/dir.html','templateTema':'templates/tema.html','idCatalogoPrincipal':'catalogoPrincipal','idCatalogoNavegacao':'catalogoNavegacao','idOndeMigalha':'catalogoMigalha','valorEstrela':5,'numEstrelas':3},carregaTemplates:function(){var t1=i3GEO.catalogoEstrelas.config.templateDir,t2=i3GEO.catalogoEstrelas.config.templateTema,t3=$("#"+i3GEO.catalogoEstrelas.config.idOndeMigalha).attr("data-template");$.when($.get(t1),$.get(t2),$.get(t3)).done(function(r1,r2,r3){i3GEO.template.dir=r1[0];i3GEO.template.tema=r2[0];i3GEO.template.catalogoMigalha=r3[0];i3GEO.catalogoEstrelas.inicia()}).fail(function(){i3GEO.janela.closeMsg($trad("erroTpl"));return})},aguarde:function(){$("#"+i3GEO.catalogoEstrelas.config.idCatalogoNavegacao).html($trad("o1"))},atualizaMigalha:function(){var migalha=i3GEO.catalogoEstrelas.MIGALHA;var n=migalha.length;var nome=migalha[n-1].nome;var onclick=migalha[n-2].onclick;var t=Mustache.to_html(i3GEO.template.catalogoMigalha,{"nome":nome,"onclick":"i3GEO.catalogoEstrelas.MIGALHA.pop();i3GEO.catalogoEstrelas.MIGALHA.pop();"+onclick});$("#"+i3GEO.catalogoEstrelas.config.idOndeMigalha).html(t);$("#i3GEOguiaMovelConteudo").scrollTop(0)},escondeCatalogoPrincipal:function(){$("#"+i3GEO.catalogoEstrelas.config.idCatalogoPrincipal).hide()},mostraCatalogoPrincipal:function(){$("#"+i3GEO.catalogoEstrelas.config.idCatalogoNavegacao).fadeOut("fast",function(){$("#"+i3GEO.catalogoEstrelas.config.idOndeMigalha).hide();$("#"+i3GEO.catalogoEstrelas.config.idCatalogoPrincipal).show()})},adicionaTema:function(tid){if(i3GEO.arvoreDeCamadas.pegaTema(tid)!==""){i3GEO.arvoreDeCamadas.ligaDesligaTemas(tid,true)}else{i3GEO.arvoreDeTemas.adicionaTemas([tid])}},inicia:function(config){if(config){$.each(config,function(i,v){i3GEO.catalogoEstrelas.config[i]=v})}i3GEO.catalogoEstrelas.aguarde();if(!i3GEO.template.dir||!i3GEO.template.tema||!i3GEO.template.catalogoMigalha){i3GEO.catalogoEstrelas.carregaTemplates();return}else{i3GEO.catalogoEstrelas.MIGALHA=[{"nome":"","onclick":"i3GEO.catalogoEstrelas.mostraCatalogoPrincipal()"},{"nome":$trad("t46"),"onclick":"i3GEO.catalogoEstrelas.inicia()"}];i3GEO.catalogoEstrelas.atualizaMigalha();config=i3GEO.catalogoEstrelas.config;i3GEO.catalogoEstrelas.escondeCatalogoPrincipal();var t=Mustache.to_html(i3GEO.template.catalogoMigalha,{"nome":$trad("x57"),"onclick":"i3GEO.catalogoEstrelas.mostraCatalogoPrincipal()"});var dados=[],estrela='<span class="material-icons">star</span>',estrelas=[],t,i;for(i=config.numEstrelas;i<6;i++){estrelas=[];for(var n=0;n<i;n++){estrelas.push(estrela)}dados.push({"nome":estrelas.join(""),"onclick":"i3GEO.catalogoEstrelas.listaCamadas("+i+")"})}t=Mustache.to_html("{{#data}}"+i3GEO.template.dir+"{{/data}}",{"data":dados});$("#"+config.idCatalogoNavegacao).html(t);$("#"+i3GEO.catalogoEstrelas.config.idCatalogoPrincipal).fadeOut("fast",function(){$("#"+i3GEO.catalogoEstrelas.config.idOndeMigalha).show();$("#"+i3GEO.catalogoEstrelas.config.idCatalogoNavegacao).show()})}},listaCamadas:function(numEstrelas){i3GEO.catalogoEstrelas.MIGALHA.push({"nome":numEstrelas,"onclick":"i3GEO.catalogoEstrelas.listaCamadas("+numEstrelas+")"});i3GEO.catalogoEstrelas.atualizaMigalha();i3GEO.catalogoEstrelas.aguarde();var lista=function(dados){data=dados.data;var clone=[];$.each(data,function(i,v){var temas,subgrupos;temas=v.temas;$.each(temas,function(i,v){clone.push({"nome":v.nome,"descricao":"","link":"","onclick":"i3GEO.catalogoEstrelas.adiciona('"+v.codigo_tema+"');"})});subgrupos=v.subgrupos;$.each(subgrupos,function(i,v){var temas=v.temas;$.each(temas,function(i,v){clone.push({"nome":v.nome,"descricao":"","link":"","onclick":"i3GEO.catalogoEstrelas.adiciona('"+v.codigo_tema+"');"})})})});var t=Mustache.to_html("{{#data}}"+i3GEO.template.tema+"{{/data}}",{"data":clone});$("#"+i3GEO.catalogoEstrelas.config.idCatalogoNavegacao).html(t)};i3GEO.php.procurartemasestrela(lista,numEstrelas*1,i3GEO.catalogoEstrelas.config.valorEstrela*1)},adiciona:function(tid){if(i3GEO.arvoreDeCamadas.pegaTema(tid)!==""){i3GEO.arvoreDeCamadas.ligaDesligaTemas(tid,true)}else{i3GEO.php.adtema(i3GEO.atualiza,tid)}}};
//
//compactados/catalogoSistemas_compacto.js
i3GEO.catalogoSistemas={MIGALHA:[],DADOS:"",config:{'templateDir':'templates/dir.html','templateTema':'templates/tema.html','idCatalogoPrincipal':'catalogoPrincipal','idCatalogoNavegacao':'catalogoNavegacao','idOndeMigalha':'catalogoMigalha'},carregaTemplates:function(){var t1=i3GEO.catalogoSistemas.config.templateDir,t2=i3GEO.catalogoSistemas.config.templateTema,t3=$("#"+i3GEO.catalogoSistemas.config.idOndeMigalha).attr("data-template");$.when($.get(t1),$.get(t2),$.get(t3)).done(function(r1,r2,r3){i3GEO.template.dir=r1[0];i3GEO.template.tema=r2[0];i3GEO.template.catalogoMigalha=r3[0];i3GEO.caixaDeFerramentas.inicia()}).fail(function(){i3GEO.janela.closeMsg($trad("erroTpl"));return})},aguarde:function(){$("#"+i3GEO.catalogoSistemas.config.idCatalogoNavegacao).html($trad("o1"))},atualizaMigalha:function(){var migalha=i3GEO.catalogoSistemas.MIGALHA;var n=migalha.length;var nome=migalha[n-1].nome;var onclick=migalha[n-2].onclick;var t=Mustache.to_html(i3GEO.template.catalogoMigalha,{"nome":nome,"onclick":"i3GEO.catalogoSistemas.MIGALHA.pop();i3GEO.catalogoSistemas.MIGALHA.pop();"+onclick});$("#"+i3GEO.catalogoSistemas.config.idOndeMigalha).html(t);$("#i3GEOguiaMovelConteudo").scrollTop(0)},escondeCatalogoPrincipal:function(){$("#"+i3GEO.catalogoSistemas.config.idCatalogoPrincipal).hide()},mostraCatalogoPrincipal:function(){$("#"+i3GEO.catalogoSistemas.config.idCatalogoNavegacao).fadeOut("fast",function(){$("#"+i3GEO.catalogoSistemas.config.idOndeMigalha).hide();$("#"+i3GEO.catalogoSistemas.config.idCatalogoPrincipal).show()})},adicionaTema:function(tid){if(i3GEO.arvoreDeCamadas.pegaTema(tid)!==""){i3GEO.arvoreDeCamadas.ligaDesligaTemas(tid,true)}else{i3GEO.arvoreDeTemas.adicionaTemas([tid])}},inicia:function(config){if(config){$.each(config,function(i,v){i3GEO.catalogoSistemas.config[i]=v})}i3GEO.catalogoSistemas.aguarde();if(!i3GEO.template.dir||!i3GEO.template.tema||!i3GEO.template.catalogoMigalha){i3GEO.catalogoSistemas.carregaTemplates();return}else{i3GEO.catalogoSistemas.MIGALHA=[{"nome":"","onclick":"i3GEO.catalogoSistemas.mostraCatalogoPrincipal()"},{"nome":$trad("a11"),"onclick":"i3GEO.catalogoSistemas.inicia()"}];i3GEO.catalogoSistemas.atualizaMigalha();config=i3GEO.catalogoSistemas.config;i3GEO.catalogoSistemas.escondeCatalogoPrincipal();var t=Mustache.to_html(i3GEO.template.catalogoMigalha,{"nome":$trad("x57"),"onclick":"i3GEO.catalogoSistemas.mostraCatalogoPrincipal()"});var lista=function(dados){var clone=[],t;i3GEO.catalogoSistemas.DADOS=dados;$.each(dados.data,function(i,v){v.onclick="i3GEO.catalogoSistemas.listaFuncoes("+i+",'"+v.NOME+"')";v.nome=v.NOME;if(v.PUBLICADO.toLowerCase()!="nao"){v.nome=v.nome+" <small>("+$trad("naoPublicado")+")<small>"}if(v.PUBLICADO.toLowerCase()!="nao"){clone.push(v)}});t=Mustache.to_html("{{#data}}"+i3GEO.template.dir+"{{/data}}",{"data":clone});$("#"+config.idCatalogoNavegacao).html(t);$("#"+i3GEO.catalogoSistemas.config.idCatalogoPrincipal).fadeOut("fast",function(){$("#"+i3GEO.catalogoSistemas.config.idOndeMigalha).show();$("#"+i3GEO.catalogoSistemas.config.idCatalogoNavegacao).show()})};i3GEO.php.pegaSistemas(lista)}},listaFuncoes:function(id,nome){i3GEO.catalogoSistemas.MIGALHA.push({"nome":nome,"onclick":"i3GEO.catalogoSistemas.listaFuncoes("+id+",'"+nome+"')"});i3GEO.catalogoSistemas.atualizaMigalha();var clone=[],g="",temas;$.each(i3GEO.catalogoSistemas.DADOS.data[id].FUNCOES,function(i,v){v.onclick="i3GEO.catalogoSistemas.adiciona('"+v.W+"px','"+v.H+"px','"+v.ABRIR+"')";v.nome=v.NOME;clone.push(v)});var t=Mustache.to_html("{{#data}}"+i3GEO.template.tema+"{{/data}}",{"data":clone});$("#"+i3GEO.catalogoSistemas.config.idCatalogoNavegacao).html(t)},adiciona:function(w,h,f){i3GEO.janela.cria(w,h,f,'','',$trad("a11"))}};
//
//compactados/catalogoDir_compacto.js
i3GEO.catalogoDir={MIGALHA:[],config:{'templateDir':'templates/dir.html','templateTema':'templates/tema.html','idCatalogoPrincipal':'catalogoPrincipal','idCatalogoNavegacao':'catalogoNavegacao','idOndeMigalha':'catalogoMigalha'},carregaTemplates:function(){var t1=i3GEO.catalogoDir.config.templateDir,t2=i3GEO.catalogoDir.config.templateTema,t3=$("#"+i3GEO.catalogoDir.config.idOndeMigalha).attr("data-template");$.when($.get(t1),$.get(t2),$.get(t3)).done(function(r1,r2,r3){i3GEO.template.dir=r1[0];i3GEO.template.tema=r2[0];i3GEO.template.catalogoMigalha=r3[0];i3GEO.catalogoDir.inicia()}).fail(function(){i3GEO.janela.closeMsg($trad("erroTpl"));return})},aguarde:function(){$("#"+i3GEO.catalogoDir.config.idCatalogoNavegacao).html($trad("o1"))},atualizaMigalha:function(){var migalha=i3GEO.catalogoDir.MIGALHA;var n=migalha.length;var nome=migalha[n-1].nome;var onclick=migalha[n-2].onclick;var t=Mustache.to_html(i3GEO.template.catalogoMigalha,{"nome":nome,"onclick":"i3GEO.catalogoDir.MIGALHA.pop();i3GEO.catalogoDir.MIGALHA.pop();"+onclick});$("#"+i3GEO.catalogoDir.config.idOndeMigalha).html(t);$("#i3GEOguiaMovelConteudo").scrollTop(0)},escondeCatalogoPrincipal:function(){$("#"+i3GEO.catalogoDir.config.idCatalogoPrincipal).hide()},mostraCatalogoPrincipal:function(){$("#"+i3GEO.catalogoDir.config.idCatalogoNavegacao).fadeOut("fast",function(){$("#"+i3GEO.catalogoDir.config.idOndeMigalha).hide();$("#"+i3GEO.catalogoDir.config.idCatalogoPrincipal).show()})},adicionaTema:function(tid){if(i3GEO.arvoreDeCamadas.pegaTema(tid)!==""){i3GEO.arvoreDeCamadas.ligaDesligaTemas(tid,true)}else{i3GEO.arvoreDeTemas.adicionaTemas([tid])}},inicia:function(config){if(config){$.each(config,function(i,v){i3GEO.catalogoDir.config[i]=v})}i3GEO.catalogoDir.aguarde();if(!i3GEO.template.dir||!i3GEO.template.tema||!i3GEO.template.catalogoMigalha){i3GEO.catalogoDir.carregaTemplates();return}else{i3GEO.catalogoDir.MIGALHA=[{"nome":"","onclick":"i3GEO.catalogoDir.mostraCatalogoPrincipal()"},{"nome":$trad("a6"),"onclick":"i3GEO.catalogoDir.inicia()"}];i3GEO.catalogoDir.atualizaMigalha();config=i3GEO.catalogoDir.config;i3GEO.catalogoDir.escondeCatalogoPrincipal();var t=Mustache.to_html(i3GEO.template.catalogoMigalha,{"nome":$trad("a6"),"onclick":"i3GEO.catalogoDir.mostraCatalogoPrincipal()"});var lista=function(retorno){var dados=retorno.data,clone=[],t;$.each(dados,function(i,v){clone.push({"nome":v,"descricao":"","onclick":"i3GEO.catalogoDir.listaDir('"+v+"','"+v+"/')"})});t=Mustache.to_html("{{#data}}"+i3GEO.template.dir+"{{/data}}",{"data":clone});$("#"+config.idCatalogoNavegacao).html(t);$("#"+i3GEO.catalogoDir.config.idCatalogoPrincipal).fadeOut("fast",function(){$("#"+i3GEO.catalogoDir.config.idOndeMigalha).show();$("#"+i3GEO.catalogoDir.config.idCatalogoNavegacao).show()})};i3GEO.php.listadrives(lista)}},listaDir:function(nome,path){i3GEO.catalogoDir.MIGALHA.push({"nome":nome,"onclick":"i3GEO.catalogoDir.listaDir('"+nome+"','"+path+"')"});i3GEO.catalogoDir.atualizaMigalha();i3GEO.catalogoDir.aguarde();var monta=function(dados){var data=dados.data,clone=[],g="",t="",temas;$.each(data.diretorios,function(i,v){clone.push({"nome":v,"onclick":"i3GEO.catalogoDir.listaDir('"+v+"','"+data.path+"/"+v+"')",})});if(clone.length>0){g=Mustache.to_html("{{#data}}"+i3GEO.template.dir+"{{/data}}",{"data":clone})}clone=[];$.each(data.arquivos,function(i,v){clone.push({"nome":v,"onclick":"i3GEO.catalogoDir.adiciona('"+data.path+"/"+v+"')",})});if(clone.length>0){t=Mustache.to_html("{{#data}}"+i3GEO.template.tema+"{{/data}}",{"data":clone})}$("#"+i3GEO.catalogoDir.config.idCatalogoNavegacao).html(t+g)};i3GEO.php.listaarquivos(monta,path)},adiciona:function(path){i3GEO.util.adicionaSHP(path)}};
//
//compactados/legenda_compacto.js
if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.legenda={IDS:[],CAMADAS:"",objImg:"",config:{"idLegenda":"legendaHtml","templateLegenda":"templates/legenda.html","janela":false},carregaTemplates:function(){$.get(i3GEO.legenda.config.templateLegenda,function(template){i3GEO.template.legenda=template;i3GEO.legenda.inicia()})},inicia:function(config){if(config){$.each(config,function(i,v){i3GEO.legenda.config[i]=v})}if(!i3GEO.template.legenda){i3GEO.legenda.carregaTemplates();return}else{config=i3GEO.legenda.config;if(!$i(config.idLegenda)){return}i3GEO.eventos.adicionaEventos("NAVEGAMAPA",["i3GEO.legenda.atualiza()"]);if(config.janela==true){i3GEO.legenda.janela()}else{i3GEO.legenda.registra(config.idLegenda)}i3GEO.legenda.atualiza()}},registra:function(idleg){if($i(idleg)&&i3GEO.legenda.IDS.indexOf(idleg)==-1){i3GEO.legenda.IDS.push(idleg)}},off:function(idleg){i3GEO.legenda.IDS.remove(idleg)},atualiza:function(){if(i3GEO.template.legenda==undefined){return}var temp,i,tamanho,atualiza=false;if(i3GEO.arvoreDeCamadas.comparaTemas(i3GEO.legenda.CAMADAS,i3GEO.arvoreDeCamadas.CAMADAS)){return}temp=function(retorno){$.each(i3GEO.legenda.IDS,function(index,value){i3GEO.legenda.montaLegenda(retorno,value)})};tamanho=[35,25];$.each(i3GEO.legenda.IDS,function(index,value){i=$i(value);if(i&&i.style.display!=="none"){atualiza=true;try{tamanho=$("#"+value).attr("data-size").split(",")}catch(e){};i.innerHTML=$trad("o1")}else{i.innerHTML=""}});if(atualiza==true){i3GEO.legenda.CAMADAS=i3GEO.util.cloneObj(i3GEO.arvoreDeCamadas.CAMADAS);i3GEO.php.criaLegendaJSON(temp,"",tamanho[0],tamanho[1])}},montaLegenda:function(retorno,idOndeLegenda){var legenda="",t,idleg;if(!idOndeLegenda){idleg=$i(i3GEO.legenda.config.idLegenda)}else{idleg=$i(idOndeLegenda)}if(retorno.data.legenda!=""){$.each(retorno.data.legenda,function(index,value){if(value.tipo=="imagem"){value.classes[0].checkbox="hidden"}});$(".legendaTemaSolto").remove();t=Mustache.to_html("{{#data}}"+i3GEO.template.legenda+"{{/data}}",{"data":retorno.data.legenda,"altera":$trad("p9")});idleg.innerHTML=t;$("#"+i3GEO.legenda.config.idLegenda).find(".draggable").draggable({helper:"clone",appendTo:"body",start:function(event,ui){$(this).hide()},stop:function(event,ui){$(this).css({"position":"absolute","top":(event.clientY-event.offsetY),"left":(event.clientX-event.offsetX)});$(this).addClass("legendaTemaSolto");$("body").append($(this));$(this).show()}});$("#"+i3GEO.legenda.config.idLegenda+" img").bind('click',function(e){e.stopPropagation()},false)}else{idleg.innerHTML=""}},png:function(){var obj=$i("i3GEOconteudoLegenda");if($i("wlegenda")){obj.style.width=$i("wlegenda").style.width}else{obj.style.width="400px"}if($i("wlegenda_corpo")){obj.style.height=$i("wlegenda_corpo").style.height}else{obj.style.height="400px"}i3GEO.mapa.dialogo.html2canvas(obj)},ativaDesativaTema:function(inputbox){var temp=function(){i3GEO.php.corpo(i3GEO.atualiza,i3GEO.configura.tipoimagem);i3GEO.arvoreDeCamadas.atualiza("");i3GEO.janela.fechaAguarde("redesenha")};if(!inputbox.checked){i3GEO.php.ligatemas(temp,inputbox.value,"")}else{i3GEO.php.ligatemas(temp,"",inputbox.value)}},inverteStatusClasse:function(leg){var temp=function(retorno){i3GEO.Interface.atualizaTema(retorno,leg.name)};i3GEO.php.inverteStatusClasse(temp,leg.name,leg.value)},mudaCorClasse:function(tema,idclasse,objImg){var obj,novoel;i3GEO.legenda.objImg=objImg;if(!$i("tempinputcorclasse")){novoel=document.createElement("input");novoel.id="tempinputcorclasse";novoel.type="hidden";novoel.onchange=function(){var obj=$("#tempinputcorclasse");i3GEO.tema.alteracorclasse(obj.attr("tema"),obj.attr("idclasse"),obj.val(),i3GEO.legenda.objImg)};document.body.appendChild(novoel)}$("#tempinputcorclasse").attr({"tema":tema,"idclasse":idclasse});i3GEO.util.abreCor("","tempinputcorclasse")},janela:function(largura,altura,topo,esquerda,atualiza){if(!largura){largura=360}if(!altura){altura=300}var cabecalho,minimiza,janela,titulo,temp;janela=YAHOO.i3GEO.janela.manager.find("wlegenda");if(janela){i3GEO.janela.destroi("wlegenda")}cabecalho=function(){};minimiza=function(){var t=i3GEO.janela.minimiza("wlegenda","200px");if(t==="min"){$i("legendaTituloI").style.display="none"}else{$i("legendaTituloI").style.display="block"}};titulo="<span class='i3GeoTituloJanelaBsNolink' >"+$trad("p3")+"</span></div>";janela=i3GEO.janela.cria(largura+"px",altura+"px","","","",titulo,"wlegenda",false,"hd",cabecalho,minimiza,"","","","","nao","");temp=function(){i3GEO.legenda.IDS.remove("wlegenda_corpo")};YAHOO.util.Event.addListener(janela[0].close,"click",temp);i3GEO.legenda.registra("wlegenda_corpo");if(topo&&esquerda){janela=YAHOO.i3GEO.janela.manager.find("wlegenda");janela.moveTo(esquerda,topo)}i3GEO.legenda.CAMADAS="";if(atualiza==true){i3GEO.legenda.atualiza()}}};
//
//compactados/busca_compacto.js
if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.busca={PALAVRA:"",BOX:"",SERVICO:"http://mapas.mma.gov.br/webservices/geonames.php",SERVICOWMS:"http://mapas.mma.gov.br/webservices/geonameswms.php",config:{"ondeConteiner":"","inputOndePalavra":"","ondeServicosExternos":"","inputServicosExternos":"","inputTemasMapa":"","ondeTemasMapa":"","inputGoogle":"","ondeGoogle":"","templateTemasMapa":"","templateServico":"","templateGoogle":""},nget:0,carregaTemplates:function(){if(i3GEO.busca.nget==0){i3GEO.busca.nget=2;if(!i3GEO.template.buscaEmTemas){$.get(i3GEO.busca.config.templateTemasMapa,function(template){i3GEO.template.buscaEmTemas=template;i3GEO.busca.nget=i3GEO.busca.nget-1;if(i3GEO.busca.nget==0){i3GEO.busca.inicia()}})}else{i3GEO.busca.nget=i3GEO.busca.nget-1}if(!i3GEO.template.buscaEmServico){$.get(i3GEO.busca.config.templateServico,function(template){i3GEO.template.buscaEmServico=template;i3GEO.busca.nget=i3GEO.busca.nget-1;if(i3GEO.busca.nget==0){i3GEO.busca.inicia()}})}else{i3GEO.busca.nget=i3GEO.busca.nget-1}}},aguarde:function(){return'<div class="alert alert-warning" role="alert">'+$trad("o1")+'</div>'},inicia:function(obj){var palavra="",config=i3GEO.busca.config;if(obj){obj=$(obj);if(obj.attr("data-ondeConteiner")!=undefined){config.ondeConteiner=obj.attr("data-ondeConteiner")}if(obj.attr("data-ondeServicosExternos")!=undefined){config.ondeServicosExternos=obj.attr("data-ondeServicosExternos")}if(obj.attr("data-inputServicosExternos")!=undefined){config.inputServicosExternos=obj.attr("data-inputServicosExternos")}if(obj.attr("data-inputTemasMapa")!=undefined){config.inputTemasMapa=obj.attr("data-inputTemasMapa")}if(obj.attr("data-inputTemasMapa")!=undefined){config.ondeTemasMapa=obj.attr("data-ondeTemasMapa")}if(obj.attr("data-inputGoogle")!=undefined){config.inputGoogle=obj.attr("data-inputGoogle")}if(obj.attr("data-inputGoogle")!=undefined){config.ondeGoogle=obj.attr("data-ondeGoogle")}if(obj.attr("data-inputOndePalavra")!=undefined){config.inputOndePalavra=obj.attr("data-inputOndePalavra")}if(obj.attr("data-templateGoogle")!=undefined){config.templateGoogle=obj.attr("data-templateGoogle")}if(obj.attr("data-templateTemasMapa")!=undefined){config.templateTemasMapa=obj.attr("data-templateTemasMapa")}if(obj.attr("data-templateServico")!=undefined){config.templateServico=obj.attr("data-templateServico")}}if(!i3GEO.template.buscaEmTemas||!i3GEO.template.buscaEmServico){i3GEO.busca.carregaTemplates();return}else{var palavra=$(config.ondeConteiner).find(config.inputOndePalavra).val();if(palavra!=""){i3GEO.busca.PALAVRA=i3GEO.util.removeAcentos(palavra)}else{i3GEO.busca.PALAVRA="";return false}if($(config.ondeConteiner).find(config.inputServicosExternos)[0].checked==true){$(config.ondeConteiner).find(config.ondeServicosExternos).html(i3GEO.busca.aguarde());i3GEO.php.buscaRapida(i3GEO.busca.resultadoServico,i3GEO.configura.locaplic,i3GEO.busca.SERVICO,i3GEO.busca.PALAVRA)}if($(config.ondeConteiner).find(config.inputTemasMapa)[0].checked==true){$(config.ondeConteiner).find(config.inputTemasMapa).html(i3GEO.busca.aguarde());i3GEO.php.buscaRapida(i3GEO.busca.resultadoTemas,i3GEO.configura.locaplic,"temas",i3GEO.busca.PALAVRA)}if($(config.ondeConteiner).find(config.inputGoogle)[0].checked==true){$(config.ondeConteiner).find(config.inputGoogle).html(i3GEO.busca.aguarde());i3GEO.busca.google(i3GEO.busca.PALAVRA)}}},resultadoTemas:function(retorno){var t,config=i3GEO.busca.config;try{if(retorno.data){t=Mustache.to_html("{{#data}}"+i3GEO.template.buscaEmTemas+"{{/data}}",{"data":retorno.data});$(config.ondeConteiner).find(config.ondeTemasMapa).html(t)}}catch(e){$(config.ondeConteiner).find(config.ondeTemasMapa).html("")}},resultadoGoogle:function(retorno){var t,config=i3GEO.busca.config;try{if(retorno.data){t=Mustache.to_html("{{#data}}"+i3GEO.template.buscaEmTemas+"{{/data}}",{"data":retorno.data});$(config.ondeConteiner).find(config.ondeGoogle).html(t)}}catch(e){$(config.ondeConteiner).find(config.ondeGoogle).html("")}},resultadoServico:function(retorno){var t,config=i3GEO.busca.config;try{if(retorno.data){t=Mustache.to_html("{{#data}}"+i3GEO.template.buscaEmServico+"{{/data}}",{"data":retorno.data.geonames});$(config.ondeConteiner).find(config.ondeServicosExternos).html(t)}}catch(e){$(config.ondeConteiner).find(config.ondeServicosExternos).html("")}},google:function(palavra){var geocoder=new google.maps.Geocoder();geocoder.geocode({'address':palavra},function(results,status){if(status==google.maps.GeocoderStatus.OK){if(status!=google.maps.GeocoderStatus.ZERO_RESULTS){if(results){var b,bo,n=results.length,i=0,resultado={"data":[]};for(i=0;i<n;i++){if(results[i]&&results[i].formatted_address&&results[i].geometry&&results[i].geometry.viewport){bo=results[i].geometry.bounds;b=bo.getSouthWest().lng()+" "+bo.getSouthWest().lat()+" "+bo.getNorthEast().lng()+" "+bo.getNorthEast().lat();resultado.data.push({"valor":results[i].formatted_address,"box":b})}}i3GEO.busca.resultadoGoogle(resultado)}}}})},zoom:function(wkt,layer,gid,nm){var adicionaCamada=function(layer,gid,nm,ext){if(i3GEO.Interface.openlayers.googleLike===false){var s=i3GEO.busca.SERVICOWMS+"?gid="+gid+"&";i3GEO.php.adicionaTemaWMS(i3GEO.atualiza,s,layer,"default","EPSG:4618","image/png","1.1.0",nm+" - "+layer,"","nao","",i3GEO.configura.locaplic,i3GEO.configura.sid)}i3GEO.busca.zoomExt(ext)};var ext=i3GEO.util.wkt2ext(wkt,"polygon");if(ext==false){return}i3GEO.php.mudaext(adicionaCamada(layer,gid,nm,ext),i3GEO.configura.tipoimagem,ext,i3GEO.configura.locaplic,i3GEO.configura.sid)},mostraxy:function mostraxy(texto,tipo){var ext,b;if(tipo==="wkt"){ext=i3GEO.util.wkt2ext(texto,"polygon")}else{ext=texto}if(ext==false){return}b=ext.split(" ");if(i3GEO.busca.BOX===false){i3GEO.busca.BOX=i3GEO.desenho.addBox(b[0],b[1],b[2],b[3],"boxOndeBusca")}else{i3GEO.busca.BOX=i3GEO.desenho.moveBox(i3GEO.busca.BOX,b[0],b[1],b[2],b[3])}},escondexy:function(){i3GEO.desenho.removeBox("boxOndeBusca")},zoomExt:function(ext){if(i3GEO.Interface.ATUAL=="googlemaps"){i3GEO.Interface.googlemaps.zoom2extent(ext)}if(i3GEO.Interface.ATUAL=="openlayers"){i3GEO.Interface.openlayers.zoom2ext(ext)}}};
//
//compactados/caixaDeFerramentas_compacto.js
if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.caixaDeFerramentas={MIGALHA:[],config:{"idOndeFolder":"listaFerramentas","idOndeLinks":"listaFerramentasLinks","idOndeMigalha":"migalhaFerramentas","idOndeSearchInput":"searchInputFerramentas","templateFolder":"templates/ferramentasFolder.html","templateMigalha":"templates/ferramentasMigalha.html","templateLinks":"templates/ferramentasLink.html","templateSearchInput":"templates/searchInput.html"},carregaTemplates:function(){var t1=i3GEO.caixaDeFerramentas.config.templateFolder,t2=i3GEO.caixaDeFerramentas.config.templateLinks,t3=i3GEO.caixaDeFerramentas.config.templateMigalha;$.when($.get(t1),$.get(t2),$.get(t3)).done(function(r1,r2,r3){i3GEO.template.ferramentasFolder=r1[0];i3GEO.template.ferramentasLinks=r2[0];i3GEO.template.ferramentasMigalha=r3[0];i3GEO.caixaDeFerramentas.inicia()}).fail(function(){i3GEO.janela.closeMsg($trad("erroTpl"));return})},aguarde:function(){},inicia:function(config){if(config){$.each(config,function(i,v){i3GEO.caixaDeFerramentas.config[i]=v})}i3GEO.caixaDeFerramentas.aguarde();if(!i3GEO.template.ferramentasFolder||!i3GEO.template.ferramentasLinks||!i3GEO.template.ferramentasMigalha){i3GEO.caixaDeFerramentas.carregaTemplates();return}else{i3GEO.caixaDeFerramentas.searchInput();i3GEO.caixaDeFerramentas.nivel0()}},searchInput:function(){if(!i3GEO.template.searchInput){var t4=i3GEO.caixaDeFerramentas.config.templateSearchInput;$.get(t4).done(function(r4){i3GEO.template.searchInput=r4;$("#"+i3GEO.caixaDeFerramentas.config.idOndeSearchInput).html(Mustache.render(i3GEO.template.searchInput,{id:"searchInputListaFerramentas",placeholder:$trad("t23")}));i3GEO.caixaDeFerramentas.searchInputStart("searchInputListaFerramentas")})}else{$("#"+i3GEO.caixaDeFerramentas.config.idOndeSearchInput).html(i3GEO.template.searchInput)}},searchInputStart:function(id){$.typeahead({input:'#'+id,minLength:1,accent:true,cancelButton:false,maxItem:10,order:"asc",hint:true,dynamic:false,maxItemPerGroup:null,cache:false,ttl:86400000,compression:true,template:"<a href='{{url}}' >{{nome}}</a>",display:["nome"],source:{data:i3GEO.caixaDeFerramentas.allTools()},debug:false,callback:{onClickAfter:function(node,a,item,event){$(node).val("")}}})},allTools:function(){var confm=i3GEO.listaDeFerramentas,subs=i3GEO.listaDeFerramentas.submenus,menu=confm.menu,n=menu.length,f=i3GEO.caixaDeFerramentas.config,i,data=[];for(i=0;i<n;i+=1){if(menu[i].Interface&&menu[i].Interface!=i3GEO.Interface.ATUAL){continue}$.each(subs[menu[i].id],function(index,value){var no=value.submenu;if(no&&no.itemdata){$.each(no.itemdata,function(index1,value1){$.each(value1,function(index2,value2){data.push({nome:$('<div/>').html(value2.text).text(),url:value2.url})})})}else{if(value.url&&!value.target){data.push({nome:$('<div/>').html(value.text).text(),url:value.url})}}})}return data},migalha:function(data){var f=i3GEO.caixaDeFerramentas.config;var t=Mustache.to_html(i3GEO.template.ferramentasMigalha,{"nome":data.nome});$("#"+f.idOndeMigalha).data(data).html(t).click(function(event){var f=i3GEO.caixaDeFerramentas.config;event.stopImmediatePropagation();$("#"+f.idOndeMigalha).off("click");var data=$(this).data();if((data.nivel-1)==0){f.idOndeFolder.fadeOut("fast",function(){i3GEO.caixaDeFerramentas.nivel0();i3GEO.caixaDeFerramentas.config.idOndeFolder.show()})}if((data.nivel-1)==1){f.idOndeFolder.fadeOut("fast",function(){i3GEO.caixaDeFerramentas.nivel1(data);i3GEO.caixaDeFerramentas.config.idOndeFolder.show()})}if((data.nivel-1)==2){f.idOndeFolder.fadeOut("fast",function(){i3GEO.caixaDeFerramentas.nivel2(data);i3GEO.caixaDeFerramentas.config.idOndeFolder.show()})}})},nivel0:function(){var confm=i3GEO.listaDeFerramentas,subs=i3GEO.listaDeFerramentas.submenus,menu=confm.menu,n=menu.length,f=i3GEO.caixaDeFerramentas.config,i,t,data;$("#"+f.idOndeMigalha).html("");f.idOndeFolder.html("");f.idOndeLinks.html("");for(i=0;i<n;i+=1){if(menu[i].Interface&&menu[i].Interface!=i3GEO.Interface.ATUAL){continue}if(subs[menu[i].id].length>0){t=Mustache.to_html(i3GEO.template.ferramentasFolder,{"nome":menu[i].nome,"descricao":menu[i].descricao});t=$(t);data={"nivel":1,"nome":menu[i].nome,"id":i,"n0":i,"n1":"","n2":"","n3":""};t.find("a").data(data).click(function(){$(this).find("a").off("click");var data=$(this).data();i3GEO.caixaDeFerramentas.config.idOndeFolder.fadeOut("fast",function(){i3GEO.caixaDeFerramentas.nivel1(data);i3GEO.caixaDeFerramentas.config.idOndeFolder.show()})});i3GEO.caixaDeFerramentas.config.idOndeFolder.append(t)}}},nivel1:function(data){var confm=i3GEO.listaDeFerramentas,menu=confm.submenus[confm.menu[data.n0].id],n=menu.length,f=i3GEO.caixaDeFerramentas.config,i,t,datan;f.idOndeFolder.html("");f.idOndeLinks.html("");for(i=0;i<n;i+=1){if(menu[i].Interface&&menu[i].Interface!=i3GEO.Interface.ATUAL){continue}datan={"nivel":2,"nome":menu[i].text,"id":menu[i].id,"n0":data.n0,"n1":i,"n2":"","n3":""};if(menu[i].url){t=Mustache.to_html(i3GEO.template.ferramentasLinks,{"nome":menu[i].text,"target":menu[i].target,"url":menu[i].url,"opcional":menu[i].opcional});t=$(t);f.idOndeLinks.append(t)}else{t=Mustache.to_html(i3GEO.template.ferramentasFolder,{"nome":menu[i].text});t=$(t);t.find("a").data(datan).click(function(){$(this).find("a").off("click");var data=$(this).data();var f=i3GEO.caixaDeFerramentas.config;var t=Mustache.to_html(i3GEO.template.ferramentasMigalha,data);f.idOndeFolder.fadeOut("fast",function(){i3GEO.caixaDeFerramentas.nivel2(data);f.idOndeFolder.show()})});f.idOndeFolder.append(t)}}data.nivel=1;data.nome=confm.menu[data.id].nome;data.n0=data.id;i3GEO.caixaDeFerramentas.migalha(data)},nivel2:function(data){var confm=i3GEO.listaDeFerramentas,menu=confm.submenus[confm.menu[data.n0].id][data.n1].submenu.itemdata[0],n=menu.length,f=i3GEO.caixaDeFerramentas.config,i,t,datan;f.idOndeFolder.html("");f.idOndeLinks.html("");for(i=0;i<n;i+=1){if(menu[i].Interface&&menu[i].Interface!=i3GEO.Interface.ATUAL){continue}datan={"nivel":3,"nome":menu[i].text,"id":menu[i].id,"n0":data.n0,"n1":data.n1,"n2":i,"n3":""};if(menu[i].url){t=Mustache.to_html(i3GEO.template.ferramentasLinks,{"nome":menu[i].text,"target":menu[i].target,"url":menu[i].url,"opcional":menu[i].opcional});t=$(t);f.idOndeLinks.append(t)}else{t=Mustache.to_html(i3GEO.template.ferramentasFolder,{"nome":menu[i].text});t=$(t);t.find("a").data(datan).click(function(){$(this).find("a").off("click");var data=$(this).data();var t=Mustache.to_html(i3GEO.caixaDeFerramentas.config.templateMigalha,data)});f.idOndeFolder.append(t)}}data.nivel=2;data.id=data.n0;i3GEO.caixaDeFerramentas.migalha(data)}};
//
//template.js
if (typeof (i3GEO) === 'undefined') {
var i3GEO = {};
}
//
//utilizado para armazenar templates HTML
//alguns templates sao carregados sob demanda, por isso sao definidos aqui como false
//
//exemplo de uso:
// var html = Mustache.render(i3GEO.template.janela.aguarde, {id: "1234"});
// var html = Mustache.render("{{#data}}<option value='{{{img}}}'>{{{name}}}</option>{{/data}}", {data: [{name: 'xx',img:'yy'}]})
//
i3GEO.template = {
botoes: {
//lista de botoes na forma de icones
listaDeIcones: '<button title="{{{title}}}" onclick="{{{onclick}}}" class="btn btn-xs" style="margin: 2px; padding: 2px;"><span class="material-icons {{{classe}}}" style="{{{estiloicon}}}">{{{icone}}}</span></button>',
padrao: '<button title="{{{title}}}" onclick="{{{onclick}}}" class="btn btn-primary btn-sm btn-raised" style="{{{style}}}">{{{text}}}</button>'
},
//utilizados nas janelas flutuantes
janela : {
aguarde: "<div id='{{id}}_imagemCabecalho' class='i3GeoAguardeJanela progress' style='visibility:hidden; '><span class='progress-bar progress-bar-striped active' role='progressbar' style='width: 100%'></span></div>",
msg: "<div class='modal fade' data-keyboard='false' tabindex='-1' role='dialog' aria-hidden='true' style='z-index:500000;overflow-y:visible;'><div class='modal-dialog'><div class='modal-content'><div class='modal-header' style='padding-top: 5px;'><button type='button' class='close pull-right' data-dismiss='modal' aria-label='Close'><span aria-hidden='true'>&times;</span></button></div><div class='modal-body' style='padding-top: 0px;'><div id='i3GEOMensagemTempoModal' > {{{texto}}} </div></div></div></div></div>"
},
//formatacao da lista de camadas
camada: false,
//formatacao da lista de camadas de fundo
camadaFundo: false,
//formatacao da lista de camadas graficas
camadaGr: false,
//tooltip utilizado quando o LAYER for do tipo utfGrid
utfGridInfo: '<div><div id="i3GEOoverlayInfo"></div></div>',
//resultado da busca feita em um tema
buscaEmTemas: false,
//resultado da busca feita em um servico externo
buscaEmServico: false,
//formatacao de itens de listagens que sao folders
ferramentasFolder: false,
//formatacao de itens de listagens que sao links
ferramentasLinks: false,
//formatacao de listas do tipo migalha mostrada na lista de ferramentas
ferramentasMigalha: false,
//formatacao geral utilizada para folders
dir: false,
//formatacao geral utilizada para uma camada
tema: false,
//formatacao utilizada em listas do tipo migalha mostradas no catalogo
catalogoMigalha: false,
//formatacao da legenda (guia principal do mapa)
legenda: false,
//formatacao da lista de marcadores salvos pelo usuario
marcador: false,
//campo do tipo input para a busca usando typeahead
searchInput: false
};

<?php if(extension_loaded('zlib')){ob_end_flush();}?>