// File: contracts/traists/Trait5.sol



// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "./TraitBase.sol";

// Hair
contract Trait5 is TraitBase {
	constructor(address factory) TraitBase("Hair", factory) {
		items.push(
			Item(
				"Tousled",
				'<path d="M494,219c9-63,83-53,83-53s-57-52-120-10c0,0,7-74-74-79c0,0,30,37,26,69c0,0-60-44-113,7c0,0,75,5,83,28c0,0-74-2-87,71c0,0,55-38,83-23" class="s f d"/>'
			)
		);
		items.push(
			Item(
				"Sticking Up",
				'<path d="M366,261c20-21,34.74-72.3,37.15-93.97S427,206,427,206s9.87-90.75,13.48-100.39S472,192,472,192l13.04-62.3c0,0,11.96,58.3,53.96,72.3" class="s f d"/>'
			)
		);
		items.push(
			Item(
				"Spiky",
				'<path d="M351,253c0,0-18-30-55-17c0,0,17-51,72-55c0,0-44-28-58-22c0,0,73-39,108-1c0,0,22-43,77-41c0,0-39,37-31,60c0,0,42-33,72-31c0,0-23.45,28.91-14,49" class="s f d"/><path d="M490,192c0,0,60-1,74-51c0,0,12,37,3,58c0,0,12-15,35-24c0,0-22,47-5,64" class="s f d"/><path d="M390,249c0,0,0-46-21-46c0,0,39-18,62,17" class="s f d"/>'
			)
		);
		items.push(
			Item(
				"Cowlick",
				'<path d="M425,217c0,0,61-18,39-60c-17.34-33.1-49-27-49-27s28.3-41.74,79-22c41.32,16.09,93,83,143,152" class="s f d"/>'
			)
		);
		items.push(
			Item(
				"Smooth",
				'<path d="M642,269c0,0-30.45-49.73-87-95c-52.45-41.99-139.48-72.14-254-63c0,0,43.1,25.93,45,62c1,19-15,39-31,68c-11.03,19.99-20.59,40.82-27.54,64.23c-10.58,35.63-15.1,77.21-9.46,130.77" class="s f d"/>'
			)
		);
		items.push(
			Item(
				"Combed Back",
				'<path d="M652,283c0,0-30.43-51.09-61.76-89.17C555,151,452,54,299,131c0,0,68-9,109,15c0,0-113-19-191,97c0,0,97.75-37.4,151.89-22.78c0,0-82.69,8.95-98.15,52.68c0,0,37.27-6.43,15.26,43.1c-16,36-8.33,120.96-8.33,120.96" class="s f d"/>'
			)
		);
		items.push(
			Item(
				"Protruding",
				'<path d="M644,270c0,0-2-3-23-35c-22.92-34.92-13-60-13-60s-28,8-27,32c0,0-45-62-139-57s-134-6-143-25c0,0-14,42-5,73c0,0-17-14-23-26c0,0-27,47,0,88c0,0-21,25-20,41l28-15c0,0-13,54-1,152" class="s f d"/>'
			)
		);
		items.push(
			Item(
				"Forelock",
				'<path d="M278,434c-6-45-14.36-246.84,135-288C540,111,557,40,557,40s62.82,85.91,27,155c-28,54-113,24-113,24" class="s f d"/><path d="M565,93c0,0,41,102-59,102" class="s e d"/>'
			)
		);
		items.push(
			Item(
				"Flat Top",
				'<path d="M639,263c-33.2-47.73-101-158-124-193c0,0-196,65-182,186c0,0-18-37-34-86c0,0-35,160-21,268" id="c20" class="s f d"/><path d="M500,107c0,0-127,52-136,121" class="s e d"/>'
			)
		);
		items.push(
			Item(
				"Hedgehog",
				'<path d="M523,185c-59-9-99-60-91-91c0,0-30,22-23,53c0,0-23,0-37-16c0,0-8,43,14,54c0,0-32,8-44-3c0,0,5,41,43,37c0,0-27,17-25,39c0,0,26-18,50-14c0,0,0,19,23,17" class="s f d"/><path d="M504,202c-37,2-56-24-56-24s-5.3,27.81,9,37" class="s f d"/>'
			)
		);
		items.push(
			Item(
				"Smooth Wrench",
				'<style>.z2{fill:#4F4F4F}</style><path d="M642,269c0,0-30.45-49.73-87-95c-52.45-41.99-139.48-72.14-254-63c0,0,43.1,25.93,45,62c1,19-15,39-31,68c-11.03,19.99-20.59,40.82-27.54,64.23c-10.58,35.63-15.1,77.21-9.46,130.77" class="s f d"/><path d="M550.21,222.56L648,185c0,0,35,50,89,24s40-68,40-68l-60,25l-29-25l1-35l64-23c0,0-31-39-79-21s-44,66-44,66l-115.08,41.85" class="s d z2"/><path d="M351.47,228.74L232.9,271.65c0,0-33.25-49.24-87.9-24.65s-42.2,65.28-42.2,65.28l60.63-23.43l28.34,25.74l-1.91,34.96l-64.58,21.33c0,0,18.71,44.11,78.43,23.04c48.34-17.06,45.7-64.83,45.7-64.83l103.39-36.4" class="s d z2"/><path d="M351,304c0,0,14-53-2-83" class="s e d"/><path d="M504,166c2,0,41,24,48,68" class="s e d"/>'
			)
		);
		items.push(
			Item(
				"Flat Top Tattoo",
				'<path d="M639,263c-33.2-47.73-101-158-124-193c0,0-196,65-182,186c0,0-18-37-34-86c0,0-35,160-21,268" class="s f d"/><path d="M500,107c0,0-127,52-136,121" class="s e d"/><path d="M385.48,275.23c-5.14,12.11,7.35,40.34,38.83,9.59S401.24,238.13,385.48,275.23z" class="s e d"/><path d="M346.88,312.26c-5.14,12.11,7.35,40.34,38.83,9.59S362.63,275.15,346.88,312.26z" class="s e d"/><polyline points="581,217 579.91,232.36 560,228 552.16,246.71 539,235" class="s e d"/>'
			)
		);
		itemCount = items.length;
		items.push(
			Item(
				"Cap",
				'<path d="M260.6,414.46c0,0-132.05,54.75-149.23,31.13c-17.18-23.62,0-94.48,138.49-132.05" class="s d" style="fill:#303030"/><path d="M523.63,135.33c-78.37-12.88-327.44,22.55-263.03,279.13c0,0,404.74-113.8,413.33-120.24C682.52,287.78,639.78,154.42,523.63,135.33z M487.13,283.48c-10.74-33.28,7.34-60.61,31.13-66.56c51.53-12.88,69.78,39.72,69.78,39.72L487.13,283.48z" class="s d" style="fill:#FFFFFF"/><path d="M337,347c-35.83-13.01-28.65-58.43-25-76c0,0,12,15,19,21c3.05,2.61-3.67-50.22-12-66c0,0,66,5,65,51c0,0,14-16,13-29c0,0,35,37,14,74C398.16,344.62,364.55,357,337,347z" class="s" style="fill:#F4DA5B"/>'
			)
		);
		items.push(
			Item(
				"Bandana",
				'<path d="M275.57,410.22c0,0-34.29,9.64-34.29-48.21s133.93-107.14,181.07-126.43s166.07-63.21,206.78-34.29C669.85,230.22,647,265,647,265c-2-2-14-15-14-15s-41.66-10.88-161.36,37.01C460.92,291.29,276,389,276,389L275.57,410.22z" style="fill:#F4DA5B"/><path d="M641.99,247.36C492.24,255.56,265.93,392,265.93,392" class="s e d"/><path d="M631.5,250.5l13,19c0,0,34.99-26.42-12.15-66.06c-36.12-30.37-162.85,12.86-210,32.14S237,307.36,237,365.22s38.5,45.28,38.5,45.28l-1-21" class="s e d"/>'
			)
		);
		items.push(
			Item(
				"Crown",
				'<style>.z8{fill:#FFFFFF}</style><path d="M299.9,284.61c0,0,182.64-19.33,228.37-98.47C528,186,532,108,472.09,45.64C453.36,64.36,439,135,439,135l-90-92l-20,122l-84-41C245,124,235,224,299.9,284.61z" class="s d" style="fill:#F4DA5B"/><path d="M276,256c0,0,153.11,1,248-99" class="s e d"/><circle cx="284.5" cy="185.5" r="13.5" class="s z8"/><circle cx="378.5" cy="143.5" r="13.5" class="s z8"/><circle cx="480.5" cy="123.5" r="13.5" class="s z8"/>'
			)
		);
		items.push(
			Item(
				"Black Hat",
				'<style>.z8{fill:#303030}.y8{fill:#FFFFFF}</style><path d="M296,257c-3.72,1.46-52,19-56,37s11,51,118,20s199-93,203-138s-95,7-124,26S319,248,296,257z" class="s d z8"/><path d="M294,105c-16.82,3.15-42,6-38,51s19,123,31,130s89.32-9.24,143-38c28-15,90-53,88-65S440,55,409,55c-19.1,0-36,25-54,33C340.78,94.32,310,102,294,105z" class="s d z8"/><path d="M499.32,149.89c-60.68,89.89-210.33,100.37-226.87,101.81C269,252,287,288,287,288s61-2,130.79-33.56c40.31-18.23,100.23-60.89,99.72-67.66C517,180,499.32,149.89,499.32,149.89z" class="s d y8"/><path d="M272.45,251.7C289,253,438.64,239.78,499.32,149.89" class="s d z8"/>'
			)
		);
		items.push(
			Item(
				"Blue Hat",
				'<style>.z8{fill:#69DCFF}.y8{fill:#F4DA5B}</style><path d="M593.17,194.88c0,0-65.19-97.78-213.68-39.05S250.5,332.13,250.5,332.13" class="s z8"/><path d="M593.17,194.88c0,0-65.19-97.78-213.68-39.05S250.5,332.13,250.5,332.13" class="s e"/><path d="M276,419c0,0-43,11.42-43-48.42S372.84,258.89,421.6,238.94s173.05-67.11,213.87-35.46c50.22,38.94,14.05,72.01,14.05,72.01C645.08,275.49,637,254,637,254s-37.69-4.06-164.22,38.03C423.37,308.47,274,393,274,393L276,419z" class="s d z8"/><path d="M648.77,251.13c-154.89,8.47-388.95,149.6-388.95,149.6" class="s e d"/><path d="M325,276l-2,59l-38.3-34.47c-1.62-1.46-2.77-3.42-3.01-5.59C281.1,289.68,285.14,283,304,272c24-14,31-1,31-1" class="s d y8"/>'
			)
		);
		items.push(
			Item(
				"Flower Bandana",
				'<style>.z8{fill:#4BC689}.y8{fill:#FFFFFF}.x8{fill:#F4DA5B}.w8{fill:#FFA6D8}</style><path d="M539,209c0,0-39-110,127-134C666,75,645,237,539,209z" class="s d z8"/><path d="M543.08,231.77c0,0-113.06,28.94-122.02-138.55C421.05,93.22,580.51,128.72,543.08,231.77z" class="s d z8"/><path d="M302.5,244.82c15.27,11.69,53.55-52.55,41.64-108.49S196.58,163.7,302.5,244.82z" class="s d y8"/><path d="M325.56,263.12c-18.58-4.96,8.95-74.49,60.55-99.19S454.46,297.54,325.56,263.12z" class="s d y8"/><path d="M223.43,179.7c-53.3-20.76-58.12,138.37,67.83,94.36C309.41,267.71,276.73,200.45,223.43,179.7" class="s d y8"/><circle cx="307" cy="269" r="44" class="s d x8"/><path d="M339.09,317.12c0,0-69.45,93.8-182.09-30.48C157,286.64,303.1,213.56,339.09,317.12z" class="s d z8"/><path d="M265.93,392c0,0,226.31-136.45,376.06-144.64 M631.5,250.5l13,19c0,0,34.99-26.42-12.15-66.06c-36.12-30.37-162.85,12.86-210,32.14S237,307.36,237,365.22s38.5,45.28,38.5,45.28l-1-21" class="s d w8"/>'
			)
		);
		items.push(
			Item(
				"Brown Hat",
				'<style>.z8{fill:#FFC996}.y8{fill:#FFFFFF}</style><path d="M296,257c-3.72,1.46-52,19-56,37s11,51,118,20s199-93,203-138s-95,7-124,26S319,248,296,257z" class="s d z8"/><path d="M294,105c-16.82,3.15-42,6-38,51s19,123,31,130s89.32-9.24,143-38c28-15,90-53,88-65S440,55,409,55c-19.1,0-36,25-54,33C340.78,94.32,310,102,294,105z" class="s d z8"/><path d="M499.32,149.89c-60.68,89.89-210.33,100.37-226.87,101.81C269,252,287,288,287,288s61-2,130.79-33.56c40.31-18.23,100.23-60.89,99.72-67.66C517,180,499.32,149.89,499.32,149.89z" class="s d y8"/><path d="M272.45,251.7C289,253,438.64,239.78,499.32,149.89" class="s d z8"/>'
			)
		);
		items.push(
			Item(
				"Scholar Hat",
				'<style>.z8{fill:#64B0FF}.y8{fill:#FFE57A}</style><path d="M470.15,139.87L485,216c0,0-62.52,76.52-165.93,57.38c-6.7-1.24-12.15-6.13-14.03-12.68L289.31,206" class="z8"/><path d="M470.15,139.87l13.02,66.77c1.2,6.17-0.78,12.51-5.25,16.92C458.02,243.2,397.12,292.88,308,271l-18.69-65" class="s e d"/><path d="M194.42,169.54l174.42,30.73L517.65,62.57c4.04-3.74,1.81-10.51-3.67-11.1L362.62,34.94c-5.53-0.6-11.08,0.94-15.51,4.32L191.63,158.11C187.19,161.51,188.91,168.57,194.42,169.54z" class="z8"/><path d="M528,53v29.74c0,11.63-4.89,22.73-13.48,30.57L391.19,226.03c-8.9,8.13-21.19,11.45-32.97,8.9L216.1,204.14c-12.09-2.62-22.38-10.51-28.05-21.51L180,167" class="z8"/><path d="M180,167l180.45,31.79c5.28,0.93,10.7-0.66,14.64-4.31L528,53L367.93,35.52c-8.94-0.98-17.92,1.53-25.07,6.99L180,167z" class="s e d"/><path d="M528,53v45.72c0,1.45-0.61,2.84-1.68,3.82L387.59,229.32c-6.64,6.07-15.81,8.55-24.61,6.64l-163-35.32c-1.89-0.41-3.49-1.64-4.38-3.36L180,167" class="s e d"/><polygon points="226.04,296.8 214.08,320.04 231.69,327.28" class="y8"/><path d="M226,285l8,46l-21-10L226,285l-6.27-80.07V174c0,0,90.27-48,95.27-46" class="s e d"/>'
			)
		);
		items.push(
			Item(
				"Police Cap",
				'<style>.z8{fill:#303030}.y8{fill:#64AEFF}.x8{fill:#EFD55B}</style><path d="M303,305c0,0,134.3,49.1,296,21s143-42,21-97S303,305,303,305z" class="s z8"/><path d="M265.93,314.2c-11.9,1.5-45.16,14.25-73.82-1.33C163.44,297.29,150,248,197,204c28.67-26.84,83.53-91.36,108-104s207.25-80.23,238-81s115.46,27.76,127,56s-38.23,108.8-60.57,113.15C587.1,192.51,265.93,314.2,265.93,314.2z" class="s d y8"/><path d="M640.81,239.44l-14.18-61.22c0,0-220.11-12.19-370.85,99.02C229,297,277,351,277,351S451.74,234.95,640.81,239.44z" class="s d y8"/><ellipse cx="294.1" cy="297.18" rx="20" class="s x8"/><path d="M539.12,55.83c3.26-4.66,16.84,13.81,35.56,16.6c18.72,2.79,36.17-7.37,40.62-5.11c4.45,2.26-14.17,20.21-13.31,25.12s9.27,28.37,5.34,39.06C602,146,580.04,158.58,560,154s-33.33-23.3-28.16-40.13c3.82-12.43,17.34-30.37,12.27-39.09C539.03,66.05,537.1,58.71,539.12,55.83z" class="s d x8"/>'
			)
		);
		items.push(
			Item(
				"Sombrero",
				'<style>.z8{fill:#FFE57A}.y8{fill:#6FE8DB}</style><path d="M492.5,168.5c0,0-84-156-146-142s-19.34,208.53-19.34,208.53" class="z8"/><path d="M492.5,168.5c0,0-84-156-146-142s-21,202-21,202" class="s z8"/><path d="M218,391c0,0,78-95,214-138s118.5-49.5,240.5-57.5L679,131c0,0-60.24,3.78-127,18c-57.75,12.3-120.35,34.21-153.51,46.5C360.96,209.41,289.72,249.47,237,289c-47.71,35.78-79,72-79,72L218,391z" class="y8"/><path d="M218,391c0,0,78-95,214-138s118.5-49.5,240.5-57.5l6-64c0,0-59.97,3.46-126.5,17.5c-57.71,12.18-120.33,34.12-153.51,46.5C339.67,217.44,280.21,255.34,237,289c-49.34,38.44-78.5,71.5-78.5,71.5L218,391z" class="s e d"/><path d="M219.5,391.5c0,0,31.5-0.5,56.5-15.5l4.29-42.3L219.5,391.5z" class="s l d"/><path d="M672,196c0,0,3,13-55,36l-32-27L672,196z" class="s l d"/><circle cx="212.5" cy="350.5" r="16.5" class="s z8"/><circle cx="250.5" cy="317.5" r="16.5" class="s z8"/><circle cx="292.53" cy="286.53" r="16.5" class="s z8"/><circle cx="336.53" cy="259.52" r="16.5" class="s z8"/><circle cx="385.61" cy="236.56" r="16.5" class="s z8"/><circle cx="435.62" cy="217.56" r="16.5" class="s z8"/><circle cx="484.63" cy="200.55" r="16.5" class="s z8"/><circle cx="535.64" cy="185.55" r="16.5" class="s z8"/><circle cx="587.22" cy="174.02" r="16.5" class="s z8"/><circle cx="640.84" cy="165.61" r="16.5" class="s z8"/><path d="M394,66c0,0,35,34,51,64" class="s e d"/>'
			)
		);
		items.push(
			Item(
				"Gentleman Hat",
				'<path d="M286,260c-3.72,1.46-79,15-83,33s38,55,145,24s212-123,216-173c3.6-45.03-108,42-137,61S309,251,286,260z" class="l"/><path d="M306,257c-10,3-99,18-103,36s38,55,145,24s212-123,216-173c3.6-45.03-108,42-137,61S329.66,249.9,306,257z" class="s e d"/><path d="M322,274c0,0-120-129-104-138s200-90,208-84s37,148,37,155C463,228,352,274,322,274z" class="l"/><path d="M297.29,247.88c-5.43,2.18,49.45-11.24,92.71-30.88c38.76-17.6,66.07-41.78,67.01-38c1.99,8,7.99,27.28,2.49,34.14C454,220,329,283,321,274S297.58,247.77,297.29,247.88z" style="fill:#FFE57A"/><path d="M328.46,273.34c-4.46,0.67-8.94-0.93-11.99-4.25C294.75,245.43,207,149,219,137c12.98-12.98,198-91,206-85s37,148,37,155C462,226.52,366.06,267.65,328.46,273.34z" class="s e d"/><path d="M297.29,247.88c0,0,111.74-27.88,159.72-68.88" class="s e"/>'
			)
		);
		items.push(
			Item(
				"General Cap",
				'<style>.z8{fill:#303030}.y8{fill:#99503D}.x8{stroke:#FFE57A}.w8{fill:#FFE57A}</style><path class="s z8" d="M294.42,307.65c0,0,127.45-24.16,268.58-72.65s48.91-43.81,6-52C449.48,160.18,294.42,307.65,294.42,307.65z"/><path class="s y8" d="M262.46,321.25c-10.46,3.06-38.49,19.29-66.47,9.43S302.99,177.37,320,159c25-27,76.25-93.35,165-119c26.87-7.77,78.86-18.92,100,26c16,34-11.58,79.87-31,87S262.46,321.25,262.46,321.25z"/><path class="s y8" d="M569,183l-9-34c0,0-176,25-289,153c-20.03,22.69,6.7,50.69,6.7,50.69S398.61,206.17,569,183z"/><path class="s e d x8" d="M294,308c0,0,83-103,255-140"/><path class="w8" d="M553.35,89.86c-0.29-5.66-6.7-10.22-17.21-12.29c-0.6-1.52-1.28-3.12-2.05-4.81c-2.28-5-9-14.21-14.91-13.91c-6.47,0.33-11.68,11.45-12.99,15.32c-0.59,1.73-1.09,3.35-1.53,4.9c-10.48,3.1-16.54,8.34-16.25,14.08c0.24,4.68,4.52,8.56,12.1,10.99c-0.39,4.06-0.53,7.61-0.43,10.59c0.18,5.14,1.1,8.59,2.82,10.56c1.08,1.25,2.5,1.91,4.09,1.93c0.15,0,0.3,0,0.45-0.01c4.91-0.25,7.6-5.46,10.43-10.97l0.15-0.29c1.47-2.85,2.85-5.55,4-5.61c1.28-0.07,3.34,3.23,4.7,5.41c0.2,0.32,0.39,0.63,0.58,0.93c3.2,5.15,5.72,9.22,11.21,8.94c0.02,0,0.03,0,0.05,0c1.72-0.09,3.18-0.87,4.2-2.23c2.43-3.24,2.46-9.79,0.02-21.53C549.83,98.7,553.58,94.46,553.35,89.86zM492.67,92.94c-0.16-3.11,4.06-6.55,10.75-8.97c-1.01,4.55-1.52,8.57-2.07,12.95c-0.1,0.82-0.21,1.65-0.32,2.51c-0.02,0.12-0.03,0.25-0.05,0.37C495.94,98.02,492.8,95.46,492.67,92.94z M539.33,120.83c-0.27,0.36-0.55,0.51-1.02,0.53c-0.01,0-0.02,0-0.02,0c-2.86,0.15-4.25-1.9-7.37-6.93c-0.19-0.31-0.38-0.62-0.58-0.94c-2.33-3.74-4.75-7.61-8.54-7.41c-3.6,0.18-5.36,3.6-7.58,7.92l-0.15,0.29c-2.65,5.14-4.57,8.54-6.89,8.66c-0.05,0-0.1,0-0.15,0c-0.27,0-0.56-0.06-0.91-0.46c-0.76-0.88-3.09-5.1-0.84-22.52c0.11-0.86,0.22-1.7,0.32-2.52c0.92-7.29,1.64-13.05,4.64-21.9c1.87-5.51,6.37-12.29,9.16-12.43c0.99-0.05,2.97,0.89,5.56,3.69c2.07,2.23,4.13,5.27,5.25,7.73c3.88,8.51,5.18,14.16,6.83,21.32c0.19,0.81,0.38,1.63,0.57,2.48C541.26,113.96,540.56,119.19,539.33,120.83z M541.82,97.6c-0.02-0.08-0.04-0.15-0.05-0.23c-0.2-0.84-0.39-1.66-0.57-2.46c-0.98-4.26-1.88-8.18-3.33-12.55c6.68,1.74,11.06,4.69,11.21,7.73C549.21,92.58,546.53,95.33,541.82,97.6z"/>'
			)
		);
	}
}

// File: contracts/traists/TraitBase.sol



// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface IFactory {
	function owner() external view returns (address);
}

contract TraitBase {
	struct Item {
		string name;
		string content;
	}

	string public name;
	IFactory public factory;

	uint256 public itemCount;
	Item[] items;

	constructor(string memory _name, address _factory) {
		name = _name;
		factory = IFactory(_factory);
	}

	function totalItems() external view returns (uint256) {
		return items.length;
	}

	function getTraitName(uint16 traitId) external view returns (string memory traitName) {
		traitName = items[traitId].name;
	}

	function getTraitContent(uint16 traitId) external view returns (string memory traitContent) {
		traitContent = items[traitId].content;
	}

	function addItems(string[] memory names, string[] memory contents) external {
		require(msg.sender == factory.owner());
		require(names.length == contents.length);
		for (uint16 i = 0; i < names.length; i++) {
			items.push(Item(names[i], contents[i]));
		}
	}

	function updateItem(uint16 traitId, string memory traitName, string memory traitContent) external {
		require(msg.sender == factory.owner());
		require(traitId < items.length);
		items[traitId].name = traitName;
		items[traitId].content = traitContent;
	}

	function setFactory(address _factory) external {
		require(msg.sender == factory.owner());
		factory = IFactory(_factory);
	}
}