//query ½Úµã²éÑ¯
assert( web[["form"]] )  
namespace web.form 

class query{
	ctor( eles,wb ){
		this.webForm = wb; 
		if( eles[["length"]] ){ 
			for(i=0;eles.length;1){ 
				..table.push( this ,eles(i) );
			} 
		}
		else {
			this = eles
		}
	}; 
	@meta 
}

namespace query{

	meta = {
		_call = function(i){
			return owner[[i+1]];
		}
		_set = function(k,v){ 
			for(i=1;#owner;1){ 
				owner[i][k] = v;
			} 
		} 
		_get = function(k){
			var this = owner;
			if( ..string.cmp(k,"length")==0) 
				return #owner;
				
			if( ! #this )
				return;
			
			var v = this[1][k];
			if(!v)return;
			
			var t = type(v); 
			if( ( ! ( t == type.function ) || ( t == type.table ) ) ){  
				return this[1][k];
			}
			else{
				return {
					@{
						_call = function(...){
							var tab = {}
							for(i=1;#this;1){ 
								tab[i] = this[i][k](...);
							} 
							return ..table.unpack(tab);
						}
						_set = function( subk,...){
							for(i=1;#this;1){ 
								this[i][k][subk] = ...;
							} 
						}
						_get = function( subk ){ 
							return this[1][k][subk]
						} 
					} 
				}; 
			}  
		} 
		click = function(min=1,max=500 ){
			if(#owner){ 
				return owner.webForm.click(owner[1],min,max);;
			}
		}
		
	} 
}