// All material copyright ESRI, All Rights Reserved, unless otherwise specified.
// See http://js.arcgis.com/3.23/esri/copyright.txt for details.
//>>built
define("esri/layers/vectorTiles/views/2d/tiling/TileKey",["require","exports","../../../core/ObjectPool"],function(h,k,f){return function(){function b(a,b,c,d){"string"===typeof a?(a=a.split("/"),b=a[1],c=a[2],d=a[3],this.level=+a[0],this.row=+b,this.col=+c,this.world=+d||0):a&&"object"===typeof a?(this.level=a.level||0,this.row=a.row||0,this.col=a.col||0,this.world=a.world||0):(this.level=+a||0,this.row=+b||0,this.col=+c||0,this.world=+d||0)}b.from=function(a,g,c,d){return b.pool.acquire(a,g,c,d)};
b.getId=function(a,b,c,d){return"object"===typeof a?a.level+"/"+a.row+"/"+a.col+"/"+a.world:a+"/"+b+"/"+c+"/"+d};Object.defineProperty(b.prototype,"id",{get:function(){return b.getId(this)},enumerable:!0,configurable:!0});b.prototype.equals=function(a){return this.level===a.level&&this.row===a.row&&this.col===a.col&&this.world===a.world};b.prototype.release=function(){this.world=this.col=this.row=this.level=0};b.prototype.set=function(a,b,c,d){var e=typeof a;"object"===e?(this.level=a.level||0,this.row=
a.row||0,this.col=a.col||0,this.world=a.world||0):"string"===e?(a=a.split("/"),b=a[1],c=a[2],d=a[3],this.level=parseFloat(a[0]),this.row=parseFloat(b),this.col=parseFloat(c),this.world=parseFloat(d)):(this.level=a,this.row=b,this.col=c,this.world=d);return this};b.prototype.toString=function(){return this.level+"/"+this.row+"/"+this.col+"/"+this.world};b.pool=new f(b,!0,null,25,50);return b}()});