← back to Handbag Authentication

public/js/japanese-condition-guide.js

248 lines

/**
 * Japanese Condition Guide for Designer Bag Resale Listings
 * Complete reference for reading Japanese listings and identifying condition issues
 */

const japaneseConditionGuide = {
  // Common condition words
  conditionWords: {
    '角スレ': {
      romaji: 'kado-sure',
      english: 'Corner scuffing/wear',
      impact: 'HIGH - Often lowers value the most',
      severity: 'high'
    },
    '金具小傷': {
      romaji: 'kanagu ko-kizu',
      english: 'Small scratches on metal hardware',
      impact: 'MEDIUM - Buckles, feet, zips',
      severity: 'medium'
    },
    '金具に小傷': {
      romaji: 'kanagu ni ko-kizu',
      english: 'Small scratches on hardware',
      impact: 'MEDIUM',
      severity: 'medium'
    },
    '擦れ': {
      romaji: 'sure',
      english: 'General rub/wear',
      impact: 'MEDIUM',
      severity: 'medium'
    },
    '汚れ': {
      romaji: 'yogore',
      english: 'Stains/soil',
      impact: 'MEDIUM-HIGH',
      severity: 'high'
    },
    '変色': {
      romaji: 'henshoku',
      english: 'Discoloration',
      impact: 'HIGH',
      severity: 'high'
    },
    'ベタつき': {
      romaji: 'beta-tsuki',
      english: 'Sticky lining (older PVC/coated canvas)',
      impact: 'HIGH - May require repair',
      severity: 'high'
    },
    '型崩れ': {
      romaji: 'kata-kuzure',
      english: 'Loss of shape/structure',
      impact: 'HIGH',
      severity: 'high'
    },
    '糸ほつれ': {
      romaji: 'ito-hotsure',
      english: 'Loose/frayed threads',
      impact: 'MEDIUM',
      severity: 'medium'
    },
    'におい': {
      romaji: 'nioi',
      english: 'Odor (smoke/perfume/storage)',
      impact: 'MEDIUM - Can be hard to remove',
      severity: 'medium'
    },
    '匂い': {
      romaji: 'nioi',
      english: 'Odor',
      impact: 'MEDIUM',
      severity: 'medium'
    }
  },

  // Condition grades
  grades: {
    'N': {
      name: 'New',
      description: 'Brand new, unused',
      condition: 'Mint',
      valueMultiplier: 0.95
    },
    'S': {
      name: 'Like New',
      description: 'Nearly new, minimal use',
      condition: 'Excellent',
      valueMultiplier: 0.90
    },
    'SA': {
      name: 'Barely Used',
      description: 'Tiny signs of use',
      condition: 'Excellent',
      valueMultiplier: 0.85
    },
    'A': {
      name: 'Gently Used',
      description: 'Light wear, well maintained',
      condition: 'Very Good',
      valueMultiplier: 0.75
    },
    'AB': {
      name: 'Used - Moderate',
      description: 'Noticeable but moderate wear, fully usable',
      condition: 'Good',
      valueMultiplier: 0.65
    },
    'B': {
      name: 'Heavy Wear',
      description: 'Significant wear but still functional',
      condition: 'Fair',
      valueMultiplier: 0.50
    },
    'C': {
      name: 'For Repair',
      description: 'Requires repair or for parts',
      condition: 'Poor',
      valueMultiplier: 0.30
    },
    'Junk': {
      name: 'Parts Only',
      description: 'For repair or parts only',
      condition: 'Parts',
      valueMultiplier: 0.20
    }
  },

  // Safe buy phrases
  safePhrases: {
    '目立ったダメージなし': 'No noticeable damage - SAFE BUY',
    '使用感はありますが、まだまだお使いいただけます': 'Signs of use, still very usable - SAFE BUY',
    '角スレ小': 'Minor corner wear - ACCEPTABLE',
    '微小': 'Very small/minimal - ACCEPTABLE'
  },

  // Caution phrases
  cautionPhrases: {
    '角スレ大': 'Big corner wear - NEGOTIATE',
    '広範囲': 'Large area damage - CAUTION',
    'ベタつきあり': 'Sticky lining present - MAY NEED REPAIR',
    '剥離': 'Peeling - REQUIRES REPAIR',
    '強い匂い': 'Strong odor - CAUTION'
  },

  // Brand-specific issues
  brandSpecific: {
    'Gucci': [
      '⚠️ Canvas corners and piping - look for 角スレ close-ups',
      '⚠️ Hardware logos and zipper pulls - 金具小傷 is common; check plating wear',
      '⚠️ Interior pockets on older models - watch for ベタつき or peeling',
      '⚠️ Shape - slouching listed as 型崩れ'
    ],
    'Louis Vuitton': [
      '⚠️ Vachetta leather darkening (patina) - normal but check for stains',
      '⚠️ Canvas cracking on very old pieces',
      '⚠️ Zipper pulls and hardware oxidation',
      '⚠️ Heat stamp clarity'
    ],
    'Chanel': [
      '⚠️ Lambskin scratches very easily',
      '⚠️ Chain interlacing leather condition',
      '⚠️ Caviar leather pebbling wear',
      '⚠️ CC logo turning/tarnishing'
    ],
    'Hermes': [
      '⚠️ Corner wear on Togo/Clemence',
      '⚠️ Hardware scratching',
      '⚠️ Handle condition critical',
      '⚠️ Lock/key matching numbers'
    ]
  },

  // Photo checklist
  photoChecklist: [
    '📷 All four corners (角/コーナー)',
    '📷 Handles/strap edges (ハンドル/ストラップ)',
    '📷 Hardware close-ups (金具)',
    '📷 Interior lining & pockets (内側/ポケット)',
    '📷 Serial/QR/model tag (シリアル)',
    '📷 Smell note (匂い) if mentioned'
  ],

  // Analyze title for condition issues
  analyzeTitle: function(title) {
    const issues = [];
    const warnings = [];
    let estimatedPriceAdjustment = 0;

    // Check for condition words
    for (const [japanese, info] of Object.entries(this.conditionWords)) {
      if (title.includes(japanese)) {
        issues.push({
          term: japanese,
          romaji: info.romaji,
          english: info.english,
          impact: info.impact,
          severity: info.severity
        });

        // Adjust price based on severity
        if (info.severity === 'high') {
          estimatedPriceAdjustment -= 15;
        } else if (info.severity === 'medium') {
          estimatedPriceAdjustment -= 8;
        }
      }
    }

    // Check for safe phrases
    for (const [japanese, english] of Object.entries(this.safePhrases)) {
      if (title.includes(japanese)) {
        warnings.push({ type: 'safe', text: english });
      }
    }

    // Check for caution phrases
    for (const [japanese, english] of Object.entries(this.cautionPhrases)) {
      if (title.includes(japanese)) {
        warnings.push({ type: 'caution', text: english });
        estimatedPriceAdjustment -= 10;
      }
    }

    return {
      issues,
      warnings,
      estimatedPriceAdjustment,
      hasIssues: issues.length > 0 || warnings.some(w => w.type === 'caution')
    };
  },

  // Get grade info
  getGradeInfo: function(gradeText) {
    for (const [code, info] of Object.entries(this.grades)) {
      if (gradeText.includes(code)) {
        return info;
      }
    }
    return null;
  }
};

// Export for use in other modules
if (typeof module !== 'undefined' && module.exports) {
  module.exports = japaneseConditionGuide;
}