key}`,listener);}set(key,value,silent){const values=this.values_||(this.values_={});if(silent){values[key]=value;}else{const oldValue=values[key];values[key]=value;if(oldValue!==value){this.notify(key,oldValue);}}}setProperties(values,silent){for(const key in values){this.set(key,values[key],silent);}}applyProperties(source){if(!source.values_){return;}Object.assign(this.values_||(this.values_={}),source.values_);}unset(key,silent){if(this.values_&&key in this.values_){const oldValue=this.values_[key];delete this.values_[key];if(isEmpty$1(this.values_)){this.values_=null;}if(!silent){this.notify(key,oldValue);}}}}const BaseObject$1=BaseObject;const CollectionEventType={ADD:"add",REMOVE:"remove"};const Property$3={LENGTH:"length"};class CollectionEvent extends Event{constructor(type,element,index){super(type);this.element=element;this.index=index;}}class Collection extends BaseObject$1{constructor(array,options){super();this.on;this.once;this.un;options=options||{};this.unique_=!!
options.unique;this.array_=array?array:[];if(this.unique_){for(let i=0,ii=this.array_.length;i<ii;++i){this.assertUnique_(this.array_[i],i);}}this.updateLength_();}clear(){while(this.getLength()>0){this.pop();}}extend(arr){for(let i=0,ii=arr.length;i<ii;++i){this.push(arr[i]);}return this;}forEach(f){const array=this.array_;for(let i=0,ii=array.length;i<ii;++i){f(array[i],i,array);}}getArray(){return this.array_;}item(index){return this.array_[index];}getLength(){return this.get(Property$3.LENGTH);}insertAt(index,elem){if(index<0||index>this.getLength()){throw new Error("Index out of bounds: "+index);}if(this.unique_){this.assertUnique_(elem);}this.array_.splice(index,0,elem);this.updateLength_();this.dispatchEvent(new CollectionEvent(CollectionEventType.ADD,elem,index));}pop(){return this.removeAt(this.getLength()-1);}push(elem){if(this.unique_){this.assertUnique_(elem);}const n=this.getLength();this.insertAt(n,elem);return this.getLength();}remove(elem){const arr=this.array_;for(let i
=0,ii=arr.length;i<ii;++i){if(arr[i]===elem){return this.removeAt(i);}}return void 0;}removeAt(index){if(index<0||index>=this.getLength()){return void 0;}const prev=this.array_[index];this.array_.splice(index,1);this.updateLength_();this.dispatchEvent(new CollectionEvent(CollectionEventType.REMOVE,prev,index));return prev;}setAt(index,elem){const n=this.getLength();if(index>=n){this.insertAt(index,elem);return;}if(index<0){throw new Error("Index out of bounds: "+index);}if(this.unique_){this.assertUnique_(elem,index);}const prev=this.array_[index];this.array_[index]=elem;this.dispatchEvent(new CollectionEvent(CollectionEventType.REMOVE,prev,index));this.dispatchEvent(new CollectionEvent(CollectionEventType.ADD,elem,index));}updateLength_(){this.set(Property$3.LENGTH,this.array_.length);}assertUnique_(elem,except){for(let i=0,ii=this.array_.length;i<ii;++i){if(this.array_[i]===elem&&i!==except){throw new Error("Duplicate item added to a unique collection");}}}}const Collection$1=
Collection;const ua=typeof navigator!=="undefined"&&typeof navigator.userAgent!=="undefined"?navigator.userAgent.toLowerCase():"";const FIREFOX=ua.includes("firefox");const SAFARI=ua.includes("safari")&&!ua.includes("chrom");SAFARI&&(ua.includes("version/15.4")||/cpu (os|iphone os) 15_4 like mac os x/.test(ua));const WEBKIT=ua.includes("webkit")&&!ua.includes("edge");const MAC=ua.includes("macintosh");const DEVICE_PIXEL_RATIO=typeof devicePixelRatio!=="undefined"?devicePixelRatio:1;const WORKER_OFFSCREEN_CANVAS=typeof WorkerGlobalScope!=="undefined"&&typeof OffscreenCanvas!=="undefined"&&self instanceof WorkerGlobalScope;const IMAGE_DECODE=typeof Image!=="undefined"&&Image.prototype.decode;const PASSIVE_EVENT_LISTENERS=function(){let passive=false;try{const options=Object.defineProperty({},"passive",{get:function(){passive=true;}});window.addEventListener("_",null,options);window.removeEventListener("_",null,options);}catch(error){}return passive;}();function assert(assertion,
setMaxResolution(maxResolution){this.set(LayerProperty.MAX_RESOLUTION,maxResolution);}setMinResolution(minResolution){this.set(LayerProperty.MIN_RESOLUTION,minResolution);}setMaxZoom(maxZoom){this.set(LayerProperty.MAX_ZOOM,maxZoom);}setMinZoom(minZoom){this.set(LayerProperty.MIN_ZOOM,minZoom);}setOpacity(opacity){assert(typeof opacity==="number","Layer opacity must be a number");this.set(LayerProperty.OPACITY,opacity);}setVisible(visible){this.set(LayerProperty.VISIBLE,visible);}setZIndex(zindex){this.set(LayerProperty.Z_INDEX,zindex);}disposeInternal(){if(this.state_){this.state_.layer=null;this.state_=null;}super.disposeInternal();}}const BaseLayer$1=BaseLayer;const RenderEventType={PRERENDER:"prerender",POSTRENDER:"postrender",PRECOMPOSE:"precompose",POSTCOMPOSE:"postcompose",RENDERCOMPLETE:"rendercomplete"};const ViewHint={ANIMATING:0,INTERACTING:1};const ViewProperty={CENTER:"center",RESOLUTION:"resolution",ROTATION:"rotation"};const DEFAULT_MAX_ZOOM=42;const DEFAULT_TILE_SIZE=
size){size=size||this.getViewportSizeMinusPadding_();const center=(this.getCenterInternal());assert(center,"The view center is not defined");const resolution=(this.getResolution());assert(resolution!==void 0,"The view resolution is not defined");const rotation=(this.getRotation());assert(rotation!==void 0,"The view rotation is not defined");return getForViewAndSize(center,resolution,rotation,size);}getMaxResolution(){return this.maxResolution_;}getMinResolution(){return this.minResolution_;}getMaxZoom(){return(this.getZoomForResolution(this.minResolution_));}setMaxZoom(zoom){this.applyOptions_(this.getUpdatedOptions_({maxZoom:zoom}));}getMinZoom(){return(this.getZoomForResolution(this.maxResolution_));}setMinZoom(zoom){this.applyOptions_(this.getUpdatedOptions_({minZoom:zoom}));}setConstrainResolution(enabled){this.applyOptions_(this.getUpdatedOptions_({constrainResolution:enabled}));}getProjection(){return this.projection_;}getResolution(){return(this.get(ViewProperty.RESOLUTION));}
.renderFrame(frameState,target);}return null;}unrender(){this.rendered=false;}setMapInternal(map){if(!map){this.unrender();}this.set(LayerProperty.MAP,map);}getMapInternal(){return this.get(LayerProperty.MAP);}setMap(map){if(this.mapPrecomposeKey_){unlistenByKey(this.mapPrecomposeKey_);this.mapPrecomposeKey_=null;}if(!map){this.changed();}if(this.mapRenderKey_){unlistenByKey(this.mapRenderKey_);this.mapRenderKey_=null;}if(map){this.mapPrecomposeKey_=listen(map,RenderEventType.PRECOMPOSE,function(evt){const renderEvent=(evt);const layerStatesArray=renderEvent.frameState.layerStatesArray;const layerState=this.getLayerState(false);assert(!layerStatesArray.some(function(arrayLayerState){return arrayLayerState.layer===layerState.layer;}),"A layer can only be added to the map once. Use either `layer.setMap()` or `map.addLayer()`, not both.");layerStatesArray.push(layerState);},this);this.mapRenderKey_=listen(this,EventType.CHANGE,map.render,map);this.changed();}}setSource(source){this.set(
));delete baseOptions.layers;let layers=options.layers;super(baseOptions);this.on;this.once;this.un;this.layersListenerKeys_=[];this.listenerKeys_={};this.addChangeListener(Property$2.LAYERS,this.handleLayersChanged_);if(layers){if(Array.isArray(layers)){layers=new Collection$1(layers.slice(),{unique:true});}else{assert(typeof layers.getArray==="function","Expected `layers` to be an array or a `Collection`");}}else{layers=new Collection$1(void 0,{unique:true});}this.setLayers(layers);}handleLayerChange_(){this.changed();}handleLayersChanged_(){this.layersListenerKeys_.forEach(unlistenByKey);this.layersListenerKeys_.length=0;const layers=this.getLayers();this.layersListenerKeys_.push(listen(layers,CollectionEventType.ADD,this.handleLayersAdd_,this),listen(layers,CollectionEventType.REMOVE,this.handleLayersRemove_,this));for(const id in this.listenerKeys_){this.listenerKeys_[id].forEach(unlistenByKey);}clear(this.listenerKeys_);const layersArray=layers.getArray();for(let i=0,ii=
priorities.pop();this.siftUp_(0);}const elementKey=this.keyFunction_(element);delete this.queuedElements_[elementKey];return element;}enqueue(element){assert(!(this.keyFunction_(element)in this.queuedElements_),"Tried to enqueue an `element` that was already added to the queue");const priority=this.priorityFunction_(element);if(priority!=DROP){this.elements_.push(element);this.priorities_.push(priority);this.queuedElements_[this.keyFunction_(element)]=true;this.siftDown_(0,this.elements_.length-1);return true;}return false;}getCount(){return this.elements_.length;}getLeftChildIndex_(index){return index*2+1;}getRightChildIndex_(index){return index*2+2;}getParentIndex_(index){return index-1>>1;}heapify_(){let i;for(i=(this.elements_.length>>1)-1;i>=0;i--){this.siftUp_(i);}}isEmpty(){return this.elements_.length===0;}isKeyQueued(key){return key in this.queuedElements_;}isQueued(element){return this.isKeyQueued(this.keyFunction_(element));}siftUp_(index){const elements=this.elements_;const
"No map visible because the map container's width or height are 0.");}}}const oldSize=this.getSize();if(size&&(!oldSize||!equals$2(size,oldSize))){this.setSize(size);this.updateViewportSize_();}}updateViewportSize_(){const view=this.getView();if(view){let size=void 0;const computedStyle=getComputedStyle(this.viewport_);if(computedStyle.width&&computedStyle.height){size=[parseInt(computedStyle.width,10),parseInt(computedStyle.height,10)];}view.setViewportSize(size);}}}function createOptionsInternal(options){let keyboardEventTarget=null;if(options.keyboardEventTarget!==void 0){keyboardEventTarget=typeof options.keyboardEventTarget==="string"?document.getElementById(options.keyboardEventTarget):options.keyboardEventTarget;}const values={};const layerGroup=options.layers&&typeof options.layers.getLayers==="function"?(options.layers):new LayerGroup$1({layers:(options.layers)});values[MapProperty.LAYERGROUP]=layerGroup;values[MapProperty.TARGET]=options.target;values[MapProperty.VIEW]=
options.view instanceof OlView?options.view:new OlView();let controls;if(options.controls!==void 0){if(Array.isArray(options.controls)){controls=new Collection$1(options.controls.slice());}else{assert(typeof options.controls.getArray==="function","Expected `controls` to be an array or an `ol/Collection.js`");controls=options.controls;}}let interactions;if(options.interactions!==void 0){if(Array.isArray(options.interactions)){interactions=new Collection$1(options.interactions.slice());}else{assert(typeof options.interactions.getArray==="function","Expected `interactions` to be an array or an `ol/Collection.js`");interactions=options.interactions;}}let overlays;if(options.overlays!==void 0){if(Array.isArray(options.overlays)){overlays=new Collection$1(options.overlays.slice());}else{assert(typeof options.overlays.getArray==="function","Expected `overlays` to be an array or an `ol/Collection.js`");overlays=options.overlays;}}else{overlays=new Collection$1();}return{controls,interactions,
options.src;assert(!(cacheKey!==void 0&&image),"`image` and `src` cannot be provided at the same time");if((cacheKey===void 0||cacheKey.length===0)&&image){cacheKey=image.src||getUid(image);}assert(cacheKey!==void 0&&cacheKey.length>0,"A defined and non-empty `src` or `image` must be provided");assert(!((options.width!==void 0||options.height!==void 0)&&options.scale!==void 0),"`width` or `height` cannot be provided together with `scale`");let imageState;if(options.src!==void 0){imageState=ImageState.IDLE;}else if(image!==void 0){if(image instanceof HTMLImageElement){if(image.complete){imageState=image.src?ImageState.LOADED:ImageState.IDLE;}else{imageState=ImageState.LOADING;}}else{imageState=ImageState.LOADED;}}this.color_=options.color!==void 0?asArray(options.color):null;this.iconImage_=get(image,cacheKey,this.crossOrigin_,imageState,this.color_);this.offset_=options.offset!==void 0?options.offset:[0,0];this.offsetOrigin_=options.offsetOrigin!==void 0?options.offsetOrigin:"top-left"
isArray(obj)){styles=obj;}else{assert(typeof obj.getZIndex==="function","Expected an `ol/style/Style` or an array of `ol/style/Style.js`");const style=(obj);styles=[style];}return function(){return styles;};}const Feature$1=Feature;class GeometryCollection extends Geometry$1{constructor(geometries){super();this.geometries_=geometries?geometries:null;this.changeEventsKeys_=[];this.listenGeometriesChange_();}unlistenGeometriesChange_(){this.changeEventsKeys_.forEach(unlistenByKey);this.changeEventsKeys_.length=0;}listenGeometriesChange_(){if(!this.geometries_){return;}for(let i=0,ii=this.geometries_.length;i<ii;++i){this.changeEventsKeys_.push(listen(this.geometries_[i],EventType.CHANGE,this.changed,this));}}clone(){const geometryCollection=new GeometryCollection(null);geometryCollection.setGeometries(this.geometries_);geometryCollection.applyProperties(this);return geometryCollection;}closestPointXY(x,y,closestPoint,minSquaredDistance){if(minSquaredDistance<closestSquaredDistanceXY(this
(geometry,options);});return new GeometryCollection$1(geometries);}function readPointGeometry(object){return new OlPoint(object["coordinates"]);}function readLineStringGeometry(object){return new LineString$1(object["coordinates"]);}function readMultiLineStringGeometry(object){return new MultiLineString$1(object["coordinates"]);}function readMultiPointGeometry(object){return new MultiPoint$1(object["coordinates"]);}function readMultiPolygonGeometry(object){return new MultiPolygon$1(object["coordinates"]);}function readPolygonGeometry(object){return new Polygon$1(object["coordinates"]);}function writeGeometry(geometry,options){geometry=transformGeometryWithOptions(geometry,true,options);const type=geometry.getType();let geoJSON;switch(type){case"Point":{geoJSON=writePointGeometry(geometry);break;}case"LineString":{geoJSON=writeLineStringGeometry(geometry);break;}case"Polygon":{geoJSON=writePolygonGeometry(geometry,options);break;}case"MultiPoint":{geoJSON=writeMultiPointGeometry(
(extent,resolution,projection,success,failure){const source=(this);loadFeaturesXhr(url,format,extent,resolution,projection,function(features,dataProjection){source.addFeatures(features);if(success!==void 0){success(features);}},failure?failure:VOID);};}class VectorSourceEvent extends Event{constructor(type,feature,features){super(type);this.feature=feature;this.features=features;}}class VectorSource extends Source$1{constructor(options){options=options||{};super({attributions:options.attributions,interpolate:true,projection:void 0,state:"ready",wrapX:options.wrapX!==void 0?options.wrapX:true});this.on;this.once;this.un;this.loader_=VOID;this.format_=options.format;this.overlaps_=options.overlaps===void 0?true:options.overlaps;this.url_=options.url;if(options.loader!==void 0){this.loader_=options.loader;}else if(this.url_!==void 0){assert(this.format_,"`format` must be set when `url` is set");this.loader_=xhr(this.url_,this.format_);}this.strategy_=options.strategy!==void 0?options.
this.nullGeometryFeatures_[featureKey];}else{if(this.featuresRtree_){this.featuresRtree_.remove(feature);}}const result=this.removeFeatureInternal(feature);if(result){this.changed();}}removeFeatureInternal(feature){const featureKey=getUid(feature);const featureChangeKeys=this.featureChangeKeys_[featureKey];if(!featureChangeKeys){return;}featureChangeKeys.forEach(unlistenByKey);delete this.featureChangeKeys_[featureKey];const id=feature.getId();if(id!==void 0){delete this.idIndex_[id.toString()];}delete this.uidIndex_[featureKey];this.dispatchEvent(new VectorSourceEvent(VectorEventType.REMOVEFEATURE,feature));return feature;}removeFromIdIndex_(feature){let removed=false;for(const id in this.idIndex_){if(this.idIndex_[id]===feature){delete this.idIndex_[id];removed=true;break;}}return removed;}setLoader(loader){this.loader_=loader;}setUrl(url){assert(this.format_,"`format` must be set when `url` is set");this.url_=url;this.setLoader(xhr(url,this.format_));}}const OlSourceVector=
newer;}}get(key,options){const entry=this.entries_[key];assert(entry!==void 0,"Tried to get a value for a key that does not exist in the cache");if(entry===this.newest_){return entry.value_;}if(entry===this.oldest_){this.oldest_=this.oldest_.newer;this.oldest_.older=null;}else{entry.newer.older=entry.older;entry.older.newer=entry.newer;}entry.newer=null;entry.older=this.newest_;this.newest_.newer=entry;this.newest_=entry;return entry.value_;}remove(key){const entry=this.entries_[key];assert(entry!==void 0,"Tried to get a value for a key that does not exist in the cache");if(entry===this.newest_){this.newest_=entry.older;if(this.newest_){this.newest_.newer=null;}}else if(entry===this.oldest_){this.oldest_=entry.newer;if(this.oldest_){this.oldest_.older=null;}}else{entry.newer.older=entry.older;entry.older.newer=entry.newer;}delete this.entries_[key];--this.count_;return entry.value_;}getCount(){return this.count_;}getKeys(){const keys=new Array(this.count_);let i=0;let entry;for(entry=
this.newest_;entry;entry=entry.older){keys[i++]=entry.key_;}return keys;}getValues(){const values=new Array(this.count_);let i=0;let entry;for(entry=this.newest_;entry;entry=entry.older){values[i++]=entry.value_;}return values;}peekLast(){return this.oldest_.value_;}peekLastKey(){return this.oldest_.key_;}peekFirstKey(){return this.newest_.key_;}peek(key){if(!this.containsKey(key)){return void 0;}return this.entries_[key].value_;}pop(){const entry=this.oldest_;delete this.entries_[entry.key_];if(entry.newer){entry.newer.older=null;}this.oldest_=entry.newer;if(!this.oldest_){this.newest_=null;}--this.count_;return entry.value_;}replace(key,value){this.get(key);this.entries_[key].value_=value;}set(key,value){assert(!(key in this.entries_),"Tried to set a value for a key that is used already");const entry={key_:key,newer:null,older:this.newest_,value_:value};if(!this.newest_){this.oldest_=entry;}else{this.newest_.newer=entry;}this.newest_=entry;this.entries_[key]=entry;++this.count_;}
tileRange.maxX>this.maxX){this.maxX=tileRange.maxX;}if(tileRange.minY<this.minY){this.minY=tileRange.minY;}if(tileRange.maxY>this.maxY){this.maxY=tileRange.maxY;}}getHeight(){return this.maxY-this.minY+1;}getSize(){return[this.getWidth(),this.getHeight()];}getWidth(){return this.maxX-this.minX+1;}intersects(tileRange){return this.minX<=tileRange.maxX&&this.maxX>=tileRange.minX&&this.minY<=tileRange.maxY&&this.maxY>=tileRange.minY;}}function createOrUpdate(minX,maxX,minY,maxY,tileRange){if(tileRange!==void 0){tileRange.minX=minX;tileRange.maxX=maxX;tileRange.minY=minY;tileRange.maxY=maxY;return tileRange;}return new TileRange(minX,maxX,minY,maxY);}const TileRange$1=TileRange;const tmpTileCoord=[0,0,0];const DECIMALS=5;class TileGrid{constructor(options){this.minZoom=options.minZoom!==void 0?options.minZoom:0;this.resolutions_=options.resolutions;assert(isSorted(this.resolutions_,function(a,b){return b-a;},true),"`resolutions` must be sorted in descending order");let zoomFactor;if(!
options.origins){for(let i=0,ii=this.resolutions_.length-1;i<ii;++i){if(!zoomFactor){zoomFactor=this.resolutions_[i]/this.resolutions_[i+1];}else{if(this.resolutions_[i]/this.resolutions_[i+1]!==zoomFactor){zoomFactor=void 0;break;}}}}this.zoomFactor_=zoomFactor;this.maxZoom=this.resolutions_.length-1;this.origin_=options.origin!==void 0?options.origin:null;this.origins_=null;if(options.origins!==void 0){this.origins_=options.origins;assert(this.origins_.length==this.resolutions_.length,"Number of `origins` and `resolutions` must be equal");}const extent=options.extent;if(extent!==void 0&&!this.origin_&&!this.origins_){this.origin_=getTopLeft(extent);}assert(!this.origin_&&this.origins_||this.origin_&&!this.origins_,"Either `origin` or `origins` must be configured, never both");this.tileSizes_=null;if(options.tileSizes!==void 0){this.tileSizes_=options.tileSizes;assert(this.tileSizes_.length==this.resolutions_.length,"Number of `tileSizes` and `resolutions` must be equal");}this.
tileSize_=options.tileSize!==void 0?options.tileSize:!this.tileSizes_?DEFAULT_TILE_SIZE:null;assert(!this.tileSize_&&this.tileSizes_||this.tileSize_&&!this.tileSizes_,"Either `tileSize` or `tileSizes` must be configured, never both");this.extent_=extent!==void 0?extent:null;this.fullTileRanges_=null;this.tmpSize_=[0,0];this.tmpExtent_=[0,0,0,0];if(options.sizes!==void 0){this.fullTileRanges_=options.sizes.map(function(size,z){const tileRange=new TileRange$1(Math.min(0,size[0]),Math.max(size[0]-1,-1),Math.min(0,size[1]),Math.max(size[1]-1,-1));if(extent){const restrictedTileRange=this.getTileRangeForExtentAndZ(extent,z);tileRange.minX=Math.max(restrictedTileRange.minX,tileRange.minX);tileRange.maxX=Math.min(restrictedTileRange.maxX,tileRange.maxX);tileRange.minY=Math.max(restrictedTileRange.minY,tileRange.minY);tileRange.maxY=Math.min(restrictedTileRange.maxY,tileRange.maxY);}return tileRange;},this);}else if(extent){this.calculateTileRanges_(extent);}}forEachTileCoord(extent,zoom,
===TileState.LOADED;if(loaded){loaded=callback(tile)!==false;}}if(!loaded){covered=false;}}}return covered;}getGutterForProjection(projection){return 0;}getKey(){return this.key_;}setKey(key){if(this.key_!==key){this.key_=key;this.changed();}}getOpaque(projection){return this.opaque_;}getResolutions(projection){const tileGrid=projection?this.getTileGridForProjection(projection):this.tileGrid;if(!tileGrid){return null;}return tileGrid.getResolutions();}getTile(z,x,y,pixelRatio,projection){return abstract();}getTileGrid(){return this.tileGrid;}getTileGridForProjection(projection){if(!this.tileGrid){return getForProjection(projection);}return this.tileGrid;}getTileCacheForProjection(projection){const sourceProjection=this.getProjection();assert(sourceProjection===null||equivalent(sourceProjection,projection),"A VectorTile source can only be rendered if it has a projection compatible with the view projection.");return this.tileCache;}getTilePixelRatio(pixelRatio){return this.
.renderReprojectionEdges_==render2){return;}this.renderReprojectionEdges_=render2;for(const id in this.tileCacheForProjection){this.tileCacheForProjection[id].clear();}this.changed();}setTileGridForProjection(projection,tilegrid){const proj=get$1(projection);if(proj){const projKey=getUid(proj);if(!(projKey in this.tileGridForProjection)){this.tileGridForProjection[projKey]=tilegrid;}}}clear(){super.clear();for(const id in this.tileCacheForProjection){this.tileCacheForProjection[id].clear();}}}function defaultTileLoadFunction(imageTile,src){imageTile.getImage().src=src;}const TileImage$1=TileImage;function appendParams(uri,params){const keyParams=[];Object.keys(params).forEach(function(k){if(params[k]!==null&¶ms[k]!==void 0){keyParams.push(k+"="+encodeURIComponent(params[k]));}});const qs=keyParams.join("&");uri=uri.replace(/[?&]$/,"");uri+=uri.includes("?")?"&":"?";return uri+qs;}class WMTSTileGrid extends TileGrid$1{constructor(options){super({extent:options.extent,origin:options.
node,objectStack){return pushParseAndPop([],TMS_LIMITS_LIST_PARSERS,node,objectStack);}function readTileMatrixLimits(node,objectStack){return pushParseAndPop({},TMS_LIMITS_PARSERS,node,objectStack);}const OlFormatWmtsCapabilities=WMTSCapabilities;let numTypes=0;const BooleanType=1<<numTypes++;const NumberType=1<<numTypes++;const StringType=1<<numTypes++;const ColorType=1<<numTypes++;const NumberArrayType=1<<numTypes++;const AnyType=Math.pow(2,numTypes)-1;const typeNames={[BooleanType]:"boolean",[NumberType]:"number",[StringType]:"string",[ColorType]:"color",[NumberArrayType]:"number[]"};const namedTypes=Object.keys(typeNames).map(Number).sort(ascending);function typeName(type){const names=[];for(const namedType of namedTypes){if(includesType(type,namedType)){names.push(typeNames[namedType]);}}if(names.length===0){return"untyped";}if(names.length<3){return names.join(" or ");}return names.slice(0,-1).join(", ")+", or "+names[names.length-1];}function includesType(broad,specific){return(
broad&specific)===specific;}function overlapsType(oneType,otherType){return!!(oneType&otherType);}class LiteralExpression{constructor(type,value){this.type=type;this.value=value;}}class CallExpression{constructor(type,operator,...args){this.type=type;this.operator=operator;this.args=args;}}function newParsingContext(){return{variables:new Set(),properties:new Set()};}function parse(encoded,context){switch(typeof encoded){case"boolean":{return new LiteralExpression(BooleanType,encoded);}case"number":{return new LiteralExpression(NumberType,encoded);}case"string":{return new LiteralExpression(StringType,encoded);}}if(!Array.isArray(encoded)){throw new Error("Expression must be an array or a primitive value");}if(encoded.length===0){throw new Error("Empty expression");}if(typeof encoded[0]==="string"){return parseCallExpression(encoded,context);}for(const item of encoded){if(typeof item!=="number"){throw new Error("Expected an array of numbers");}}let type=NumberArrayType;if(encoded.
length===3||encoded.length===4){type|=ColorType;}return new LiteralExpression(type,encoded);}const Ops={Number:"number",String:"string",Get:"get",Var:"var",Any:"any",All:"all",Not:"!",Resolution:"resolution",Equal:"==",NotEqual:"!=",GreaterThan:">",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",Multiply:"*",Divide:"/",Add:"+",Subtract:"-",Clamp:"clamp",Mod:"%",Pow:"^",Abs:"abs",Floor:"floor",Ceil:"ceil",Round:"round",Sin:"sin",Cos:"cos",Atan:"atan",Sqrt:"sqrt",Match:"match"};const parsers={[Ops.Number]:createParser(withArgs(1,Infinity,AnyType),NumberType),[Ops.String]:createParser(withArgs(1,Infinity,AnyType),StringType),[Ops.Get]:createParser(withGetArgs,AnyType),[Ops.Var]:createParser(withVarArgs,AnyType),[Ops.Resolution]:createParser(withNoArgs,NumberType),[Ops.Any]:createParser(withArgs(2,Infinity,BooleanType),BooleanType),[Ops.All]:createParser(withArgs(2,Infinity,BooleanType),BooleanType),[Ops.Not]:createParser(withArgs(1,1,BooleanType),BooleanType),[Ops.Equal]:
NumberType),NumberType),[Ops.Round]:createParser(withArgs(1,1,NumberType),NumberType),[Ops.Sin]:createParser(withArgs(1,1,NumberType),NumberType),[Ops.Cos]:createParser(withArgs(1,1,NumberType),NumberType),[Ops.Atan]:createParser(withArgs(1,2,NumberType),NumberType),[Ops.Sqrt]:createParser(withArgs(1,1,NumberType),NumberType),[Ops.Match]:createParser(withArgs(4,Infinity,StringType|NumberType),AnyType)};function withGetArgs(encoded,context){if(encoded.length!==2){throw new Error("Expected 1 argument for get operation");}const arg=parse(encoded[1],context);if(!(arg instanceof LiteralExpression)){throw new Error("Expected a literal argument for get operation");}if(typeof arg.value!=="string"){throw new Error("Expected a string argument for get operation");}context.properties.add(arg.value);return[arg];}function withVarArgs(encoded,context){if(encoded.length!==2){throw new Error("Expected 1 argument for var operation");}const arg=parse(encoded[1],context);if(!(arg instanceof
LiteralExpression)){throw new Error("Expected a literal argument for var operation");}if(typeof arg.value!=="string"){throw new Error("Expected a string argument for get operation");}context.variables.add(arg.value);return[arg];}function withNoArgs(encoded,context){const operation=encoded[0];if(encoded.length!==1){throw new Error(`Expected no arguments for ${operation} operation`);}return[];}function withArgs(minArgs,maxArgs,argType){return function(encoded,context){const operation=encoded[0];const argCount=encoded.length-1;if(minArgs===maxArgs){if(argCount!==minArgs){const plural=minArgs===1?"":"s";throw new Error(`Expected ${minArgs} argument${plural} for operation ${operation}, got ${argCount}`);}}else if(argCount<minArgs||argCount>maxArgs){throw new Error(`Expected ${minArgs} to ${maxArgs} arguments for operation ${operation}, got ${argCount}`);}const args=new Array(argCount);for(let i=0;i<argCount;++i){const expression=parse(encoded[i+1],context);if(!overlapsType(argType,
expression.type)){const gotType=typeName(argType);const expectedType=typeName(expression.type);throw new Error(`Unexpected type for argument ${i} of ${operation} operation : got ${gotType} but expected ${expectedType}`);}args[i]=expression;}return args;};}function createParser(argValidator,returnType){return function(encoded,context){const operator=encoded[0];const args=argValidator(encoded,context);return new CallExpression(returnType,operator,...args);};}function parseCallExpression(encoded,context){const operator=encoded[0];const parser=parsers[operator];if(!parser){throw new Error(`Unknown operator: ${operator}`);}return parser(encoded,context);}function newEvaluationContext(){return{variables:{},properties:{},resolution:NaN};}function buildExpression(encoded,type,context){const expression=parse(encoded,context);if(!overlapsType(type,expression.type)){const expected=typeName(type);const actual=typeName(expression.type);throw new Error(`Expected expression to be of type ${expected
{return compileMatchExpression(expression);}default:{throw new Error(`Unsupported operator ${operator}`);}}}function compileAssertionExpression(expression,context){const type=expression.operator;const length=expression.args.length;const args=new Array(length);for(let i=0;i<length;++i){args[i]=compileExpression(expression.args[i]);}switch(type){case Ops.Number:case Ops.String:{return(context2)=>{for(let i=0;i<length;++i){const value=args[i](context2);if(typeof value===type){return value;}}throw new Error(`Expected one of the values to be a ${type}`);};}default:{throw new Error(`Unsupported assertion operator ${type}`);}}}function compileAccessorExpression(expression,context){const nameExpression=expression.args[0];if(!(nameExpression instanceof LiteralExpression)){throw new Error("Expected literal name");}const name=nameExpression.value;if(typeof name!=="string"){throw new Error("Expected string name");}switch(expression.operator){case Ops.Get:{return(context2)=>context2.properties[name
"stroke-line-dash-offset",context);const evaluateMiterLimit=numberEvaluator(flatStyle,prefix+"stroke-miter-limit",context);const stroke=new OlStroke();return function(context2){if(evaluateColor){const color=evaluateColor(context2);if(color==="none"){return null;}stroke.setColor(color);}if(evaluateWidth){stroke.setWidth(evaluateWidth(context2));}if(evaluateLineCap){const lineCap=evaluateLineCap(context2);if(lineCap!=="butt"&&lineCap!=="round"&&lineCap!=="square"){throw new Error("Expected butt, round, or square line cap");}stroke.setLineCap(lineCap);}if(evaluateLineJoin){const lineJoin=evaluateLineJoin(context2);if(lineJoin!=="bevel"&&lineJoin!=="round"&&lineJoin!=="miter"){throw new Error("Expected bevel, round, or miter line join");}stroke.setLineJoin(lineJoin);}if(evaluateLineDash){stroke.setLineDash(evaluateLineDash(context2));}if(evaluateLineDashOffset){stroke.setLineDashOffset(evaluateLineDashOffset(context2));}if(evaluateMiterLimit){stroke.setMiterLimit(evaluateMiterLimit(
setMaxAngle(evaluateMaxAngle(context2));}if(evaluateOffsetX){text.setOffsetX(evaluateOffsetX(context2));}if(evaluateOffsetY){text.setOffsetY(evaluateOffsetY(context2));}if(evaluateOverflow){text.setOverflow(evaluateOverflow(context2));}if(evaluatePlacement){const placement=evaluatePlacement(context2);if(placement!=="point"&&placement!=="line"){throw new Error("Expected point or line for text-placement");}text.setPlacement(placement);}if(evaluateRepeat){text.setRepeat(evaluateRepeat(context2));}if(evaluateScale){text.setScale(evaluateScale(context2));}if(evaluateRotateWithView){text.setRotateWithView(evaluateRotateWithView(context2));}if(evaluateRotation){text.setRotation(evaluateRotation(context2));}if(evaluateAlign){const textAlign=evaluateAlign(context2);if(textAlign!=="left"&&textAlign!=="center"&&textAlign!=="right"&&textAlign!=="end"&&textAlign!=="start"){throw new Error("Expected left, right, center, start, or end for text-align");}text.setTextAlign(textAlign);}if(evaluateJustify
){const justify=evaluateJustify(context2);if(justify!=="left"&&justify!=="right"&&justify!=="center"){throw new Error("Expected left, right, or center for text-justify");}text.setJustify(justify);}if(evaluateBaseline){const textBaseline=evaluateBaseline(context2);if(textBaseline!=="bottom"&&textBaseline!=="top"&&textBaseline!=="middle"&&textBaseline!=="alphabetic"&&textBaseline!=="hanging"){throw new Error("Expected bottom, top, middle, alphabetic, or hanging for text-baseline");}text.setTextBaseline(textBaseline);}if(evaluatePadding){text.setPadding(evaluatePadding(context2));}return text;};}function buildImage(flatStyle,context){if("icon-src"in flatStyle){return buildIcon(flatStyle,context);}if("shape-points"in flatStyle){return buildShape(flatStyle,context);}if("circle-radius"in flatStyle){return buildCircle(flatStyle,context);}return null;}function buildIcon(flatStyle,context){const prefix="icon-";const srcName=prefix+"src";const src=requireString(flatStyle[srcName],srcName);const
evaluateRadius(context2));}if(evaluateFill){circle.setFill(evaluateFill(context2));}if(evaluateStroke){circle.setStroke(evaluateStroke(context2));}if(evaluateDisplacement){circle.setDisplacement(evaluateDisplacement(context2));}if(evaluateRotation){circle.setRotation(evaluateRotation(context2));}if(evaluateRotateWithView){circle.setRotateWithView(evaluateRotateWithView(context2));}if(evaluateScale){circle.setScale(evaluateScale(context2));}return circle;};}function numberEvaluator(flatStyle,name,context){if(!(name in flatStyle)){return void 0;}const evaluator=buildExpression(flatStyle[name],NumberType,context);return function(context2){return requireNumber(evaluator(context2),name);};}function stringEvaluator(flatStyle,name,context){if(!(name in flatStyle)){return null;}const evaluator=buildExpression(flatStyle[name],StringType,context);return function(context2){return requireString(evaluator(context2),name);};}function booleanEvaluator(flatStyle,name,context){if(!(name in flatStyle)){
return null;}const evaluator=buildExpression(flatStyle[name],BooleanType,context);return function(context2){const value=evaluator(context2);if(typeof value!=="boolean"){throw new Error(`Expected a boolean for ${name}`);}return value;};}function colorLikeEvaluator(flatStyle,name,context){if(!(name in flatStyle)){return null;}const evaluator=buildExpression(flatStyle[name],ColorType|StringType,context);return function(context2){return requireColorLike(evaluator(context2),name);};}function numberArrayEvaluator(flatStyle,name,context){if(!(name in flatStyle)){return null;}const evaluator=buildExpression(flatStyle[name],NumberArrayType,context);return function(context2){return requireNumberArray(evaluator(context2),name);};}function coordinateEvaluator(flatStyle,name,context){if(!(name in flatStyle)){return null;}const evaluator=buildExpression(flatStyle[name],NumberArrayType,context);return function(context2){const array=requireNumberArray(evaluator(context2),name);if(array.length!==2){
throw new Error(`Expected two numbers for ${name}`);}return array;};}function sizeLikeEvaluator(flatStyle,name,context){if(!(name in flatStyle)){return null;}const evaluator=buildExpression(flatStyle[name],NumberArrayType|NumberType,context);return function(context2){return requireSizeLike(evaluator(context2),name);};}function optionalNumber(flatStyle,property){const value=flatStyle[property];if(value===void 0){return void 0;}if(typeof value!=="number"){throw new Error(`Expected a number for ${property}`);}return value;}function optionalSize(flatStyle,property){const encoded=flatStyle[property];if(encoded===void 0){return void 0;}if(typeof encoded==="number"){return toSize(encoded);}if(!Array.isArray(encoded)){throw new Error(`Expected a number or size array for ${property}`);}if(encoded.length!==2||typeof encoded[0]!=="number"||typeof encoded[1]!=="number"){throw new Error(`Expected a number or size array for ${property}`);}return encoded;}function optionalString(flatStyle,property){
const encoded=flatStyle[property];if(encoded===void 0){return void 0;}if(typeof encoded!=="string"){throw new Error(`Expected a string for ${property}`);}return encoded;}function optionalIconOrigin(flatStyle,property){const encoded=flatStyle[property];if(encoded===void 0){return void 0;}if(encoded!=="bottom-left"&&encoded!=="bottom-right"&&encoded!=="top-left"&&encoded!=="top-right"){throw new Error(`Expected bottom-left, bottom-right, top-left, or top-right for ${property}`);}return encoded;}function optionalIconAnchorUnits(flatStyle,property){const encoded=flatStyle[property];if(encoded===void 0){return void 0;}if(encoded!=="pixels"&&encoded!=="fraction"){throw new Error(`Expected pixels or fraction for ${property}`);}return encoded;}function optionalNumberArray(flatStyle,property){const encoded=flatStyle[property];if(encoded===void 0){return void 0;}return requireNumberArray(encoded,property);}function optionalDeclutterMode(flatStyle,property){const encoded=flatStyle[property];if(
encoded===void 0){return void 0;}if(typeof encoded!=="string"){throw new Error(`Expected a string for ${property}`);}if(encoded!=="declutter"&&encoded!=="obstacle"&&encoded!=="none"){throw new Error(`Expected declutter, obstacle, or none for ${property}`);}return encoded;}function optionalColorLike(flatStyle,property){const encoded=flatStyle[property];if(encoded===void 0){return void 0;}return requireColorLike(encoded,property);}function requireNumberArray(value,property){if(!Array.isArray(value)){throw new Error(`Expected an array for ${property}`);}const length=value.length;for(let i=0;i<length;++i){if(typeof value[i]!=="number"){throw new Error(`Expected an array of numbers for ${property}`);}}return value;}function requireString(value,property){if(typeof value!=="string"){throw new Error(`Expected a string for ${property}`);}return value;}function requireNumber(value,property){if(typeof value!=="number"){throw new Error(`Expected a number for ${property}`);}return value;}function
requireColorLike(value,property){if(typeof value==="string"){return value;}const array=requireNumberArray(value,property);const length=array.length;if(length<3||length>4){throw new Error(`Expected a color with 3 or 4 values for ${property}`);}return array;}function requireSizeLike(value,property){if(typeof value==="number"){return value;}const size=requireNumberArray(value,property);if(size.length!==2){throw new Error(`Expected an array of two numbers for ${property}`);}return size;}const Property={RENDER_ORDER:"renderOrder"};class BaseVectorLayer extends Layer$1{constructor(options){options=options?options:{};const baseOptions=Object.assign({},options);delete baseOptions.style;delete baseOptions.renderBuffer;delete baseOptions.updateWhileAnimating;delete baseOptions.updateWhileInteracting;super(baseOptions);this.declutter_=options.declutter!==void 0?options.declutter:false;this.renderBuffer_=options.renderBuffer!==void 0?options.renderBuffer:100;this.style_=null;this.styleFunction_=
toStyleLike(style){if(style===void 0){return createDefaultStyle;}if(!style){return null;}if(typeof style==="function"){return style;}if(style instanceof Style){return style;}if(!Array.isArray(style)){return flatStylesToStyleFunction([style]);}if(style.length===0){return[];}const length=style.length;const first=style[0];if(first instanceof Style){const styles=new Array(length);for(let i=0;i<length;++i){const candidate=style[i];if(!(candidate instanceof Style)){throw new Error("Expected a list of style instances");}styles[i]=candidate;}return styles;}if("style"in first){const rules=new Array(length);for(let i=0;i<length;++i){const candidate=style[i];if(!("style"in candidate)){throw new Error("Expected a list of rules with a style property");}rules[i]=candidate;}return rulesToStyleFunction(rules);}const flatStyles=(style);return flatStylesToStyleFunction(flatStyles);}const BaseVectorLayer$1=BaseVectorLayer;const Instruction={BEGIN_GEOMETRY:0,BEGIN_PATH:1,CIRCLE:2,CLOSE_PATH:3,CUSTOM:4,
isTokenType(type){return this.token_.type==type;}match(type){const isMatch=this.isTokenType(type);if(isMatch){this.consume_();}return isMatch;}parse(){this.consume_();return this.parseGeometry_();}parseGeometryLayout_(){let layout="XY";const dimToken=this.token_;if(this.isTokenType(TokenType.TEXT)){const dimInfo=dimToken.value;if(dimInfo===Z){layout="XYZ";}else if(dimInfo===M){layout="XYM";}else if(dimInfo===ZM){layout="XYZM";}if(layout!=="XY"){this.consume_();}}return layout;}parseGeometryCollectionText_(){if(this.match(TokenType.LEFT_PAREN)){const geometries=[];do{geometries.push(this.parseGeometry_());}while(this.match(TokenType.COMMA));if(this.match(TokenType.RIGHT_PAREN)){return geometries;}}throw new Error(this.formatErrorMessage_());}parsePointText_(){if(this.match(TokenType.LEFT_PAREN)){const coordinates2=this.parsePoint_();if(this.match(TokenType.RIGHT_PAREN)){return coordinates2;}}throw new Error(this.formatErrorMessage_());}parseLineStringText_(){if(this.match(TokenType.
LEFT_PAREN)){const coordinates2=this.parsePointList_();if(this.match(TokenType.RIGHT_PAREN)){return coordinates2;}}throw new Error(this.formatErrorMessage_());}parsePolygonText_(){if(this.match(TokenType.LEFT_PAREN)){const coordinates2=this.parseLineStringTextList_();if(this.match(TokenType.RIGHT_PAREN)){return coordinates2;}}throw new Error(this.formatErrorMessage_());}parseMultiPointText_(){if(this.match(TokenType.LEFT_PAREN)){let coordinates2;if(this.token_.type==TokenType.LEFT_PAREN){coordinates2=this.parsePointTextList_();}else{coordinates2=this.parsePointList_();}if(this.match(TokenType.RIGHT_PAREN)){return coordinates2;}}throw new Error(this.formatErrorMessage_());}parseMultiLineStringText_(){if(this.match(TokenType.LEFT_PAREN)){const coordinates2=this.parseLineStringTextList_();if(this.match(TokenType.RIGHT_PAREN)){return coordinates2;}}throw new Error(this.formatErrorMessage_());}parseMultiPolygonText_(){if(this.match(TokenType.LEFT_PAREN)){const coordinates2=this.
parsePolygonTextList_();if(this.match(TokenType.RIGHT_PAREN)){return coordinates2;}}throw new Error(this.formatErrorMessage_());}parsePoint_(){const coordinates2=[];const dimensions=this.layout_.length;for(let i=0;i<dimensions;++i){const token=this.token_;if(this.match(TokenType.NUMBER)){coordinates2.push(token.value);}else{break;}}if(coordinates2.length==dimensions){return coordinates2;}throw new Error(this.formatErrorMessage_());}parsePointList_(){const coordinates2=[this.parsePoint_()];while(this.match(TokenType.COMMA)){coordinates2.push(this.parsePoint_());}return coordinates2;}parsePointTextList_(){const coordinates2=[this.parsePointText_()];while(this.match(TokenType.COMMA)){coordinates2.push(this.parsePointText_());}return coordinates2;}parseLineStringTextList_(){const coordinates2=[this.parseLineStringText_()];while(this.match(TokenType.COMMA)){coordinates2.push(this.parseLineStringText_());}return coordinates2;}parsePolygonTextList_(){const coordinates2=[this.parsePolygonText_
()];while(this.match(TokenType.COMMA)){coordinates2.push(this.parsePolygonText_());}return coordinates2;}isEmptyGeometry_(){const isEmpty2=this.isTokenType(TokenType.TEXT)&&this.token_.value==EMPTY;if(isEmpty2){this.consume_();}return isEmpty2;}formatErrorMessage_(){return"Unexpected `"+this.token_.value+"` at position "+this.token_.position+" in `"+this.lexer_.wkt+"`";}parseGeometry_(){const token=this.token_;if(this.match(TokenType.TEXT)){const geomType=(token.value);this.layout_=this.parseGeometryLayout_();const isEmpty2=this.isEmptyGeometry_();if(geomType=="GEOMETRYCOLLECTION"){if(isEmpty2){return new GeometryCollection$1([]);}const geometries=this.parseGeometryCollectionText_();return new GeometryCollection$1(geometries);}const ctor=GeometryConstructor[geomType];if(!ctor){throw new Error("Invalid geometry type: "+geomType);}let coordinates2;if(isEmpty2){if(geomType=="POINT"){coordinates2=[NaN,NaN];}else{coordinates2=[];}}else{switch(geomType){case"POINT":{coordinates2=this.
parsePointText_();break;}case"LINESTRING":{coordinates2=this.parseLineStringText_();break;}case"POLYGON":{coordinates2=this.parsePolygonText_();break;}case"MULTIPOINT":{coordinates2=this.parseMultiPointText_();break;}case"MULTILINESTRING":{coordinates2=this.parseMultiLineStringText_();break;}case"MULTIPOLYGON":{coordinates2=this.parseMultiPolygonText_();break;}}}return new ctor(coordinates2,this.layout_);}throw new Error(this.formatErrorMessage_());}}class WKT extends TextFeature$1{constructor(options){super();options=options?options:{};this.splitCollection_=options.splitCollection!==void 0?options.splitCollection:false;}parse_(wkt){const lexer=new Lexer(wkt);const parser=new Parser(lexer);return parser.parse();}readFeatureFromText(text,options){const geom=this.readGeometryFromText(text,options);const feature=new Feature$1();feature.setGeometry(geom);return feature;}readFeaturesFromText(text,options){let geometries=[];const geometry=this.readGeometryFromText(text,options);if(this.
mappedTypes){var j,origCount,tmp,events,t,handleObj,special,handlers,type,namespaces,origType,elemData=dataPriv.hasData(elem)&&dataPriv.get(elem);if(!elemData||!(events=elemData.events)){return;}types=(types||"").match(rnothtmlwhite)||[""];t=types.length;while(t--){tmp=rtypenamespace.exec(types[t])||[];type=origType=tmp[1];namespaces=(tmp[2]||"").split(".").sort();if(!type){for(type in events){jQuery.event.remove(elem,type+types[t],handler,selector,true);}continue;}special=jQuery.event.special[type]||{};type=(selector?special.delegateType:special.bindType)||type;handlers=events[type]||[];tmp=tmp[2]&&new RegExp("(^|\\.)"+namespaces.join("\\.(?:.*\\.|)")+"(\\.|$)");origCount=j=handlers.length;while(j--){handleObj=handlers[j];if((mappedTypes||origType===handleObj.origType)&&(!handler||handler.guid===handleObj.guid)&&(!tmp||tmp.test(handleObj.namespace))&&(!selector||selector===handleObj.selector||selector==="**"&&handleObj.selector)){handlers.splice(j,1);if(handleObj.selector){handlers.
isAttached(elem);if(!support.noCloneChecked&&(elem.nodeType===1||elem.nodeType===11)&&!jQuery.isXMLDoc(elem)){destElements=getAll(clone);srcElements=getAll(elem);for(i=0,l=srcElements.length;i<l;i++){fixInput(srcElements[i],destElements[i]);}}if(dataAndEvents){if(deepDataAndEvents){srcElements=srcElements||getAll(elem);destElements=destElements||getAll(clone);for(i=0,l=srcElements.length;i<l;i++){cloneCopyEvent(srcElements[i],destElements[i]);}}else{cloneCopyEvent(elem,clone);}}destElements=getAll(clone,"script");if(destElements.length>0){setGlobalEval(destElements,!inPage&&getAll(elem,"script"));}return clone;},cleanData:function(elems){var data,elem,type,special=jQuery.event.special,i=0;for(;(elem=elems[i])!==undefined;i++){if(acceptData(elem)){if((data=elem[dataPriv.expando])){if(data.events){for(type in data.events){if(special[type]){jQuery.event.remove(elem,type);}else{jQuery.removeEvent(elem,type,data.handle);}}}elem[dataPriv.expando]=undefined;}if(elem[dataUser.expando]){elem[
prop,value,toggle,hooks,oldfire,propTween,restoreDisplay,display,isBox="width"in props||"height"in props,anim=this,orig={},style=elem.style,hidden=elem.nodeType&&isHiddenWithinTree(elem),dataShow=dataPriv.get(elem,"fxshow");if(!opts.queue){hooks=jQuery._queueHooks(elem,"fx");if(hooks.unqueued==null){hooks.unqueued=0;oldfire=hooks.empty.fire;hooks.empty.fire=function(){if(!hooks.unqueued){oldfire();}};}hooks.unqueued++;anim.always(function(){anim.always(function(){hooks.unqueued--;if(!jQuery.queue(elem,"fx").length){hooks.empty.fire();}});});}for(prop in props){value=props[prop];if(rfxtypes.test(value)){delete props[prop];toggle=toggle||value==="toggle";if(value===(hidden?"hide":"show")){if(value==="show"&&dataShow&&dataShow[prop]!==undefined){hidden=true;}else{continue;}}orig[prop]=dataShow&&dataShow[prop]||jQuery.style(elem,prop);}}propTween=!jQuery.isEmptyObject(props);if(!propTween&&jQuery.isEmptyObject(orig)){return;}if(isBox&&elem.nodeType===1){opts.overflow=[style.overflow,style.
overflowX,style.overflowY];restoreDisplay=dataShow&&dataShow.display;if(restoreDisplay==null){restoreDisplay=dataPriv.get(elem,"display");}display=jQuery.css(elem,"display");if(display==="none"){if(restoreDisplay){display=restoreDisplay;}else{showHide([elem],true);restoreDisplay=elem.style.display||restoreDisplay;display=jQuery.css(elem,"display");showHide([elem]);}}if(display==="inline"||display==="inline-block"&&restoreDisplay!=null){if(jQuery.css(elem,"float")==="none"){if(!propTween){anim.done(function(){style.display=restoreDisplay;});if(restoreDisplay==null){display=style.display;restoreDisplay=display==="none"?"":display;}}style.display="inline-block";}}}if(opts.overflow){style.overflow="hidden";anim.always(function(){style.overflow=opts.overflow[0];style.overflowX=opts.overflow[1];style.overflowY=opts.overflow[2];});}propTween=false;for(prop in orig){if(!propTween){if(dataShow){if("hidden"in dataShow){hidden=dataShow.hidden;}}else{dataShow=dataPriv.access(elem,"fxshow",{display
:restoreDisplay});}if(toggle){dataShow.hidden=!hidden;}if(hidden){showHide([elem],true);}anim.done(function(){if(!hidden){showHide([elem]);}dataPriv.remove(elem,"fxshow");for(prop in orig){jQuery.style(elem,prop,orig[prop]);}});}propTween=createTween(hidden?dataShow[prop]:0,prop,anim);if(!(prop in dataShow)){dataShow[prop]=propTween.start;if(hidden){propTween.end=propTween.start;propTween.start=0;}}}}function propFilter(props,specialEasing){var index,name,easing,value,hooks;for(index in props){name=camelCase(index);easing=specialEasing[name];value=props[index];if(Array.isArray(value)){easing=value[1];value=props[index]=value[0];}if(index!==name){props[name]=value;delete props[index];}hooks=jQuery.cssHooks[name];if(hooks&&"expand"in hooks){value=hooks.expand(value);delete props[name];for(index in value){if(!(index in props)){props[index]=value[index];specialEasing[index]=easing;}}}else{specialEasing[name]=easing;}}}function Animation(elem,properties,options){var result,stopped,index=0,
type in contents){if(contents[type]&&contents[type].test(ct)){dataTypes.unshift(type);break;}}}if(dataTypes[0]in responses){finalDataType=dataTypes[0];}else{for(type in responses){if(!dataTypes[0]||s.converters[type+" "+dataTypes[0]]){finalDataType=type;break;}if(!firstDataType){firstDataType=type;}}finalDataType=finalDataType||firstDataType;}if(finalDataType){if(finalDataType!==dataTypes[0]){dataTypes.unshift(finalDataType);}return responses[finalDataType];}}function ajaxConvert(s,response,jqXHR,isSuccess){var conv2,current,conv,tmp,prev,converters={},dataTypes=s.dataTypes.slice();if(dataTypes[1]){for(conv in s.converters){converters[conv.toLowerCase()]=s.converters[conv];}}current=dataTypes.shift();while(current){if(s.responseFields[current]){jqXHR[s.responseFields[current]]=response;}if(!prev&&isSuccess&&s.dataFilter){response=s.dataFilter(response,s.dataType);}prev=current;current=dataTypes.shift();if(current){if(current==="*"){current=prev;}else if(prev!=="*"&&prev!==current){conv
=converters[prev+" "+current]||converters["* "+current];if(!conv){for(conv2 in converters){tmp=conv2.split(" ");if(tmp[1]===current){conv=converters[prev+" "+tmp[0]]||converters["* "+tmp[0]];if(conv){if(conv===true){conv=converters[conv2];}else if(converters[conv2]!==true){current=tmp[0];dataTypes.unshift(tmp[1]);}break;}}}}if(conv!==true){if(conv&&s.throws){response=conv(response);}else{try{response=conv(response);}catch(e){return{state:"parsererror",error:conv?e:"No conversion from "+prev+" to "+current};}}}}}}return{state:"success",data:response};}jQuery.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:location.href,type:"GET",isLocal:rlocalProtocol.test(location.protocol),global:true,processData:true,async:true,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":allTypes,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:{
function(){jQuery(this).replaceWith(this.childNodes);});return this;}});jQuery.expr.pseudos.hidden=function(elem){return!jQuery.expr.pseudos.visible(elem);};jQuery.expr.pseudos.visible=function(elem){return!!(elem.offsetWidth||elem.offsetHeight||elem.getClientRects().length);};jQuery.ajaxSettings.xhr=function(){try{return new window.XMLHttpRequest();}catch(e){}};var xhrSuccessStatus={0:200,1223:204},xhrSupported=jQuery.ajaxSettings.xhr();support.cors=!!xhrSupported&&("withCredentials"in xhrSupported);support.ajax=xhrSupported=!!xhrSupported;jQuery.ajaxTransport(function(options){var callback,errorCallback;if(support.cors||xhrSupported&&!options.crossDomain){return{send:function(headers,complete){var i,xhr=options.xhr();xhr.open(options.type,options.url,options.async,options.username,options.password);if(options.xhrFields){for(i in options.xhrFields){xhr[i]=options.xhrFields[i];}}if(options.mimeType&&xhr.overrideMimeType){xhr.overrideMimeType(options.mimeType);}if(!options.crossDomain&&
!headers["X-Requested-With"]){headers["X-Requested-With"]="XMLHttpRequest";}for(i in headers){xhr.setRequestHeader(i,headers[i]);}callback=function(type){return function(){if(callback){callback=errorCallback=xhr.onload=xhr.onerror=xhr.onabort=xhr.ontimeout=xhr.onreadystatechange=null;if(type==="abort"){xhr.abort();}else if(type==="error"){if(typeof xhr.status!=="number"){complete(0,"error");}else{complete(xhr.status,xhr.statusText);}}else{complete(xhrSuccessStatus[xhr.status]||xhr.status,xhr.statusText,(xhr.responseType||"text")!=="text"||typeof xhr.responseText!=="string"?{binary:xhr.response}:{text:xhr.responseText},xhr.getAllResponseHeaders());}}};};xhr.onload=callback();errorCallback=xhr.onerror=xhr.ontimeout=callback("error");if(xhr.onabort!==undefined){xhr.onabort=errorCallback;}else{xhr.onreadystatechange=function(){if(xhr.readyState===4){window.setTimeout(function(){if(callback){errorCallback();}});}};}callback=callback("abort");try{xhr.send(options.hasContent&&options.data||
])||$.contains(containers[i],contained)){return true;}}return false;};OO.ui.debounce=function(func,wait,immediate){var timeout;return function(){var context=this,args=arguments,later=function(){timeout=null;if(!immediate){func.apply(context,args);}};if(immediate&&!timeout){func.apply(context,args);}if(!timeout||wait){clearTimeout(timeout);timeout=setTimeout(later,wait);}};};OO.ui.warnDeprecation=function(message){if(OO.getProp(window,'console','warn')!==undefined){console.warn(message);}};OO.ui.throttle=function(func,wait){var context,args,timeout,previous=Date.now()-wait,run=function(){timeout=null;previous=Date.now();func.apply(context,args);};return function(){var remaining=Math.max(wait-(Date.now()-previous),0);context=this;args=arguments;if(!timeout){timeout=setTimeout(run,remaining);}};};OO.ui.infuse=function(node,config){if(typeof node==='string'){OO.ui.warnDeprecation('Passing a selector to infuse is deprecated. Use an HTMLElement or jQuery collection instead.');}return OO.ui.
"Try again","ooui-dialog-process-continue":"Continue","ooui-combobox-button-label":"Toggle options","ooui-selectfile-button-select":"Select a file","ooui-selectfile-button-select-multiple":"Select files","ooui-selectfile-not-supported":"File selection is not supported","ooui-selectfile-placeholder":"No file is selected","ooui-selectfile-dragdrop-placeholder":"Drop file here","ooui-selectfile-dragdrop-placeholder-multiple":"Drop files here","ooui-popup-widget-close-button-aria-label":"Close","ooui-field-help":"Help"};OO.ui.mixin={};OO.ui.Element=function OoUiElement(config){if(OO.ui.isDemo){this.initialConfig=config;}config=config||{};this.elementId=null;this.visible=true;this.data=config.data;this.$element=config.$element||$(window.document.createElement(this.getTagName()));this.elementGroup=null;var doc=OO.ui.Element.static.getDocument(this.$element);if(Array.isArray(config.classes)){this.$element.addClass(config.classes.filter(function(val){return val;}));}if(config.id){this.
setElementId(config.id);}if(config.text){this.$element.text(config.text);}if(config.content){this.$element.append(config.content.map(function(v){if(typeof v==='string'){return v?doc.createTextNode(v):undefined;}else if(v instanceof OO.ui.HtmlSnippet){return v.toString();}else if(v instanceof OO.ui.Element){return v.$element;}return v;}));}if(config.$content){this.$element.append(config.$content);}};OO.initClass(OO.ui.Element);OO.ui.Element.static.tagName='div';OO.ui.Element.static.infuse=function(node,config){var obj=OO.ui.Element.static.unsafeInfuse(node,config,false);return obj;};OO.ui.Element.static.unsafeInfuse=function(elem,config,domPromise){var $elem=$(elem);if($elem.length>1){throw new Error('Collection contains more than one element');}if(!$elem.length){throw new Error('Widget not found');}if($elem[0].$oouiInfused){$elem=$elem[0].$oouiInfused;}var id=$elem.attr('id');var doc=this.getDocument($elem);var data=$elem.data('ooui-infused');if(data){if(data===true){throw new Error(
'Circular dependency! '+id);}if(domPromise){var stateCache=data.constructor.static.gatherPreInfuseState($elem,data);domPromise.done(data.restorePreInfuseState.bind(data,stateCache));var infusedChildrenCache=$elem.data('ooui-infused-children');if(infusedChildrenCache&&infusedChildrenCache.length){infusedChildrenCache.forEach(function(childData){var childState=childData.constructor.static.gatherPreInfuseState($elem,childData);domPromise.done(childData.restorePreInfuseState.bind(childData,childState));});}}return data;}data=$elem.attr('data-ooui');if(!data){throw new Error('No infusion data found: '+id);}try{data=JSON.parse(data);}catch(_){data=null;}if(!(data&&data._)){throw new Error('No valid infusion data found: '+id);}if(data._==='Tag'){return new OO.ui.Element($.extend({},config,{$element:$elem}));}var parts=data._.split('.');var cls=OO.getProp.apply(OO,[window].concat(parts));if(!(cls&&(cls===OO.ui.Element||cls.prototype instanceof OO.ui.Element))){throw new Error(
getElementsByTagName('iframe');for(var i=0,len=frames.length;i<len;i++){if(frames[i].contentWindow===from){frame=frames[i];break;}}if(frame){var rect=frame.getBoundingClientRect();offset.left+=rect.left;offset.top+=rect.top;if(from!==to){this.getFrameOffset(from.parent,offset);}}return offset;};OO.ui.Element.static.getRelativePosition=function($element,$anchor){var pos=$element.offset(),anchorPos=$anchor.offset(),elementDocument=this.getDocument($element),anchorDocument=this.getDocument($anchor);while(elementDocument!==anchorDocument){var iframe=elementDocument.defaultView.frameElement;if(!iframe){throw new Error('$element frame is not contained in $anchor frame');}var iframePos=$(iframe).offset();pos.left+=iframePos.left;pos.top+=iframePos.top;elementDocument=this.getDocument(iframe);}pos.left-=anchorPos.left;pos.top-=anchorPos.top;return pos;};OO.ui.Element.static.getBorders=function(el){var doc=this.getDocument(el),win=doc.defaultView,style=win.getComputedStyle(el,null),$el=$(el),
OoUiMixinRequiredElement(config){config=config||{};this.$required=config.$required||this.$input||this.$element;this.required=false;this.indicatorElement=config.indicatorElement!==undefined?config.indicatorElement:this;if(this.indicatorElement&&!this.indicatorElement.getIndicator){throw new Error('config.indicatorElement must mixin OO.ui.mixin.IndicatorElement.');}this.setRequired(!!config.required);};OO.initClass(OO.ui.mixin.RequiredElement);OO.ui.mixin.RequiredElement.prototype.setRequiredElement=function($required){if(this.$required===$required){return;}if(this.$required&&this.required){this.updateRequiredElement(false);}this.$required=$required;this.updateRequiredElement();};OO.ui.mixin.RequiredElement.prototype.updateRequiredElement=function(state){if(state===undefined){state=this.required;}this.$required.prop('required',state);};OO.ui.mixin.RequiredElement.prototype.isRequired=function(){return this.required;};OO.ui.mixin.RequiredElement.prototype.setRequired=function(state){if(
setVerticalPosition(config.verticalPosition||'below');this.setHorizontalPosition(config.horizontalPosition||'start');this.hideWhenOutOfView=config.hideWhenOutOfView===undefined?true:!!config.hideWhenOutOfView;};OO.ui.mixin.FloatableElement.prototype.setFloatableElement=function($floatable){if(this.$floatable){this.$floatable.removeClass('oo-ui-floatableElement-floatable');this.$floatable.css({left:'',top:''});}this.$floatable=$floatable.addClass('oo-ui-floatableElement-floatable');this.position();};OO.ui.mixin.FloatableElement.prototype.setFloatableContainer=function($floatableContainer){this.$floatableContainer=$floatableContainer;if(this.$floatable){this.position();}};OO.ui.mixin.FloatableElement.prototype.setVerticalPosition=function(position){if(['below','above','top','bottom','center'].indexOf(position)===-1){throw new Error('Invalid value for vertical position: '+position);}if(this.verticalPosition!==position){this.verticalPosition=position;if(this.$floatable){this.position();}}}
;OO.ui.mixin.FloatableElement.prototype.setHorizontalPosition=function(position){if(['before','after','start','end','center'].indexOf(position)===-1){throw new Error('Invalid value for horizontal position: '+position);}if(this.horizontalPosition!==position){this.horizontalPosition=position;if(this.$floatable){this.position();}}};OO.ui.mixin.FloatableElement.prototype.togglePositioning=function(positioning){if(!this.$floatable||!this.$floatableContainer){return this;}positioning=positioning===undefined?!this.positioning:!!positioning;if(positioning&&!this.warnedUnattached&&!this.isElementAttached()){OO.ui.warnDeprecation('FloatableElement#togglePositioning: Before calling this method, the element must be attached to the DOM.');this.warnedUnattached=true;}if(this.positioning!==positioning){this.positioning=positioning;var closestScrollableOfContainer=OO.ui.Element.static.getClosestScrollableContainer(this.$floatableContainer[0]);if($(closestScrollableOfContainer).is('html, body')){
'oo-ui-clippableElement-clippable');this.clip();};OO.ui.mixin.ClippableElement.prototype.setClippableContainer=function($clippableContainer){this.$clippableContainer=$clippableContainer;if(this.$clippable){this.clip();}};OO.ui.mixin.ClippableElement.prototype.toggleClipping=function(clipping){clipping=clipping===undefined?!this.clipping:!!clipping;if(clipping&&!this.warnedUnattached&&!this.isElementAttached()){OO.ui.warnDeprecation('ClippableElement#toggleClipping: Before calling this method, the element must be attached to the DOM.');this.warnedUnattached=true;}if(this.clipping!==clipping){this.clipping=clipping;if(clipping){this.$clippableScrollableContainer=$(this.getClosestScrollableElementContainer());this.$clippableScroller=this.$clippableScrollableContainer.is('html, body')?$(OO.ui.Element.static.getWindow(this.$clippableScrollableContainer)):this.$clippableScrollableContainer;this.$clippableScroller.on('scroll',this.onClippableScrollHandler);this.$clippableWindow=$(this.
preventDefault();this.toggle(false);}};OO.ui.PopupWidget.prototype.toggleAnchor=function(show){show=show===undefined?!this.anchored:!!show;if(this.anchored!==show){if(show){this.$element.addClass('oo-ui-popupWidget-anchored');this.$element.addClass('oo-ui-popupWidget-anchored-'+this.anchorEdge);}else{this.$element.removeClass('oo-ui-popupWidget-anchored');this.$element.removeClass('oo-ui-popupWidget-anchored-'+this.anchorEdge);}this.anchored=show;}};OO.ui.PopupWidget.prototype.setAnchorEdge=function(edge){if(['top','bottom','start','end'].indexOf(edge)===-1){throw new Error('Invalid value for edge: '+edge);}if(this.anchorEdge!==null){this.$element.removeClass('oo-ui-popupWidget-anchored-'+this.anchorEdge);}this.anchorEdge=edge;if(this.anchored){this.$element.addClass('oo-ui-popupWidget-anchored-'+edge);}};OO.ui.PopupWidget.prototype.hasAnchor=function(){return this.anchored;};OO.ui.PopupWidget.prototype.toggle=function(show){show=show===undefined?!this.isVisible():!!show;var change=
show!==this.isVisible();if(show&&!this.warnedUnattached&&!this.isElementAttached()){OO.ui.warnDeprecation('PopupWidget#toggle: Before calling this method, the popup must be attached to the DOM.');this.warnedUnattached=true;}if(show&&!this.$floatableContainer&&this.isElementAttached()){this.setFloatableContainer(this.$element.parent());}if(change&&show&&this.autoFlip){this.isAutoFlipped=false;}OO.ui.PopupWidget.super.prototype.toggle.call(this,show);if(change){this.togglePositioning(show&&!!this.$floatableContainer);var $lastFocusableElement=OO.ui.findFocusable(this.$element,true);var $firstFocusableElement=OO.ui.findFocusable(this.$element,false);if(show){if(this.autoClose){this.bindDocumentMouseDownListener();this.bindDocumentKeyDownListener();$lastFocusableElement.on('keydown',this.onTabKeyDownHandler);$firstFocusableElement.on('keydown',this.onShiftTabKeyDownHandler);}this.updateDimensions();this.toggleClipping(true);if(this.autoFlip){if(this.popupPosition==='above'||this.
case OO.ui.Keys.PAGEDOWN:if(this.constructor.static.handleNavigationKeys){this.clearKeyPressBuffer();nextItem=this.findRelativeSelectableItem(currentItem,e.keyCode===OO.ui.Keys.PAGEUP?-10:10,null,this.constructor.static.listWrapsAround);handled=true;}break;case OO.ui.Keys.ESCAPE:case OO.ui.Keys.TAB:if(currentItem){currentItem.setHighlighted(false);}this.unbindDocumentKeyDownListener();this.unbindDocumentKeyPressListener();handled=false;break;}if(nextItem){if(this.isVisible()&&nextItem.constructor.static.highlightable){this.highlightItem(nextItem);}else{if(this.screenReaderMode){this.highlightItem(nextItem);}this.chooseItem(nextItem);}this.scrollItemIntoView(nextItem);}if(handled){e.preventDefault();e.stopPropagation();}}};OO.ui.SelectWidget.prototype.bindDocumentKeyDownListener=function(){this.getElementDocument().addEventListener('keydown',this.onDocumentKeyDownHandler,true);};OO.ui.SelectWidget.prototype.unbindDocumentKeyDownListener=function(){this.getElementDocument().
bindDocumentKeyPressListener();}else{this.$focusOwner.removeAttr('aria-activedescendant');this.unbindDocumentKeyDownListener();this.unbindDocumentKeyPressListener();}};OO.ui.MenuSelectWidget.prototype.toggle=function(visible){visible=(visible===undefined?!this.visible:!!visible)&&!!this.items.length;var change=visible!==this.isVisible();if(visible&&!this.warnedUnattached&&!this.isElementAttached()){OO.ui.warnDeprecation('MenuSelectWidget#toggle: Before calling this method, the menu must be attached to the DOM.');this.warnedUnattached=true;}if(change&&visible){this.setVerticalPosition(this.originalVerticalPosition);}OO.ui.MenuSelectWidget.super.prototype.toggle.call(this,visible);if(change){if(visible){if(this.width){this.setIdealSize(this.width);}else if(this.$floatableContainer){this.$clippable.css('width','auto');this.setIdealSize(this.$floatableContainer[0].offsetWidth>this.$clippable[0].offsetWidth?this.$floatableContainer[0].offsetWidth:'auto');this.$clippable.css('width','');}
setReadOnly.apply(this,arguments);this.updateControlsDisabled();return this;};OO.ui.ComboBoxInputWidget.prototype.setOptions=function(options){this.getMenu().clearItems().addItems(options.map(function(opt){return new OO.ui.MenuOptionWidget({data:opt.data,label:opt.label!==undefined?opt.label:opt.data});}));return this;};OO.ui.FieldLayout=function OoUiFieldLayout(fieldWidget,config){if(OO.isPlainObject(fieldWidget)&&config===undefined){config=fieldWidget;fieldWidget=config.fieldWidget;}if(fieldWidget===undefined){throw new Error('Widget not found');}config=$.extend({align:'left',helpInline:false},config);if(config.help&&!config.label){config.label=' ';}OO.ui.FieldLayout.super.call(this,config);OO.ui.mixin.LabelElement.call(this,$.extend({$label:$('<label>')},config));OO.ui.mixin.TitledElement.call(this,$.extend({$titled:this.$label},config));this.fieldWidget=fieldWidget;this.errors=[];this.warnings=[];this.successMessages=[];this.notices=[];this.$field=this.isFieldInline()?$('<span>'):$
(this.fieldWidget.$element);this.setErrors(config.errors||[]);this.setWarnings(config.warnings||[]);this.setSuccess(config.successMessages||[]);this.setNotices(config.notices||[]);this.setAlignment(config.align);this.updateTitle();};OO.inheritClass(OO.ui.FieldLayout,OO.ui.Layout);OO.mixinClass(OO.ui.FieldLayout,OO.ui.mixin.LabelElement);OO.mixinClass(OO.ui.FieldLayout,OO.ui.mixin.TitledElement);OO.ui.FieldLayout.prototype.onFieldDisable=function(value){this.$element.toggleClass('oo-ui-fieldLayout-disabled',value);};OO.ui.FieldLayout.prototype.onLabelClick=function(){this.fieldWidget.simulateLabelClick();};OO.ui.FieldLayout.prototype.getField=function(){return this.fieldWidget;};OO.ui.FieldLayout.prototype.isFieldInline=function(){return this.getField().$element.prop('tagName').toLowerCase()==='span';};OO.ui.FieldLayout.prototype.makeMessage=function(kind,text){return new OO.ui.MessageWidget({type:kind,inline:true,label:text}).$element;};OO.ui.FieldLayout.prototype.setAlignment=function
append($field);};OO.inheritClass(OO.ui.NumberInputWidget,OO.ui.TextInputWidget);OO.ui.NumberInputWidget.prototype.setAllowInteger=function(flag){this.setStep(flag?1:null);};OO.ui.NumberInputWidget.prototype.setIsInteger=OO.ui.NumberInputWidget.prototype.setAllowInteger;OO.ui.NumberInputWidget.prototype.getAllowInteger=function(){return this.step===1;};OO.ui.NumberInputWidget.prototype.getIsInteger=OO.ui.NumberInputWidget.prototype.getAllowInteger;OO.ui.NumberInputWidget.prototype.setRange=function(min,max){if(min>max){throw new Error('Minimum ('+min+') must not be greater than maximum ('+max+')');}this.min=min;this.max=max;this.$input.attr({min:this.min,max:this.max});this.setValidityFlag();};OO.ui.NumberInputWidget.prototype.getRange=function(){return[this.min,this.max];};OO.ui.NumberInputWidget.prototype.setStep=function(buttonStep,pageStep,step){if(buttonStep===undefined){buttonStep=step||1;}if(pageStep===undefined){pageStep=10*buttonStep;}if(step!==null&&step<=0){throw new Error(
'Step value, if given, must be positive');}if(buttonStep<=0){throw new Error('Button step value must be positive');}if(pageStep<=0){throw new Error('Page step value must be positive');}this.step=step;this.buttonStep=buttonStep;this.pageStep=pageStep;this.$input.attr('step',this.step||'any');this.setValidityFlag();};OO.ui.NumberInputWidget.prototype.setValue=function(value){if(value===''){this.$input.val('');}return OO.ui.NumberInputWidget.super.prototype.setValue.call(this,value);};OO.ui.NumberInputWidget.prototype.getStep=function(){return[this.buttonStep,this.pageStep,this.step];};OO.ui.NumberInputWidget.prototype.getNumericValue=function(){return+this.getValue();};OO.ui.NumberInputWidget.prototype.adjustValue=function(delta){var v=this.getNumericValue();delta=+delta;if(isNaN(delta)||!isFinite(delta)){throw new Error('Delta must be a finite number');}var n;if(isNaN(v)){n=0;}else{n=v+delta;n=Math.max(Math.min(n,this.max),this.min);if(this.step){n=Math.round(n/this.step)*this.step;}}if
.WikimediaUITheme();}(OO));},{},{"ooui-combobox-button-label":"Optionen umschalten","ooui-field-help":"Hilfe","ooui-popup-widget-close-button-aria-label":"Schließen","ooui-selectfile-button-select":"Eine Datei auswählen","ooui-selectfile-button-select-multiple":"Datei(en) auswählen","ooui-selectfile-dragdrop-placeholder":"Dateien hier ablegen","ooui-selectfile-dragdrop-placeholder-multiple":"Datei(en) hier ablegen","ooui-selectfile-not-supported":"Die Dateiauswahl wird nicht unterstützt","ooui-selectfile-placeholder":"Keine Datei ausgewählt"});