local Luan = require "luan:Luan.luan" local error = Luan.error local pairs = Luan.pairs or error() local type_of = Luan.type or error() local range = Luan.range or error() local Table = require "luan:Table.luan" local concat = Table.concat or error() local all_sizes = require "site:/lib/sizes.luan" local Utils = require "site:/lib/Utils.luan" local deep_copy = Utils.deep_copy or error() local round = Utils.round or error() local cups = Utils.cups or error() local our_size = "Our Size" local function size(chart,size) return all_sizes[size].title end local waist = "Waist" local function cm_to_inches(cm) return round( cm / 2.54 ) end local function any_size(chart,cms) chart.has_units = true local from = cms[1] local to = cms[2] return [[]]..from..[[cm - ]]..to..[[cm ]]..cm_to_inches(from)..[[" - ]]..cm_to_inches(to)..[["]] end_function local function waist_size(chart,size) local cms = chart.rows[size].internal.cm.waist or error() return any_size(chart,cms) end_function local function hip_size(chart,size) local cms = chart.rows[size].internal.cm.hips or error(chart.name.." - no hip size "..size) return any_size(chart,cms) end_function local function bust_size(chart,size) local cms = chart.rows[size].internal.cm.bust or error(chart.name.." - no bust size "..size) return any_size(chart,cms) end_function local function bra_size(chart,size) local cms = chart.rows[size].internal.cm.bra or error(chart.name.." "..size) local t = {} for band, r in pairs(cms) do for cup in range(r[1],r[2]) do cup = cups[cup] or error(cup) t[#t+1] = band..cup end end return concat(t,", ") end_function local size_charts = {} size_charts.leggings_idol = { version = "1" image = "women.png" columns = { [our_size] = {type=size} ["Waist"] = {type=waist_size} ["Inseam"] = {type="product"} } internal = { title = "Leggings & Shorts (Idol)" cm = { "waist" } heading = [[ Factory Waist (Idol's Static) ]] } rows = { XXS = { internal = { cm = { waist={54,60} } html = [[ 18" (46cm) ]] } } XS = { internal = { cm = { waist={60,67} } html = [[ 20" (51cm) ]] } } S = { internal = { cm = { waist={67,74} } html = [[ 22" (56cm) ]] } } M = { internal = { cm = { waist={74,81} } html = [[ 24" (61cm) ]] } } L = { internal = { cm = { waist={81,88} } html = [[ 26" (66cm) ]] } } XL = { internal = { cm = { waist={88,98} } html = [[ 28" (71cm) ]] } } XXL = { internal = { cm = { waist={98,108} } html = [[ 30" (76cm) ]] } } ["3XL"] = { internal = { cm = { waist={108,118} } html = [[ 32" (81cm) ]] } } ["4XL"] = { internal = { cm = { waist={118,128} } html = [[ 34" (86cm) ]] } } } } size_charts.leggings_idol_max = { version = "1" image = "women.png" columns = { [our_size] = {type=size} ["Waist"] = {type=waist_size} ["Hip"] = {type=hip_size} ["Inseam"] = {type="product"} } internal = { title = "Leggings & Shorts Max (Idol)" cm = { "waist", "hips" } heading = [[ Factory Waist (Idol's Static) ]] } fit_prompt = "Waist Fit" rows = { XXS = { internal = { cm = { waist={54,60}, hips={78,84} } html = [[ 18" (46cm) ]] } } XS = { internal = { cm = { waist={60,67}, hips={84,91} } html = [[ 20" (51cm) ]] } } S = { internal = { cm = { waist={67,74}, hips={91,98} } html = [[ 22" (56cm) ]] } } M = { internal = { cm = { waist={74,81}, hips={98,105} } html = [[ 24" (61cm) ]] } } L = { internal = { cm = { waist={81,88}, hips={105,112} } html = [[ 26" (66cm) ]] } } XL = { internal = { cm = { waist={88,98}, hips={112,120} } html = [[ 28" (71cm) ]] } } XXL = { internal = { cm = { waist={98,108}, hips={120,128} } html = [[ 30" (76cm) ]] } } ["3XL"] = { internal = { cm = { waist={108,118}, hips={128,138} } html = [[ 32" (81cm) ]] } } ["4XL"] = { internal = { cm = { waist={118,128}, hips={138,148} } html = [[ 34" (86cm) ]] } } } } size_charts.leggings_thousandknot = { version = "1" image = "women.png" columns = { [our_size] = {type=size} ["Waist"] = {type=waist_size} ["Inseam"] = {type="product"} } internal = { title = "Leggings & Shorts (Thousand Knots)" cm = { "waist" } heading = [[ Factory Waist (Idol's Static) ]] } rows = { ["2"] = { internal = { cm = { waist={54,60} } html = [[ 18" (46cm) ]] } } ["4"] = { internal = { cm = { waist={60,67} } html = [[ 20" (51cm) ]] } } ["6"] = { internal = { cm = { waist={67,74} } html = [[ 22" (56cm) ]] } } ["8"] = { internal = { cm = { waist={74,81} } html = [[ 24" (61cm) ]] } } ["10"] = { internal = { cm = { waist={81,88} } html = [[ 26" (66cm) ]] } } ["12"] = { internal = { cm = { waist={88,98} } html = [[ 28" (71cm) ]] } } } } size_charts.leggings_trust = deep_copy(size_charts.leggings_idol) size_charts.leggings_trust.internal.title = "Leggings & Shorts (Trust Stitches)" size_charts.leggings_trust_max = deep_copy(size_charts.leggings_idol_max) size_charts.leggings_trust_max.internal.title = "Leggings & Shorts Max (Trust Stitches)" size_charts.leggings_wildfeather = { version = "1" image = "women.png" columns = { [our_size] = {type=size} ["Waist"] = {type=waist_size} ["Inseam"] = {type="product"} } internal = { title = "Leggings (Wild Feather)" cm = { "waist" } heading = [[ Factory Waist (Idol's Static) ]] } rows = { XXS = { internal = { cm = { waist={54,60} } html = [[ 18" (46cm) ]] } } XS = { internal = { cm = { waist={60,67} } html = [[ 20" (51cm) ]] } } S = { internal = { cm = { waist={67,74} } html = [[ 22" (56cm) ]] } } M = { internal = { cm = { waist={74,81} } html = [[ 24" (61cm) ]] } } L = { internal = { cm = { waist={81,88} } html = [[ 26" (66cm) ]] } } XL = { internal = { cm = { waist={88,98} } html = [[ 28" (71cm) ]] } } XXL = { internal = { cm = { waist={98,108} } html = [[ 30" (76cm) ]] } } ["3XL"] = { internal = { cm = { waist={108,118} } html = [[ 32" (81cm) ]] } } ["4XL"] = { internal = { cm = { waist={118,128} } html = [[ 34" (86cm) ]] } } } } size_charts.leggings_trinity = deep_copy(size_charts.leggings_wildfeather) size_charts.leggings_trinity.internal.title = "Leggings (Trinity)" size_charts.leggings_ykstudio = deep_copy(size_charts.leggings_wildfeather) size_charts.leggings_ykstudio.internal.title = "Leggings (Y.K. Studio)" size_charts.leggings_goodmove = deep_copy(size_charts.leggings_wildfeather) size_charts.leggings_goodmove.internal.title = "Leggings (Good Move)" size_charts.leggings_liamwayne = deep_copy(size_charts.leggings_wildfeather) size_charts.leggings_liamwayne.internal.title = "Leggings & Shorts (Liam Wayne)" size_charts.leggings_lush = deep_copy(size_charts.leggings_wildfeather) size_charts.leggings_lush.internal.title = "Leggings (Lush)" size_charts.bras_alpha = { version = "1" image = "women.png" columns = { [our_size] = {type=size} ["Bra Size"] = {type=bra_size} } internal = { title = "Bras (alpha sizes)" cm = { "band", "bra" } } rows = { ["3XS"] = { internal = { cm = { band = {26,28} bra = { [26]={1,4}, [28]={1,4} } } } } XXS = { internal = { cm = { band = {28,30} bra = { [28]={1,4}, [30]={1,4} } } } } XS = { internal = { cm = { band = {30,32} bra = { [30]={1,4}, [32]={1,4} } } } } S = { internal = { cm = { band = {32,34} bra = { [32]={1,4}, [34]={1,4} } } } } M = { internal = { cm = { band = {34,36} bra = { [34]={1,4}, [36]={1,4} } } } } L = { internal = { cm = { band = {36,38} bra = { [36]={1,4}, [38]={1,4} } } } } XL = { internal = { cm = { band = {38,40} bra = { [38]={1,4}, [40]={1,4} } } } } XXL = { internal = { cm = { band = {40,42} bra = { [40]={1,4}, [42]={1,4} } } } } ["3XL"] = { internal = { cm = { band = {42,44} bra = { [42]={1,4}, [44]={1,4} } } } } ["4XL"] = { internal = { cm = { band = {44,46} bra = { [44]={1,4}, [46]={1,4} } } } } ["5XL"] = { internal = { cm = { band = {46,48} bra = { [46]={1,4}, [48]={1,4} } } } } } } size_charts.bras_numeric = { version = "1" image = "women.png" columns = { [our_size] = {type=size} ["Bra Size"] = {type=bra_size} } internal = { title = "Bras (numeric sizes)" cm = { "band", "bra" } } rows = { ["2"] = deep_copy(size_charts.bras_alpha.rows.XXS) ["4"] = deep_copy(size_charts.bras_alpha.rows.XS) ["6"] = deep_copy(size_charts.bras_alpha.rows.S) ["8"] = deep_copy(size_charts.bras_alpha.rows.M) ["10"] = deep_copy(size_charts.bras_alpha.rows.L) ["12"] = deep_copy(size_charts.bras_alpha.rows.XL) ["14"] = deep_copy(size_charts.bras_alpha.rows.XXL) ["16"] = deep_copy(size_charts.bras_alpha.rows["3XL"]) ["18"] = deep_copy(size_charts.bras_alpha.rows["4XL"]) ["20"] = deep_copy(size_charts.bras_alpha.rows["5XL"]) } } size_charts.bras_wildlush = { version = "1" image = "women.png" columns = { [our_size] = {type=size} ["Bra Size"] = {type=bra_size} } internal = { title = "Bras (Wild Feather, Lush, factory revised)" cm = { "band", "bra" } } rows = { S = { internal = { cm = { band = {32,34} bra = { [32]={1,4}, [34]={1,2} } } } } M = { internal = { cm = { band = {34,36} bra = { [34]={3,4}, [36]={1,2} } } } } L = { internal = { cm = { band = {36,38} bra = { [36]={3,4}, [38]={1,2} } } } } XL = { internal = { cm = { band = {38,40} bra = { [38]={3,4}, [40]={1,2} } } } } XXL = { internal = { cm = { band = {40,42} bra = { [40]={3,4}, [42]={1,2} } } } } ["3XL"] = { internal = { cm = { band = {42,44} bra = { [42]={3,4}, [44]={1,2} } } } } ["4XL"] = { internal = { cm = { band = {44,46} bra = { [44]={3,4}, [46]={1,2} } } } } ["5XL"] = { internal = { cm = { band = {46,48} bra = { [46]={3,4}, [48]={1,4} } } } } } } size_charts.tops_alpha = { version = "1" image = "women.png" columns = { [our_size] = {type=size} ["Bust"] = {type=bust_size} } internal = { title = "Tops (alpha sizes)" cm = { "bust" } } rows = { XXS = { internal = { cm = { bust={70,76} } } } XS = { internal = { cm = { bust={76,83} } } } S = { internal = { cm = { bust={83,90} } } } M = { internal = { cm = { bust={90,97} } } } L = { internal = { cm = { bust={97,104} } } } XL = { internal = { cm = { bust={104,114} } } } XXL = { internal = { cm = { bust={114,124} } } } ["3XL"] = { internal = { cm = { bust={124,134} } } } ["4XL"] = { internal = { cm = { bust={134,144} } } } } } size_charts.tops_length_alpha = deep_copy(size_charts.tops_alpha) size_charts.tops_length_alpha.internal.title = "Tops (alpha sizes with length)" size_charts.tops_length_alpha.columns["Length"] = {type="product"} size_charts.tops_numeric = { version = "1" image = "women.png" columns = { [our_size] = {type=size} ["Bust"] = {type=bust_size} } internal = { title = "Tops (numeric sizes)" cm = { "bust" } } rows = { ["2"] = { internal = { cm = { bust={70,76} } } } ["4"] = { internal = { cm = { bust={76,83} } } } ["6"] = { internal = { cm = { bust={83,90} } } } ["8"] = { internal = { cm = { bust={90,97} } } } ["10"] = { internal = { cm = { bust={97,104} } } } ["12"] = { internal = { cm = { bust={104,114} } } } ["14"] = { internal = { cm = { bust={114,124} } } } ["16"] = { internal = { cm = { bust={124,134} } } } ["18"] = { internal = { cm = { bust={134,144} } } } } } size_charts.tops_length_numeric = deep_copy(size_charts.tops_numeric) size_charts.tops_length_numeric.internal.title = "Tops (numeric sizes with length)" size_charts.tops_length_numeric.columns["Length"] = {type="product"} size_charts.tennis_skirt = { version = "1" image = "women.png" columns = { [our_size] = {type=size} ["Waist"] = {type="static"} ["Skirt Length"] = {type="product"} ["Shorts Length"] = {type="product"} } internal = { title = "Tennis Skirt" cm = { "waist" } } fit_prompt = "Waist Fit" rows = { XS = { ["Waist"] = "26\" (66cm)" internal = { cm = { waist={60,67} } } } S = { ["Waist"] = "28\" (71cm)" internal = { cm = { waist={67,74} } } } M = { ["Waist"] = "30\" (76cm)" internal = { cm = { waist={74,81} } } } L = { ["Waist"] = "32\" (81cm)" internal = { cm = { waist={81,88} } } } XL = { ["Waist"] = "34\" (86cm)" internal = { cm = { waist={88,98} } } } XXL = { ["Waist"] = "36\" (91cm)" internal = { cm = { waist={98,108} } } } ["3XL"] = { ["Waist"] = "38\" (96cm)" internal = { cm = { waist={108,118} } } } ["4XL"] = { ["Waist"] = "40\" (101cm)" internal = { cm = { waist={118,128} } } } } } size_charts.skirt = { version = "1" image = "women.png" columns = { [our_size] = {type=size} ["Waist"] = {type="static"} ["Hip"] = {type="static"} ["Length"] = {type="product"} } internal = { title = "Skirt" cm = { "waist", "hips" } } rows = { XS = { ["Waist"] = "26\" (66cm)" ["Hip"] = "39\" (98cm)" internal = { cm = { waist={60,67}, hips={84,91} } } } S = { ["Waist"] = "28\" (71cm)" ["Hip"] = "41\" 103cm)" internal = { cm = { waist={67,74}, hips={91,98} } } } M = { ["Waist"] = "30\" (76cm)" ["Hip"] = "43\" (108cm)" internal = { cm = { waist={74,81}, hips={98,105} } } } L = { ["Waist"] = "32\" (81cm)" ["Hip"] = "45\" (113cm)" internal = { cm = { waist={81,88}, hips={105,112} } } } XL = { ["Waist"] = "34\" (86cm)" ["Hip"] = "47\" (118cm)" internal = { cm = { waist={88,98}, hips={112,120} } } } XXL = { ["Waist"] = "36\" (91cm)" ["Hip"] = "49\" (123cm)" internal = { cm = { waist={98,108}, hips={120,128} } } } ["3XL"] = { ["Waist"] = "38\" (96cm)" ["Hip"] = "51\" (128cm)" internal = { cm = { waist={108,118}, hips={128,138} } } } ["4XL"] = { ["Waist"] = "40\" (101cm)" ["Hip"] = "53\" (133cm)" internal = { cm = { waist={118,128}, hips={138,148} } } } } } size_charts.dress = { version = "1" image = "women.png" columns = { [our_size] = {type=size} ["Length"] = {type="product"} ["Bust"] = {type="product"} ["Waist"] = {type="product"} ["Hip"] = {type="product"} } internal = { title = "Dress (by product)" } rows = { XS = {} S = {} M = {} L = {} XL = {} XXL = {} ["3XL"] = {} ["4XL"] = {} } } size_charts.swimwear = { version = "1" image = "women.png" columns = { [our_size] = {type=size} ["Bra Size"] = {type=bra_size} ["Hip"] = {type=hip_size} } internal = { title = "Swimwear" cm = { "band", "bra", "hips" } } rows = { S = { internal = { cm = { band = {32,34} bra = { [32]={1,2}, [34]={1,2} } hips = {91,95} } } } M = { internal = { cm = { band = {34,36} bra = { [34]={1,2}, [36]={1,2} } hips = {96,100} } } } L = { internal = { cm = { band = {36,38} bra = { [36]={1,3}, [38]={1,3} } hips = {101,105} } } } XL = { internal = { cm = { band = {38,40} bra = { [38]={1,4}, [40]={1,4} } hips = {106,110} } } } } } size_charts.accessories = { version = "1" columns = { [our_size] = {type=size} ["Length"] = {type="product"} ["Width"] = {type="product"} } internal = { title = "Accessories" } rows = { F = {} } } size_charts.accessories_knee = { version = "1" columns = { [our_size] = {type=size} ["Calf"] = {type="static"} } internal = { title = "Accessories" } rows = { S = { ["Calf"] = "12.6-13.4\" (32-34cm)" } M = { ["Calf"] = "13.4-14.2\" (34-36cm)" } L = { ["Calf"] = "14.2-15.7\" (36-40cm)" } XL = { ["Calf"] = "15.7-18.1\" (40-46cm)" } } } size_charts.accessories_glove = { version = "1" columns = { [our_size] = {type=size} ["Hand Circumference"] = {type="static"} } internal = { title = "Accessories" } rows = { S = { ["Hand Circumference"] = "5.5-6.3\" (14-16cm)" } M = { ["Hand Circumference"] = "6.3-7.1\" (16-18cm)" } L = { ["Hand Circumference"] = "7.1-8.3\" (18-21cm)" } XL = { ["Hand Circumference"] = "8.3-9.5\" (21-24cm)" } } } size_charts.freefit = { version = "1" columns = { [our_size] = {type=size} ["Fit"] = {type="static"} } internal = { title = "Accessories" } rows = { F = { ["Fit"] = "Free Fit" } } } -- translated charts size_charts.bras_alpha_minus1 = { version = "1" image = "women.png" columns = { [our_size] = {type=size} ["Bra Size"] = {type=bra_size} } internal = { title = "Bras (1-size smaller factories)" cm = { "band", "bra" } } rows = { XXS_minus_1 = deep_copy(size_charts.bras_alpha.rows["3XS"]) XS_minus_1= deep_copy(size_charts.bras_alpha.rows.XXS) S_minus_1 = deep_copy(size_charts.bras_alpha.rows.XS) M_minus_1 = deep_copy(size_charts.bras_alpha.rows.S) L_minus_1 = deep_copy(size_charts.bras_alpha.rows.M) XL_minus_1 = deep_copy(size_charts.bras_alpha.rows.L) XXL_minus_1 = deep_copy(size_charts.bras_alpha.rows.XL) ["3XL_minus_1"] = deep_copy(size_charts.bras_alpha.rows.XXL) ["4XL_minus_1"] = deep_copy(size_charts.bras_alpha.rows["3XL"]) ["5XL_minus_1"] = deep_copy(size_charts.bras_alpha.rows["4XL"]) } } size_charts.leggings_journey = { version = "1" image = "women.png" columns = { [our_size] = {type=size} ["Waist"] = {type=waist_size} ["Inseam"] = {type="product"} } internal = { title = "Leggings (Journey, 1-size smaller)" cm = { "waist" } heading = [[ Factory Waist (Idol's Static) ]] } rows = { XXS_minus_1 = { internal = { cm = { waist={36,46} } html = [[ 16" (41cm) ]] } } XS_minus_1 = { internal = { cm = { waist={54,60} } html = [[ 18" (46cm) ]] } } S_minus_1 = { internal = { cm = { waist={60,67} } html = [[ 20" (51cm) ]] } } M_minus_1 = { internal = { cm = { waist={67,74} } html = [[ 22" (56cm) ]] } } L_minus_1 = { internal = { cm = { waist={74,81} } html = [[ 24" (61cm) ]] } } XL_minus_1 = { internal = { cm = { waist={81,88} } html = [[ 26" (66cm) ]] } } XXL_minus_1 = { internal = { cm = { waist={88,98} } html = [[ 28" (71cm) ]] } } ["3XL_minus_1"] = { internal = { cm = { waist={98,108} } html = [[ 30" (76cm) ]] } } ["4XL_minus_1"] = { internal = { cm = { waist={108,118} } html = [[ 32" (81cm) ]] } } ["5XL_minus_1"] = { internal = { cm = { waist={118,128} } html = [[ 34" (86cm) ]] } } } } size_charts.leggings_topfit = { version = "1" image = "women.png" columns = { [our_size] = {type=size} ["Waist"] = {type=waist_size} ["Inseam"] = {type="product"} } internal = { title = "Leggings (Top Fit, 1-size smaller)" cm = { "waist" } heading = [[ Factory Waist (Idol's Static) ]] } rows = { XXS_minus_1 = { internal = { cm = { waist={36,46} } html = [[ 16" (41cm) ]] } } XS_minus_1 = { internal = { cm = { waist={54,60} } html = [[ 18" (46cm) ]] } } S_minus_1 = { internal = { cm = { waist={60,67} } html = [[ 20" (51cm) ]] } } M_minus_1 = { internal = { cm = { waist={67,74} } html = [[ 22" (56cm) ]] } } L_minus_1 = { internal = { cm = { waist={74,81} } html = [[ 24" (61cm) ]] } } XL_minus_1 = { internal = { cm = { waist={81,88} } html = [[ 26" (66cm) ]] } } XXL_minus_1 = { internal = { cm = { waist={88,98} } html = [[ 28" (71cm) ]] } } ["3XL_minus_1"] = { internal = { cm = { waist={98,108} } html = [[ 30" (76cm) ]] } } ["4XL_minus_1"] = { internal = { cm = { waist={108,118} } html = [[ 32" (81cm) ]] } } ["5XL_minus_1"] = { internal = { cm = { waist={118,128} } html = [[ 34" (86cm) ]] } } } } size_charts.mentops_alpha_minus1 = { version = "1" image = "men.png" columns = { [our_size] = {type=size} ["Chest"] = {type="static"} } internal = { title = "Men's Tops (1-size smaller factories)" cm = { "chest" } -- start with Under Armour sizes } rows = { --[[ XXS_minus_1 = { ["Chest"] = "28\" (71cm)" } XS_minus_1 = { ["Chest"] = "30\" (76cm)" } ]] S_minus_1 = { ["Chest"] = "32\" (81cm)" internal = { cm = { chest = {79,86} } } } M_minus_1 = { ["Chest"] = "34\" (86cm)" internal = { cm = { chest = {86,94} } } } L_minus_1 = { ["Chest"] = "36\" (91cm)" internal = { cm = { chest = {94,104} } } } XL_minus_1 = { ["Chest"] = "38\" (96cm)" internal = { cm = { chest = {104,112} } } } XXL_minus_1 = { ["Chest"] = "40\" (101cm)" internal = { cm = { chest = {112,122} } } } ["3XL_minus_1"] = { ["Chest"] = "42\" (106cm)" internal = { cm = { chest = {122,132} } } } ["4XL_minus_1_men"] = { ["Chest"] = "44\" (111cm)" internal = { cm = { chest = {132,142} } } } --[[ ["5XL_minus_1_men"] = { ["Chest"] = "46\" (116cm)" } F = { ["Chest"] = "Free Fit" } ]] } } size_charts.mensbottom_minus1 = { version = "1" image = "men.png" columns = { [our_size] = {type=size} ["Waist"] = {type="static"} } internal = { title = "Men's Bottoms (1-size smaller factories)" cm = { "waist" } -- start with Under Armour sizes } rows = { S_minus_1 = { ["Waist"] = "26\" (65cm)" internal = { cm = { waist = {71,74} } } } M_minus_1 = { ["Waist"] = "29\" (73cm)" internal = { cm = { waist = {74,79} } } } L_minus_1 = { ["Waist"] = "32\" (81cm)" internal = { cm = { waist = {79,86} } } } XL_minus_1 = { ["Waist"] = "35\" (89cm)" internal = { cm = { waist = {86,94} } } } XXL_minus_1 = { ["Waist"] = "38\" (97cm)" internal = { cm = { waist = {94,104} } } } ["3XL_minus_1"] = { ["Waist"] = "41\" (105cm)" internal = { cm = { waist = {104,116} } } } ["4XL_minus_1_men"] = { ["Waist"] = "44\" (113cm)" internal = { cm = { waist = {116,127} } } } } } size_charts.socks_women_hemaosheng = { version = "1" columns = { ["Our Size"] = {type="static"} ["US"] = {type="static"} ["UK/AU"] = {type="static"} ["EU"] = {type="static"} } heading = { [[ Our Size Women's Shoe Sizes ]] [[ US UK/AU EU ]] } internal = { title = "Harmony Socks - WOMEN'S SHOE SIZES" cm = { "foot" } heading = [[ Factory Suggestion ]] } rows = { hemaosheng_women_F_LXL = { ["Our Size"] = "M" ["US"] = "7.5 - 9" ["UK/AU"] = "5 - 7" ["EU"] = "38 - 39" internal = { cm = { foot={23.5,25} } html = [[ 35 - 39 ]] } } } } size_charts.socks_men_hemaosheng = { version = "1" columns = { ["Our Size"] = {type="static"} ["US"] = {type="static"} ["UK/AU"] = {type="static"} ["EU"] = {type="static"} } heading = { [[ Our Size Men's Shoe Sizes ]] [[ US UK/AU EU ]] } internal = { title = "Harmony Socks - MEN'S SHOE SIZES" cm = { "foot" } heading = [[ Factory Suggestion ]] } rows = { hemaosheng_men_F_MXL = { ["Our Size"] = "M/L" ["US"] = "7 - 11.5" ["UK/AU"] = "6.5 - 11" ["EU"] = "40 - 44" internal = { cm = { foot={24,28} } html = [[ 40 - 44 ]] } } } } size_charts.socks_unisex_hemaosheng = { version = "1" columns = { ["Our Size"] = {type="static"} womens_us = {type="static"} womens_uk_au = {type="static"} womens_eu = {type="static"} mens_us = {type="static"} mens_uk_au = {type="static"} mens_eu = {type="static"} } heading = { [[ Our Size Women's Shoe Sizes Men's Shoe Sizes ]] [[ US UK/AU EU US UK/AU EU ]] } internal = { title = "Harmony Socks - UNISEX SHOE SIZES" cm = { "foot" } heading = [[ Factory Suggestion (Women) Factory Suggestion (Men) ]] } rows = { hemaosheng_unisex_F_MXL = { ["Our Size"] = "M/L" womens_us = "9 - 12" womens_uk_au = "7 - 10" womens_eu = "39 - 43" mens_us = "7.5 - 11.5" mens_uk_au = "7 - 11" mens_eu = "39 - 44" internal = { cm = { foot={25,28.5} } html = [[ 35 - 43 39 - 44 ]] } } } } size_charts.socks_unisex_yccxi = { version = "1" columns = { ["Our Size"] = {type="static"} womens_us = {type="static"} womens_uk_au = {type="static"} womens_eu = {type="static"} mens_us = {type="static"} mens_uk_au = {type="static"} mens_eu = {type="static"} } heading = { [[ Our Size Women's Shoe Sizes Men's Shoe Sizes ]] [[ US UK/AU EU US UK/AU EU ]] } internal = { title = "Morning Socks - UNISEX SHOE SIZES" cm = { "foot" } heading = [[ Factory Suggestion ]] } rows = { yccxi_unisex_F_XSXL = { ["Our Size"] = "M" womens_us = "7.5 - 10.5" womens_uk_au = "5 - 8.5" womens_eu = "38 - 41" mens_us = "6 - 9" mens_uk_au = "5.5 - 8.5" mens_eu = "39 - 42" internal = { cm = { foot={23.5,26} } html = [[ 38 - 45 ]] } } } } size_charts.socks_women_fslzl = { version = "1" columns = { ["Our Size"] = {type="static"} ["US"] = {type="static"} ["UK/AU"] = {type="static"} ["EU"] = {type="static"} } heading = { [[ Our Size Women's Shoe Sizes ]] [[ US UK/AU EU ]] } internal = { title = "Twin Wolf Socks (Alpha) - WOMEN'S SHOE SIZES" cm = { "foot" } heading = [[ Factory Suggestion ]] } rows = { fslzl_women_S = { ["Our Size"] = "S" ["US"] = "4 - 7" ["UK/AU"] = "2 - 4.5" ["EU"] = "35 - 38" internal = { cm = { foot={20,23} } html = [[ 35 - 38 ]] } } fslzl_women_M = { ["Our Size"] = "M" ["US"] = "7.5 - 10.5" ["UK/AU"] = "5 - 8.5" ["EU"] = "38 - 41" internal = { cm = { foot={23.5,26} } html = [[ 38 - 41 ]] } } fslzl_women_L = { ["Our Size"] = "L" ["US"] = "11 - 14" ["UK/AU"] = "9 - 12.5" ["EU"] = "41 - 45" internal = { cm = { foot={26.5,29} } html = [[ 41 - 45 ]] } } fslzl_women_XL = { ["Our Size"] = "XL" ["US"] = "15 - 18" ["UK/AU"] = "13 - 16.5" ["EU"] = "45 - 49" internal = { cm = { foot={29.5,32} } html = [[ 45 - 49 ]] } } } } size_charts.socks_unisex_fslzl = { version = "1" columns = { ["Our Size"] = {type="static"} womens_us = {type="static"} womens_uk_au = {type="static"} womens_eu = {type="static"} mens_us = {type="static"} mens_uk_au = {type="static"} mens_eu = {type="static"} } heading = { [[ Our Size Women's Shoe Sizes Men's Shoe Sizes ]] [[ US UK/AU EU US UK/AU EU ]] } internal = { title = "Twin Wolf Socks (Alpha) - UNISEX SHOE SIZES" cm = { "foot" } heading = [[ Factory Suggestion (Women) Factory Suggestion (Men) ]] } rows = { fslzl_both_S = { ["Our Size"] = "S" womens_us = "4 - 7" womens_uk_au = "2 - 4.5" womens_eu = "35 - 38" mens_us = "5 - 5.5" mens_uk_au = "5 - 5.5" mens_eu = "35 - 38" internal = { cm = { foot={20,23} } html = [[ 35 - 38 35 - 38 ]] } } fslzl_both_M = { ["Our Size"] = "M" womens_us = "7.5 - 10.5" womens_uk_au = "5 - 8.5" womens_eu = "38 - 41" mens_us = "6 - 9" mens_uk_au = "6 - 8.5" mens_eu = "39 - 42" internal = { cm = { foot={23.5,26} } html = [[ 38 - 41 39 - 42 ]] } } fslzl_both_L = { ["Our Size"] = "L" womens_us = "11 - 14" womens_uk_au = "9 - 12.5" womens_eu = "41 - 45" mens_us = "9.5 - 13" mens_uk_au = "9 - 12.5" mens_eu = "43 - 46" internal = { cm = { foot={26.5,29} } html = [[ 41 - 45 43 - 46 ]] } } fslzl_both_XL = { ["Our Size"] = "XL" womens_us = "15 - 18" womens_uk_au = "13 - 16.5" womens_eu = "45 - 49" mens_us = "14 - 17" mens_uk_au = "13.5 - 17" mens_eu = "47 - 50" internal = { cm = { foot={29.5,32} } html = [[ 45 - 49 47 - 50 ]] } } } } size_charts.socks_unisex_fslzl_numeric = { version = "1" columns = { ["Our Size"] = {type="static"} womens_us = {type="static"} womens_uk_au = {type="static"} womens_eu = {type="static"} mens_us = {type="static"} mens_uk_au = {type="static"} mens_eu = {type="static"} } heading = { [[ Our Size Women's Shoe Sizes Men's Shoe Sizes ]] [[ US UK/AU EU US UK/AU EU ]] } internal = { title = [[Twin Wolf Socks (Numeric for Wool & "Huaxue" Socks) - UNISEX SHOE SIZES]] cm = { "foot" } heading = [[ Factory Suggestion ]] } rows = { fslzl_3539_XSM = { ["Our Size"] = "M" womens_us = "4 - 9" womens_uk_au = "2 - 7" womens_eu = "35 - 39" mens_us = "5 - 7.5" mens_uk_au = "5 - 7" mens_eu = "35 - 39" internal = { cm = { foot={20,25} } html = [[ 35 - 39 ]] } } fslzl_4045_MXL = { ["Our Size"] = "L" womens_us = "9.5 - 15" womens_uk_au = "7.5 - 13" womens_eu = "40 - 45" mens_us = "8 - 12" mens_uk_au = "7.5 - 11.5" mens_eu = "40 - 45" internal = { cm = { foot={25.5,28.5} } html = [[ 40 - 45 ]] } } } } size_charts.socks_women_fslzl_numeric = { version = "1" columns = { ["Our Size"] = {type="static"} ["US"] = {type="static"} ["UK/AU"] = {type="static"} ["EU"] = {type="static"} } heading = { [[ Our Size Women's Shoe Sizes ]] [[ US UK/AU EU ]] } internal = { title = [[Twin Wolf Socks (Numeric for Wool & "Huaxue" Socks) - Women's SHOE SIZES]] cm = { "foot" } heading = [[ Factory Suggestion ]] } rows = { fslzl_3539_M = { ["Our Size"] = "M" ["US"] = "4 - 9" ["UK/AU"] = "2 - 7" ["EU"] = "35 - 39" internal = { cm = { foot={20,25} } html = [[ 35 - 39 ]] } } } } size_charts.socks_unisex_fslzl_3945 = { version = "1" columns = { ["Our Size"] = {type="static"} womens_us = {type="static"} womens_uk_au = {type="static"} womens_eu = {type="static"} mens_us = {type="static"} mens_uk_au = {type="static"} mens_eu = {type="static"} } heading = { [[ Our Size Women's Shoe Sizes Men's Shoe Sizes ]] [[ US UK/AU EU US UK/AU EU ]] } internal = { title = "Twin Wolf Socks (One-sized) - UNISEX SHOE SIZES" cm = { "foot" } heading = [[ Factory Suggestion ]] } rows = { fslzl_unisex_3945_ML = { ["Our Size"] = "M/L" womens_us = "9 - 15" womens_uk_au = "7 - 13" womens_eu = "39 - 45" mens_us = "7.5 - 12" mens_uk_au = "7 - 11.5" mens_eu = "39 - 45" internal = { cm = { foot={25,28.5} } html = [[ 39 - 45 ]] } } } } for name, chart in pairs(size_charts) do chart.name = name if chart.version=="1" then chart.has_units = false for column_name, column in pairs(chart.columns) do local type = column.type if type_of(type)=="function" then for size, row in pairs(chart.rows) do row[column_name] = type(chart,size) end column.type = "static" end end end end return size_charts