胆的作用及功能是什么| 吃猪肝有什么好处| 7.31什么星座| 嗓子有粘痰什么原因| 低血压吃什么好| 化骨龙是什么意思| 奇花初胎矞矞皇皇是什么意思| 独立户口需要什么条件办理| 银杏叶提取物治什么病| 脑膜炎是什么病严重吗| 病毒性感冒什么症状| 什么是总胆固醇| 胃酸的主要成分是什么| 胃病吃什么食物养胃| 什么什么望外| 看食道挂什么科室| 溜达鸡是什么意思| 巧克力是什么做的| 眼镜片什么材质的好| dm医学上是什么意思| nsaid是什么药| 什么叫钝痛| 持续低烧不退是什么原因| chuck是什么意思| 浪琴名匠系列什么档次| 全自动洗衣机不脱水是什么原因| 女人细菌感染什么原因引起的| 不割包皮有什么影响吗| 自然是什么意思| 梦见恐龙是什么意思| 入港是什么意思| 8月29日是什么星座| 男人肾虚吃什么补得快| 做梦梦见鬼是什么预兆| 什么是bp| 检查尿液能查出什么病| 白泽是什么| 灵芝有什么作用与功效| 前列腺按摩什么感觉| 螺旋藻是什么东西| 农历十月初五是什么星座| 梅雨季节是什么时候| 二氧化碳是什么气体| 肩膀上有痣代表什么| 浪荡闲游是什么生肖| 火象是什么星座| 嗜睡是什么病的前兆| 心绞痛有什么症状| 女人喝蛇汤有什么好处| 什么是酵素| 什么的天| 精神寄托是什么意思| 胃寒胃凉吃什么药| 海蜇是什么| 肾阴虚什么症状| 什么的植物| 娃娃鱼属于什么类动物| 什么牌子的洗衣机最好| 摄入是什么意思| 03年是什么命| 恐龙为什么叫恐龙| 大学生村官是什么编制| 光是什么结构| 班门弄斧什么意思| 偷窥什么意思| 蹒跚什么意思| 感冒去医院挂什么科| 三个又读什么| 酿酒用什么菌| 孝服是什么意思| 框框是什么意思| beko是什么牌子| 排卵期身体有什么症状表现吗| 后背发痒是什么原因| 泡茶用什么水好| 枫叶是什么树| 嘴麻是什么原因引起的| 孕妇手麻是什么原因引起的| 手术拆线挂什么科| 陈年是什么意思| 姨妈痛吃什么药| 是谁送你来到我身边是什么歌| 指南针什么时候发明的| 血燥吃什么药| 小腿为什么会抽筋| 结合是什么意思| 低密度脂蛋白胆固醇高是什么意思| cph是什么意思| 沼泽地是什么意思| 夏天穿什么鞋子| 淋巴结什么原因引起的| marlboro是什么烟| 舌头有裂纹什么原因| 脑白质变性是什么意思| 青蟹什么季节吃最好| 左下腹痛挂什么科| http是什么| 十二指肠球部溃疡a1期是什么意思| 地铁不能带什么东西| 高血糖适合吃什么水果| 葡萄球菌感染是什么原因引起的| 尿酸高是什么原因引起的| 阿莫西林治什么| 导诊是干什么的| 腰肌劳损有什么症状| 什么品牌的书包质量好| 集体户口是什么意思| 高压高是什么原因引起的| 涤是什么面料| 西安有什么| 放飞自我是什么意思| 腈纶是什么面料| 脚底板疼痛是什么原因| 吃金蝉有什么好处| 乳腺结节有什么症状| 芦荟胶有什么用| 圣经是什么意思| 荨麻疹去药店买什么药| 绿色代表什么| ca登录是什么意思| 嫦娥住的宫殿叫什么| 什么是苔藓皮肤病| 蛋疼是什么原因引起的| 残疾证有什么补贴| 做血常规检查挂什么科| 健康证需要检查什么项目| 多动症是什么引起的| 契机是什么意思| 燕京大学现在叫什么| 梦到装修房子是什么征兆| gmp什么意思| 病例是什么| 桃子可以做什么美食| 闰六月要给父母买什么| 一线炎是什么病严重吗| 高晓松为什么进监狱| 莲雾是什么水果| 喜欢咬指甲是什么原因| 什么的梅花| 凌晨4点是什么时辰| 脑鸣去医院挂什么科| 小孩出汗多是什么原因| 解约是什么意思| 什么动物最厉害| 7月4号是什么星座| 低头什么节| 左手小手指麻木是什么原因引起的| 喉结肿大是什么原因| 发财树用什么肥料最好| 牙神经疼吃什么药| 体癣用什么药膏好得快| 移植后需要注意什么| 无用功是什么意思| 雄鹰是什么意思| 牛后腿肉适合做什么| 快递什么时候停运| 反流性食管炎是什么病| 股癣是什么原因引起的| 来例假吃什么食物好| baron是什么意思| cpa是什么| 怀孕初期需要注意些什么| 嘛是什么意思| 子不孝父之过下一句是什么| 为什么土豆不能炒鸡蛋| 膝关节置换后最怕什么| 六六大顺是什么生肖| 12月26日什么星座| 突然发胖要警惕什么病| 牙龈爱出血是什么原因| 狗狗什么时候打疫苗| 0代表什么意思| 缺钾吃什么药| 色彩斑斓是什么意思| 金针菇为什么叫明天见| 什么叫做质量| 风致是什么意思| 血小板低是什么原因引起的| 脚趾抽筋是什么原因引起的| 夏枯草有什么功效| oof是什么意思| 猴子偷桃是什么意思| 过敏性紫癜是什么症状| 鸡奸是什么意思| 丞相和宰相有什么区别| 九一八事变是什么意思| 不发烧流鼻涕打喷嚏吃什么药| 双手脱皮是什么原因引起的| 没睡好头疼是什么原因| 2021属什么生肖| 手癣用什么药膏效果好| 为什么女的会流水怎么回事| 林俊杰的粉丝叫什么| 什么猫最贵| 第一次见家长送什么礼物好| 谷草谷丙偏高代表什么| 可谓是什么意思| 阴唇痒是什么原因| 泡酒用什么容器好| 瘦肉炒什么好吃| polo villae是什么档次| 辛辣指的是什么| 1968属什么生肖| 肠炎吃什么药效果好| 梅毒通过什么传播| 狗为什么会咬人| 什么水果去湿气效果最好| 翊字是什么意思| 箱涵是什么| 苏州为什么不建机场| 什么是淋巴| 男人阳气不足有什么症状| 先兆性流产有什么症状| 啦啦是什么意思| 印象是什么意思| 迁移宫是什么意思| 全血检查能查些什么病| 神器积分换什么最划算| 喝脱脂牛奶有什么好处| 梦见老婆出轨是什么预兆| 传染病八项包括什么| 天津卫的卫是什么意思| 鹭鸶是什么动物| 狮子座的幸运色是什么| 降压灵又叫什么| 得瑟是什么意思| 出汗太多是什么原因| 五大仙家什么仙最厉害| 炸鱼是什么意思| 吐白痰是什么原因| 慢性咽炎是什么症状| 炖汤用什么鸡| 氯雷他定片治什么病| 迈之灵治什么病| 玉屏风颗粒主治什么| 手术室为什么那么冷| tpo是什么| 每天喝一杯豆浆有什么好处| 吃什么补蛋白质最快| 个性是什么意思| 心里发慌是什么病| 九月二十二是什么星座| 14数字代表什么意思| 裤子前浪后浪是什么| 心有余悸是什么意思| 针对是什么意思| 音欠读什么| 租赁费计入什么科目| 血压低是什么情况| 什么地摇动| c2是什么意思| 子宫内膜增厚是什么原因| 脾胃气虚吃什么中成药| 黄鼠狼是什么科| 阴虚阳亢吃什么中成药| 吃什么流产最快| 阴道吹气是什么原因| 鼠和什么生肖最配| 拔牙挂什么科| 汤力水是什么| 嫡传弟子是什么意思| 丘疹性荨麻疹用什么药| 口腔溃疡吃什么中成药| 乙肝有什么明显的症状| 百度
百度 财政转移支付是以各级政府之间存在的财政能力差异为基础,以实现各地公共服务水平的均等化为主旨,而实行的一种财政资金转移或财政平衡制度。

Module:Infobox {{Инфобокс}} ?лг?с?н?? ж?мыс ?стеу?не ?ажет модуль. Оны ?олдану н?с?аулы?ын ?лг? бет?нен ?ара?ыз.

?лг?де ?ателер? бар беттерд? ?ада?алау санаттары


local p = {}
local args = {}
local origArgs = {}
local root
local empty_row_categories = {}
local category_in_empty_row_pattern = '%[%[%s*[Cc][Aa][Tt][Ee][Gg][Oo][Rr][Yy]%s*:[^]]*]]'
local has_rows = false
local lists = {
	plainlist_t = {
		patterns = {
			'^plainlist$',
			'%splainlist$',
			'^plainlist%s',
			'%splainlist%s'
		},
		found = false,
		styles = 'Plainlist/styles.css'
	},
	hlist_t = {
		patterns = {
			'^hlist$',
			'%shlist$',
			'^hlist%s',
			'%shlist%s'
		},
		found = false,
		styles = 'Hlist/styles.css'
	}
}

local function has_list_class(args_to_check)
	for _, list in pairs(lists) do
		if not list.found then
			for _, arg in pairs(args_to_check) do
				for _, pattern in ipairs(list.patterns) do
					if mw.ustring.find(arg or '', pattern) then
						list.found = true
						break
					end
				end
				if list.found then break end
			end
		end
	end
end

local function fixChildBoxes(sval, tt)
	local function notempty( s ) return s and s:match( '%S' ) end
	
	if notempty(sval) then
		local marker = '<span class=special_infobox_marker>'
		local s = sval
		-- start moving templatestyles and categories inside of table rows
		local slast = ''
		while slast ~= s do
			slast = s
			s = mw.ustring.gsub(s, '(</[Tt][Rr]%s*>%s*)(%[%[%s*[Cc][Aa][Tt][Ee][Gg][Oo][Rr][Yy]%s*:[^]]*%]%])', '%2%1')
			s = mw.ustring.gsub(s, '(</[Tt][Rr]%s*>%s*)(\127[^\127]*UNIQ%-%-templatestyles%-%x+%-QINU[^\127]*\127)', '%2%1')
		end
		-- end moving templatestyles and categories inside of table rows
		s = mw.ustring.gsub(s, '(<%s*[Tt][Rr])', marker .. '%1')
		s = mw.ustring.gsub(s, '(</[Tt][Rr]%s*>)', '%1' .. marker)
		if s:match(marker) then
			s = mw.ustring.gsub(s, marker .. '%s*' .. marker, '')
			s = mw.ustring.gsub(s, '([\r\n]|-[^\r\n]*[\r\n])%s*' .. marker, '%1')
			s = mw.ustring.gsub(s, marker .. '%s*([\r\n]|-)', '%1')
			s = mw.ustring.gsub(s, '(</[Cc][Aa][Pp][Tt][Ii][Oo][Nn]%s*>%s*)' .. marker, '%1')
			s = mw.ustring.gsub(s, '(<%s*[Tt][Aa][Bb][Ll][Ee][^<>]*>%s*)' .. marker, '%1')
			s = mw.ustring.gsub(s, '^(%{|[^\r\n]*[\r\n]%s*)' .. marker, '%1')
			s = mw.ustring.gsub(s, '([\r\n]%{|[^\r\n]*[\r\n]%s*)' .. marker, '%1')
			s = mw.ustring.gsub(s, marker .. '(%s*</[Tt][Aa][Bb][Ll][Ee]%s*>)', '%1')
			s = mw.ustring.gsub(s, marker .. '(%s*\n|%})', '%1')
		end
		if s:match(marker) then
			local subcells = mw.text.split(s, marker)
			s = ''
			for k = 1, #subcells do
				if k == 1 then
					s = s .. subcells[k] .. '</' .. tt .. '></tr>'
				elseif k == #subcells then
					local rowstyle = ' style="display:none"'
					if notempty(subcells[k]) then rowstyle = ''	end
					s = s .. '<tr' .. rowstyle ..'><' .. tt .. ' colspan=2>\n' ..
						subcells[k]
				elseif notempty(subcells[k]) then
					if (k % 2) == 0 then
						s = s .. subcells[k]
					else
						s = s .. '<tr><' .. tt .. ' colspan=2>\n' ..
							subcells[k] .. '</' .. tt .. '></tr>'
					end
				end
			end
		end
		-- the next two lines add a newline at the end of lists for the PHP parser
		-- [[Special:Diff/849054481]]
		-- remove when [[:phab:T191516]] is fixed or OBE
		s = mw.ustring.gsub(s, '([\r\n][%*#;:][^\r\n]*)$', '%1\n')
		s = mw.ustring.gsub(s, '^([%*#;:][^\r\n]*)$', '%1\n')
		s = mw.ustring.gsub(s, '^([%*#;:])', '\n%1')
		s = mw.ustring.gsub(s, '^(%{%|)', '\n%1')
		return s
	else
		return sval
	end
end

-- Cleans empty tables
local function cleanInfobox()
	root = tostring(root)
	if has_rows == false then
		root = mw.ustring.gsub(root, '<table[^<>]*>%s*</table>', '')
	end
end

-- Returns the union of the values of two tables, as a sequence.
local function union(t1, t2)

	local vals = {}
	for k, v in pairs(t1) do
		vals[v] = true
	end
	for k, v in pairs(t2) do
		vals[v] = true
	end
	local ret = {}
	for k, v in pairs(vals) do
		table.insert(ret, k)
	end
	return ret
end

-- Returns a table containing the numbers of the arguments that exist
-- for the specified prefix. For example, if the prefix was 'м?т?н', and
-- 'data1', 'data2', and 'data5' exist, it would return {1, 2, 5}.
local function getArgNums(prefix)
	local nums = {}
	for k, v in pairs(args) do
		local num = tostring(k):match('^' .. prefix .. '([1-9]%d*)$')
		if num then table.insert(nums, tonumber(num)) end
	end
	table.sort(nums)
	return nums
end

-- Adds a row to the infobox, with either a header cell
-- or a label/data cell combination.
local function addRow(rowArgs)
	
	if rowArgs.header and rowArgs.header ~= '_BLANK_' then
		has_rows = true
		has_list_class({ rowArgs.rowclass, rowArgs.class, args['та?ырыпша_класс'] })
		
		root
			:tag('tr')
				:addClass(rowArgs.rowclass)
				:cssText(rowArgs.rowstyle)
				:tag('th')
					:attr('colspan', '2')
					:addClass('infobox-header')
					:addClass(rowArgs.class)
					:addClass(args['та?ырыпша_класс'])
					-- @deprecated next; target .infobox-<name> .infobox-header
					:cssText(args['та?ырыпша_класс'])
					:cssText(rowArgs.rowcellstyle)
					:wikitext(fixChildBoxes(rowArgs.header, 'th'))
		if rowArgs.data then
			root:wikitext(
				'[[Category:Pages using infobox templates with ignored data cells]]'
			)
		end
	elseif rowArgs.data and rowArgs.data:gsub(category_in_empty_row_pattern, ''):match('^%S') then
		has_rows = true
		has_list_class({ rowArgs.rowclass, rowArgs.class })
		
		local row = root:tag('tr')
		row:addClass(rowArgs.rowclass)
		row:cssText(rowArgs.rowstyle)
		if rowArgs.label then
			row
				:tag('th')
					:attr('scope', 'row')
					:addClass('infobox-label')
					-- @deprecated next; target .infobox-<name> .infobox-label
					:cssText(args['белг?_стиль'])
					:cssText(rowArgs.rowcellstyle)
					:wikitext(rowArgs.label)
					:done()
		end

		local dataCell = row:tag('td')
		dataCell
			:attr('colspan', not rowArgs.label and '2' or nil)
			:addClass(not rowArgs.label and 'infobox-full-data' or 'infobox-data')
			:addClass(rowArgs.class)
			-- @deprecated next; target .infobox-<name> .infobox(-full)-data
			:cssText(rowArgs.datastyle)
			:cssText(rowArgs.rowcellstyle)
			:wikitext(fixChildBoxes(rowArgs.data, 'td'))
	else
		table.insert(empty_row_categories, rowArgs.data or '')
	end
end

local function renderTitle()
	if not args['атауы'] then return end

	has_rows = true
	has_list_class({args['атауы_класс']})
	
	root
		:tag('caption')
			:addClass('infobox-title')
			:addClass(args['атауы_класс'])
			-- @deprecated next; target .infobox-<name> .infobox-title
			:cssText(args['атауы_стиль'])
			:wikitext(args['атауы'])
	
end

local function renderAboveRow()
	if not args['?ст?'] then return end

	has_rows = true
	has_list_class({ args['?ст?_класс'] })
	
	root
		:tag('tr')
			:tag('th')
				:attr('colspan', '2')
				:addClass('infobox-above')
				:addClass(args['?ст?_класс'])
				-- @deprecated next; target .infobox-<name> .infobox-above
				:cssText(args['?ст?_стиль'])
				:wikitext(fixChildBoxes(args['?ст?'],'th'))
end

local function renderBelowRow()
	if not args['асты'] then return end

	has_rows = true
	has_list_class({ args['асты_класс'] })
	
	root
		:tag('tr')
			:tag('td')
				:attr('colspan', '2')
				:addClass('infobox-below')
				:addClass(args['асты_класс'])
				-- @deprecated next; target .infobox-<name> .infobox-below
				:cssText(args['асты_стиль'])
				:wikitext(fixChildBoxes(args['асты'],'td'))
end

local function addSubheaderRow(subheaderArgs)
	if subheaderArgs.data and
		subheaderArgs.data:gsub(category_in_empty_row_pattern, ''):match('^%S') then
		has_rows = true
		has_list_class({ subheaderArgs.rowclass, subheaderArgs.class })
		
		local row = root:tag('tr')
		row:addClass(subheaderArgs.rowclass)

		local dataCell = row:tag('td')
		dataCell
			:attr('colspan', '2')
			:addClass('infobox-subheader')
			:addClass(subheaderArgs.class)
			:cssText(subheaderArgs.datastyle)
			:cssText(subheaderArgs.rowcellstyle)
			:wikitext(fixChildBoxes(subheaderArgs.data, 'td'))
	else
		table.insert(empty_row_categories, subheaderArgs.data or '')
	end
end

local function renderSubheaders()
	if args['ма?дайша'] then
		args['ма?дайша1'] = args['ма?дайша']
	end
	if args['ма?дайша_жол_класс'] then
		args['ма?дайша_жол_класс1'] = args['ма?дайша_жол_класс']
	end
	local subheadernums = getArgNums('ма?дайша')
	for k, num in ipairs(subheadernums) do
		addSubheaderRow({
			data = args['ма?дайша' .. tostring(num)],
			-- @deprecated next; target .infobox-<name> .infobox-subheader
			datastyle = args['ма?дайша_стиль'],
			rowcellstyle = args['ма?дайша_стиль' .. tostring(num)],
			class = args['ма?дайша_стиль'],
			rowclass = args['ма?дайша_жол_класс' .. tostring(num)]
		})
	end
end

local function addImageRow(imageArgs)

	if imageArgs.data and
		imageArgs.data:gsub(category_in_empty_row_pattern, ''):match('^%S') then

		has_rows = true
		has_list_class({ imageArgs.rowclass, imageArgs.class })
		
		local row = root:tag('tr')
		row:addClass(imageArgs.rowclass)

		local dataCell = row:tag('td')
		dataCell
			:attr('colspan', '2')
			:addClass('infobox-image')
			:addClass(imageArgs.class)
			:cssText(imageArgs.datastyle)
			:wikitext(fixChildBoxes(imageArgs.data, 'td'))
	else
		table.insert(empty_row_categories, imageArgs.data or '')
	end
end

local function renderImages()
	if args['сурет'] then
		args['сурет1'] = args['сурет']
	end
	if args['сурет_атауы'] then
		args['сурет_атауы1'] = args['сурет_атауы']
	end
	local imagenums = getArgNums('сурет')
	for k, num in ipairs(imagenums) do
		local caption = args['сурет_атауы' .. tostring(num)]
		local data = mw.html.create():wikitext(args['сурет' .. tostring(num)])
		if caption then
			data
				:tag('div')
					:addClass('infobox-caption')
					-- @deprecated next; target .infobox-<name> .infobox-caption
					:cssText(args['сурет_атауы_стиль'])
					:wikitext(caption)
		end
		addImageRow({
			data = tostring(data),
			-- @deprecated next; target .infobox-<name> .infobox-image
			datastyle = args['сурет_стиль'],
			class = args['сурет_класс'],
			rowclass = args['сурет_жол_класс' .. tostring(num)]
		})
	end
end

-- When autoheaders are turned on, preprocesses the rows
local function preprocessRows()
	if not args['автота?ырыпша'] then return end
	
	local rownums = union(getArgNums('та?ырыпша'), getArgNums('м?т?н'))
	table.sort(rownums)
	local lastheader
	for k, num in ipairs(rownums) do
		if args['та?ырыпша' .. tostring(num)] then
			if lastheader then
				args['та?ырыпша' .. tostring(lastheader)] = nil
			end
			lastheader = num
		elseif args['м?т?н' .. tostring(num)] and
			args['м?т?н' .. tostring(num)]:gsub(
				category_in_empty_row_pattern, ''
			):match('^%S') then
			local data = args['м?т?н' .. tostring(num)]
			if data:gsub(category_in_empty_row_pattern, ''):match('%S') then
				lastheader = nil
			end
		end
	end
	if lastheader then
		args['та?ырыпша' .. tostring(lastheader)] = nil
	end
end

-- Gets the union of the header and data argument numbers,
-- and renders them all in order
local function renderRows()

	local rownums = union(getArgNums('та?ырыпша'), getArgNums('м?т?н'))
	table.sort(rownums)
	for k, num in ipairs(rownums) do
		addRow({
			header = args['та?ырыпша' .. tostring(num)],
			label = args['белг?' .. tostring(num)],
			data = args['м?т?н' .. tostring(num)],
			datastyle = args['м?т?н_стиль'],
			class = args['класс' .. tostring(num)],
			rowclass = args['жол_класс' .. tostring(num)],
			-- @deprecated next; target .infobox-<name> rowclass
			rowstyle = args['жол_стиль' .. tostring(num)],
			rowcellstyle = args['жол_?я_стиль' .. tostring(num)]
		})
	end
end

local function renderNavBar()
	if not args['?лг?_атауы'] then return end

	has_rows = true
	root
		:tag('tr')
			:tag('td')
				:attr('colspan', '2')
				:addClass('infobox-navbar')
				:wikitext(require('Module:Navbar')._navbar{
					args['?лг?_атауы'],
					mini = 1,
				})
end

local function renderItalicTitle()
	local italicTitle = args['?и?аш атауы'] and mw.ustring.lower(args['?и?аш атауы'])
	if italicTitle == '' or italicTitle == 'force' or italicTitle == 'yes' then
		root:wikitext(require('Module:Italic title')._main({}))
	end
end

-- Categories in otherwise empty rows are collected in empty_row_categories.
-- This function adds them to the module output. It is not affected by
-- args.decat because this module should not prevent module-external categories
-- from rendering.
local function renderEmptyRowCategories()
	for _, s in ipairs(empty_row_categories) do
		root:wikitext(s)
	end
end

-- Render tracking categories. args.decat == turns off tracking categories.
local function renderTrackingCategories()
	if args.decat == 'yes' then return end
	if args.child == 'yes' then
		if args.title then
			root:wikitext(
				'[[Category:Pages using embedded infobox templates with the title parameter]]'
			)
		end
	elseif #(getArgNums('м?т?н')) == 0 and mw.title.getCurrentTitle().namespace == 0 then
		root:wikitext('[[Category:Articles using infobox templates with no data rows]]')
	end
end

--[=[
Loads the templatestyles for the infobox.

TODO: FINISH loading base templatestyles here rather than in
MediaWiki:Common.css. There are 4-5000 pages with 'raw' infobox tables.
See [[Mediawiki_talk:Common.css/to_do#Infobox]] and/or come help :).
When we do this we should clean up the inline CSS below too.
Will have to do some bizarre conversion category like with sidebar.

]=]
local function loadTemplateStyles()
	local frame = mw.getCurrentFrame()
	
	local hlist_templatestyles = ''
	if lists.hlist_t.found then
		hlist_templatestyles = frame:extensionTag{
			name = 'templatestyles', args = { src = lists.hlist_t.styles }
		}
	end
	
	local plainlist_templatestyles = ''
	if lists.plainlist_t.found then
		plainlist_templatestyles = frame:extensionTag{
			name = 'templatestyles', args = { src = lists.plainlist_t.styles }
		}
	end
	
	-- See function description
	local base_templatestyles = frame:extensionTag{
		name = 'templatestyles', args = { src = 'Module:Infobox/styles.css' }
	}

	local templatestyles = ''
	if args['templatestyles'] then
		templatestyles = frame:extensionTag{
			name = 'templatestyles', args = { src = args['templatestyles'] }
		}
	end
	
	local child_templatestyles = ''
	if args['child templatestyles'] then
		child_templatestyles = frame:extensionTag{
			name = 'templatestyles', args = { src = args['child templatestyles'] }
		}
	end
	
	local grandchild_templatestyles = ''
	if args['grandchild templatestyles'] then
		grandchild_templatestyles = frame:extensionTag{
			name = 'templatestyles', args = { src = args['grandchild templatestyles'] }
		}
	end
	
	return table.concat({
		-- hlist -> plainlist -> base is best-effort to preserve old Common.css ordering.
		-- this ordering is not a guarantee because the rows of interest invoking
		-- each class may not be on a specific page
		hlist_templatestyles,
		plainlist_templatestyles,
		base_templatestyles,
		templatestyles,
		child_templatestyles,
		grandchild_templatestyles
	})
end

-- common functions between the child and non child cases
local function structure_infobox_common()
	renderSubheaders()
	renderImages()
	preprocessRows()
	renderRows()
	renderBelowRow()
	renderNavBar()
	renderItalicTitle()
	renderEmptyRowCategories()
	renderTrackingCategories()
	cleanInfobox()
end

-- Specify the overall layout of the infobox, with special settings if the
-- infobox is used as a 'child' inside another infobox.
local function _infobox()
	if args.child ~= 'yes' then
		root = mw.html.create('table')

		root
			:addClass(args.subbox == 'yes' and 'infobox-subbox' or 'infobox')
			:addClass(args['дене_класс'])
			-- @deprecated next; target .infobox-<name>
			:cssText(args['дене_класс'])
		
		has_list_class({ args['дене_класс'] })

		renderTitle()
		renderAboveRow()
	else
		root = mw.html.create()

		root
			:wikitext(args['атауы'])
	end
	structure_infobox_common()
	
	return loadTemplateStyles() .. root
end

-- If the argument exists and isn't blank, add it to the argument table.
-- Blank arguments are treated as nil to match the behaviour of ParserFunctions.
local function preprocessSingleArg(argName)
	if origArgs[argName] and origArgs[argName] ~= '' then
		args[argName] = origArgs[argName]
	end
end

-- Assign the parameters with the given prefixes to the args table, in order, in
-- batches of the step size specified. This is to prevent references etc. from
-- appearing in the wrong order. The prefixTable should be an array containing
-- tables, each of which has two possible fields, a "prefix" string and a
-- "depend" table. The function always parses parameters containing the "prefix"
-- string, but only parses parameters in the "depend" table if the prefix
-- parameter is present and non-blank.
local function preprocessArgs(prefixTable, step)
	if type(prefixTable) ~= 'table' then
		error("Non-table value detected for the prefix table", 2)
	end
	if type(step) ~= 'number' then
		error("Invalid step value detected", 2)
	end

	-- Get arguments without a number suffix, and check for bad input.
	for i,v in ipairs(prefixTable) do
		if type(v) ~= 'table' or type(v.prefix) ~= "string" or
			(v.depend and type(v.depend) ~= 'table') then
			error('Invalid input detected to preprocessArgs prefix table', 2)
		end
		preprocessSingleArg(v.prefix)
		-- Only parse the depend parameter if the prefix parameter is present
		-- and not blank.
		if args[v.prefix] and v.depend then
			for j, dependValue in ipairs(v.depend) do
				if type(dependValue) ~= 'string' then
					error('Invalid "depend" parameter value detected in preprocessArgs')
				end
				preprocessSingleArg(dependValue)
			end
		end
	end

	-- Get arguments with number suffixes.
	local a = 1 -- Counter variable.
	local moreArgumentsExist = true
	while moreArgumentsExist == true do
		moreArgumentsExist = false
		for i = a, a + step - 1 do
			for j,v in ipairs(prefixTable) do
				local prefixArgName = v.prefix .. tostring(i)
				if origArgs[prefixArgName] then
					-- Do another loop if any arguments are found, even blank ones.
					moreArgumentsExist = true
					preprocessSingleArg(prefixArgName)
				end
				-- Process the depend table if the prefix argument is present
				-- and not blank, or we are processing "prefix1" and "prefix" is
				-- present and not blank, and if the depend table is present.
				if v.depend and (args[prefixArgName] or (i == 1 and args[v.prefix])) then
					for j,dependValue in ipairs(v.depend) do
						local dependArgName = dependValue .. tostring(i)
						preprocessSingleArg(dependArgName)
					end
				end
			end
		end
		a = a + step
	end
end

-- Parse the data parameters in the same order that the old {{infobox}} did, so
-- that references etc. will display in the expected places. Parameters that
-- depend on another parameter are only processed if that parameter is present,
-- to avoid phantom references appearing in article reference lists.
local function parseDataParameters()

	preprocessSingleArg('автота?ырыпша')
	preprocessSingleArg('child')
	preprocessSingleArg('дене_класс')
	preprocessSingleArg('?шк?_?орап')
	preprocessSingleArg('дене_стиль')
	preprocessSingleArg('атауы')
	preprocessSingleArg('атауы_класс')
	preprocessSingleArg('атауы_стиль')
	preprocessSingleArg('?ст?')
	preprocessSingleArg('?ст?_класс')
	preprocessSingleArg('?ст?_стиль')
	preprocessArgs({
		{prefix = 'ма?дайша', depend = {'ма?дайша_стиль', 'ма?дайша_жол_класс'}}
	}, 10)
	preprocessSingleArg('ма?дайша_стиль')
	preprocessSingleArg('ма?дайша_класс')
	preprocessArgs({
		{prefix = 'сурет', depend = {'сурет_атауы', 'сурет_жол_класс'}}
	}, 10)
	preprocessSingleArg('сурет_атауы_стиль')
	preprocessSingleArg('сурет_стиль')
	preprocessSingleArg('сурет_класс')
	preprocessArgs({
		{prefix = 'та?ырыпша'},
		{prefix = 'м?т?н', depend = {'белг?'}},
		{prefix = 'жол_класс'},
		{prefix = 'жол_стиль'},
		{prefix = 'жол_?я_стиль'},
		{prefix = 'класс'}
	}, 50)
	preprocessSingleArg('та?ырыпша_класс')
	preprocessSingleArg('та?ырыпша_стиль')
	preprocessSingleArg('белг?_стиль')
	preprocessSingleArg('м?т?н_стиль')
	preprocessSingleArg('асты')
	preprocessSingleArg('асты_класс')
	preprocessSingleArg('асты_стиль')
	preprocessSingleArg('?лг?_атауы')
	-- different behaviour for italics if blank or absent
	args['?и?аш атауы'] = origArgs['?и?аш атауы']
	preprocessSingleArg('decat')
	preprocessSingleArg('templatestyles')
	preprocessSingleArg('child templatestyles')
	preprocessSingleArg('grandchild templatestyles')
end

-- If called via #invoke, use the args passed into the invoking template.
-- Otherwise, for testing purposes, assume args are being passed directly in.
function p.infobox(frame)
	if frame == mw.getCurrentFrame() then
		origArgs = frame:getParent().args
	else
		origArgs = frame
	end
	
	parseDataParameters()
	
	return _infobox()
end

-- For calling via #invoke within a template
function p.infoboxTemplate(frame)
	origArgs = {}
	for k,v in pairs(frame.args) do origArgs[k] = mw.text.trim(v) end
	
	parseDataParameters()
	
	return _infobox()
end
return p
萎缩性胃炎吃什么药能治好 产后抑郁症有什么表现症状 随餐吃是什么意思 甘少一横读什么 降压药什么时间吃最好
男人尿道炎吃什么药最好 截瘫是什么意思 乌冬面是什么面 鸡为什么吃自己下的蛋 中性粒细胞百分比偏低什么意思
咳嗽流鼻涕吃什么药 65年属什么生肖 三个降号是什么调 孩子是ab型父母是什么血型 属狗与什么属相相合
梦见系鞋带是什么意思 什么姿势最爽 毓读什么 癖是什么意思 包皮长什么样
得性病有什么症状hcv9jop5ns6r.cn 蛋白粉吃了有什么好处hcv9jop2ns5r.cn 盆腔炎吃什么药效果好hcv8jop2ns6r.cn 家里有壁虎是什么征兆tiangongnft.com 天荒地老是什么生肖hcv8jop8ns2r.cn
男人味是什么意思hcv8jop8ns3r.cn 为什么来月经会有血块hcv8jop1ns8r.cn 9月20日是什么星座hcv9jop8ns2r.cn 吃人参果有什么好处hcv8jop2ns8r.cn 一身傲骨是什么意思hcv8jop5ns2r.cn
如法炮制是什么意思xinmaowt.com 尿维生素c弱阳性是什么意思hcv9jop6ns6r.cn 哮喘吃什么药最有效hcv7jop4ns6r.cn 血常规查的是什么项目hcv8jop3ns5r.cn 风象星座是什么意思travellingsim.com
柯字五行属什么hcv8jop9ns6r.cn 语字五行属什么luyiluode.com 特约演员什么意思hcv8jop3ns7r.cn 利可君片是什么药hcv9jop4ns5r.cn 拉肚子为什么憋不住hcv7jop5ns3r.cn
百度